Skip to content
  • leandrogracia@chromium.org's avatar
    Content detection should not disrupt the page behaviour · d871d324
    leandrogracia@chromium.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@126945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d871d324