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
+2012-12-11 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: Duplicate emulated touch events in iframe
+ https://bugs.webkit.org/show_bug.cgi?id=104653
+
+ Reviewed by Vsevolod Vlasov.
+
+ 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:
+
2012-12-11 Ken Kania <kkania@chromium.org>
[Inspector] Add command for dispatching mouse events.
Test touchend events are emulated in iframes correctly.
-Final touchend (test will time out if broken)
+touchend (test will time out if broken)
<div id="console"></div>
<script type="text/javascript">
-var eventCount = 0;
-var EXPECTED_EVENT_COUNT = 2;
+var touchstartCount = 0;
+var EXPECTED_TOUCHSTART_COUNT = 1;
+var shouldBail;
function testComplete()
{
- if (++eventCount === EXPECTED_EVENT_COUNT) {
- debug("Final touchend (test will time out if broken)");
- window.testRunner.notifyDone();
+ if (shouldBail)
+ return;
+
+ if (touchstartCount > EXPECTED_TOUCHSTART_COUNT) {
+ debug("touchstart fired for the top frame, too, but should only fire for the iframe!");
+ shouldBail = true;
}
+
+ debug("touchend (test will time out if broken)");
+ window.testRunner.notifyDone();
+}
+
+function handleTouchstart()
+{
+ ++touchstartCount;
}
function runTest() {
<div id='mydiv' style='width:100px;height:100px;position:absolute;top:0px; left:0px; background-color:blue;'></div>
<script type='text/javascript'>
var myDiv = document.getElementById('mydiv');
+myDiv.addEventListener('touchstart', function() { parent.handleTouchstart(); }, false);
myDiv.addEventListener('touchend', function() { parent.testComplete(); }, false);
</script>
</body>
+2012-12-11 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: Duplicate emulated touch events in iframe
+ https://bugs.webkit.org/show_bug.cgi?id=104653
+
+ Reviewed by Vsevolod Vlasov.
+
+ 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.
+
2012-12-11 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers.
if (eventType == PlatformEvent::MouseMoved && !m_touchPressed)
return false;
+ HitTestRequest request(HitTestRequest::Active);
+ MouseEventWithHitTestResults mev = prepareMouseEvent(request, event);
+
+ if (mev.scrollbar() || subframeForHitTestResult(mev))
+ return false;
+
SyntheticSingleTouchEvent touchEvent(event);
return handleTouchEvent(touchEvent);
}