Skip to content
  • kenneth@webkit.org's avatar
    [Qt] Implement tap feedback respecting -webkit-tap-highlight-color · 5f775c22
    kenneth@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=76914
    
    Reviewed by Simon Hausmann.
    
    .:
    
    Add a manual test.
    
    * ManualTests/qt/tap-highlighting.html: Added.
    
    Source/WebCore:
    
    Implement highlighting of dom nodes with a rounded rect, respecting
    the color of -webkit-tap-highlight-color and any transform applied
    to the element.
    
    Tested with manual test.
    
    * Target.pri:
    * page/GestureTapHighlighter.cpp: Added.
    (WebCore::GestureTapHighlighter::pathForNodeHighlight):
    * page/GestureTapHighlighter.h: Added.
    
    Source/WebKit2:
    
    Implement tap highlighting for Qt. When a touch press is issued,
    which is not handled by the web page, then we highlight any
    activatable node below. In all otehr cases, we hide any highlights.
    
    The highlighting itself is painted on an accelerated PageOverlay,
    on the web process side.
    
    * Target.pri:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::handlePotentialActivation):
    * UIProcess/WebPageProxy.h:
    * UIProcess/qt/QtTapGestureRecognizer.cpp:
    (WebKit::QtTapGestureRecognizer::recognize):
    * UIProcess/qt/QtWebPageEventHandler.cpp:
    (QtWebPageEventHandler::handlePotentialSingleTapEvent):
    * UIProcess/qt/QtWebPageEventHandler.h:
    * WebProcess/WebPage/TapHighlightController.cpp: Added.
    (WebKit::TapHighlightController::TapHighlightController):
    (WebKit::TapHighlightController::~TapHighlightController):
    (WebKit::TapHighlightController::highlight):
    (WebKit::TapHighlightController::hideHighlight):
    (WebKit::TapHighlightController::pageOverlayDestroyed):
    (WebKit::TapHighlightController::willMoveToWebPage):
    (WebKit::TapHighlightController::didMoveToWebPage):
    (WebKit::highlightColor):
    (WebKit::TapHighlightController::drawRect):
    (WebKit::TapHighlightController::mouseEvent):
    * WebProcess/WebPage/TapHighlightController.h: Added.
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::WebPage):
    (WebKit::WebPage::highlightPotentialActivation):
    * WebProcess/WebPage/WebPage.h:
    (WebKit::WebPage::tapHighlightController):
    * WebProcess/WebPage/WebPage.messages.in:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5f775c22