Clicks inside button elements are sometimes discarded when the mouse moves
https://bugs.webkit.org/show_bug.cgi?id=39620
Reviewed by Darin Adler.
Source/WebCore:
Test: fast/events/click-over-descendant-elements.html
* dom/Node.cpp:
(WebCore::ancestor):
(WebCore::commonAncestor): Method inspired from
http://src.chromium.org/viewvc/blink?view=revision&revision=162081.
(WebCore::commonAncestorCrossingShadowBoundary): Helper routine
that handles the case of nodes into a shadow node.
* dom/Node.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent): Selecting click event
target node according commonAncestorOverShadowBoundary method.
(WebCore::EventHandler::targetNodeForClickEvent): Deleted.
LayoutTests:
Test coming from http://src.chromium.org/viewvc/blink?view=revision&revision=162081.
Modified to ensure click events do not end up being considered as double click events.
* fast/events/click-over-descendant-elements-expected.txt: Added.
* fast/events/click-over-descendant-elements.html: Added.
* platform/ios-simulator/TestExpectations: Marked new test as failing.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed