Web Inspector: Duplicate emulated touch events in iframe
authorapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:00:53 +0000 (13:00 +0000)
committerapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:00:53 +0000 (13:00 +0000)
commitd3ad16e5908f4caca0c9a2720626cfdbde879b95
tree03b5337e492c3e94729ccfe58e0bf1f486ca4c67
parent17f51d091cef4ad210b58e38379f8f09e627767c
Web Inspector: Duplicate emulated touch events in iframe
https://bugs.webkit.org/show_bug.cgi?id=104653

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Synthetic touch events should be dispatched only on the frame containing its target, not on its ancestor frames,
up to the top frame.

* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
  Do not dispatch a synthetic touch event on the current frame if its target is in a subframe.

LayoutTests:

The test incorrectly expected two synthetic touchend events from an iframe,
while only one touchstart and one touchend should be dispatched.

* fast/events/touch/emulated-touch-iframe-expected.txt:
* fast/events/touch/emulated-touch-iframe.html:
* fast/events/touch/resources/emulated-touch-iframe2.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/emulated-touch-iframe-expected.txt
LayoutTests/fast/events/touch/emulated-touch-iframe.html
LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp