Touch adjustment does not target shadow DOM elements
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 00:41:28 +0000 (00:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 00:41:28 +0000 (00:41 +0000)
commite7eb0ec78d8725d81334c74b474b173894235fcc
treefb02ca60fef0884af141d58be21bffdfe9cc38b3
parent2dd2ac53e08e9fee4da777b27af3478864191eb8
Touch adjustment does not target shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=89556

Source/WebCore:

The position of internal shadow-DOM nodes were not being considered
when determining the snap position when TOUCH_ADJUSTMENT is enabled
for fine tuning the position of synthetic mouse events.  This
restriction results in not being able to select the calendar picker
when input type=date, or to clear the search field for input
type=search.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-06-26
Reviewed by Antonio Gomes.

Test: touchadjustment/nested-shadow-node.html

* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):

LayoutTests:

Cannot open calendar picker for input type=date using a touch tap
gesture if TOUCH_ADJUSTMENT is enabled. When touch adjustment is
enabled, the position of a touch point is snapped to the center of an
element when generating synthetic mouse events.  The position of shadow
nodes was not being considered when determining the snap position.
This test verifies that touch adjustment now considers shadow-DOM
when calculating the snap position.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-06-26
Reviewed by Antonio Gomes.

* touchadjustment/nested-shadow-node-expected.txt: Added.
* touchadjustment/nested-shadow-node.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/touchadjustment/nested-shadow-node-expected.txt [new file with mode: 0644]
LayoutTests/touchadjustment/nested-shadow-node.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp