[Qt] Implement tap feedback respecting -webkit-tap-highlight-color
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 18:18:47 +0000 (18:18 +0000)
committerkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 18:18:47 +0000 (18:18 +0000)
commita909a1cf997af0e85f50f492a47d7876f9441f77
treeff58e70f79be4c9a4fbe7d4eb6bd930083cff7bf
parent1e5efa51a2046e3fda037b3265b67922fadf1388
[Qt] Implement tap feedback respecting -webkit-tap-highlight-color
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: https://svn.webkit.org/repository/webkit/trunk@105893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
ChangeLog
ManualTests/qt/tap-highlighting.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebCore/page/GestureTapHighlighter.cpp [new file with mode: 0644]
Source/WebCore/page/GestureTapHighlighter.h [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/WebPage/TapHighlightController.h [new file with mode: 0644]
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in