Content detection should not disrupt the page behaviour
authorleandrogracia@chromium.org <leandrogracia@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2012 01:05:41 +0000 (01:05 +0000)
committerleandrogracia@chromium.org <leandrogracia@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Aug 2012 01:05:41 +0000 (01:05 +0000)
commit3ba0f61bce4eb14d6a2b10d8253007f264d1f53a
treeaa275a8bfeb797c966f11ad66f07df2addd3a799
parent2808e9d298de9a133c6a4a68ef2eb3e0210a6be4
Content detection should not disrupt the page behaviour
https://bugs.webkit.org/show_bug.cgi?id=94727

Reviewed by Adam Barth.

Source/WebCore:

Tested by WebViewTest::DetectContentAroundPosition.

* dom/Node.cpp:
(WebCore::Node::willRespondToTouchEvents): checks if a node listens to touch events. Very similar to willRespondToMouseClickEvents.
(WebCore):
* dom/Node.h:
(Node):

Source/WebKit/chromium:

Triggers content detection in the embedder on tap gestures and
add checks for the appropriate event listeners in order to prevent
triggering content detection when it would disrupt the page's behaviour.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
(WebKit::WebViewImpl::detectContentOnTouch):
* tests/WebViewTest.cpp:
* tests/data/content_listeners.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/tests/WebViewTest.cpp
Source/WebKit/chromium/tests/data/content_listeners.html [new file with mode: 0644]