Steps to reproduce the problem: 1. Save the following to a html file, and open in browser. <html><body><script> window.addEventListener('DOMContentLoaded', function() { var e; if (location.hash == '#iframe') { e = document.createElement('div'); e.innerHTML = 'touchstarting this element will fire a spurious event in Chrome using "Emulate touch events".'; e.addEventListener('touchstart', function() { console.log("touchstart event"); }); e.addEventListener('touchend', function() { console.log("touchend event"); }); } else { e = document.createElement('IFRAME'); e.src = "#iframe"; } document.body.appendChild(e); }); </script></body></html> 2. Open the Developer Console and enable 'emulate touch events' (Settings sprocket, Overrides). 3. Click on the div element within the iframe What is the expected behavior? The developer console to show 'touchstart event' and 'touchend event' once per click. What went wrong? The events are fired exactly twice for each click. Upstreaming http://code.google.com/p/chromium/issues/detail?id=164510 The issue is that the synthetic touch events are dispatched for all frames in the hierarchy, down to the one containing the hit element.
Created attachment 178760 [details] Patch
Comment on attachment 178760 [details] Patch Attachment 178760 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15259455 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Comment on attachment 178760 [details] Patch Consider adding bail out for mouse events on scroll bar.
Comment on attachment 178760 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178760&action=review > Source/WebCore/page/EventHandler.cpp:4062 > + LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, event.position()); MouseEventWithHitTestResults mev = prepareMouseEvent(request, event); > Source/WebCore/page/EventHandler.cpp:4065 > + RefPtr<Frame> subframe = subframeForHitTestResult(mev); if (subframeForHitTestResult(mev)) return false;
Committed r137295: <http://trac.webkit.org/changeset/137295>