Title: [140321] trunk
- Revision
- 140321
- Author
- [email protected]
- Date
- 2013-01-21 04:06:57 -0800 (Mon, 21 Jan 2013)
Log Message
Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
https://bugs.webkit.org/show_bug.cgi?id=107419
Reviewed by Pavel Feldman.
Source/WebCore:
mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
LayoutTests:
* fast/events/touch/emulate-touch-events.html: Test that mousemove is dispatched not more than once
and reset the touch event emulation flag in window.internals.settings upon test completion.
* fast/events/touch/emulated-touch-iframe.html:
Reset the touch event emulation flag in window.internals.settings upon test completion.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (140320 => 140321)
--- trunk/LayoutTests/ChangeLog 2013-01-21 11:54:00 UTC (rev 140320)
+++ trunk/LayoutTests/ChangeLog 2013-01-21 12:06:57 UTC (rev 140321)
@@ -1,3 +1,15 @@
+2013-01-21 Alexander Pavlov <[email protected]>
+
+ Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
+ https://bugs.webkit.org/show_bug.cgi?id=107419
+
+ Reviewed by Pavel Feldman.
+
+ * fast/events/touch/emulate-touch-events.html: Test that mousemove is dispatched not more than once
+ and reset the touch event emulation flag in window.internals.settings upon test completion.
+ * fast/events/touch/emulated-touch-iframe.html:
+ Reset the touch event emulation flag in window.internals.settings upon test completion.
+
2013-01-21 Andrey Lushnikov <[email protected]>
Web Inspector: fix highlight bug in DTE.
Modified: trunk/LayoutTests/fast/events/touch/emulate-touch-events.html (140320 => 140321)
--- trunk/LayoutTests/fast/events/touch/emulate-touch-events.html 2013-01-21 11:54:00 UTC (rev 140320)
+++ trunk/LayoutTests/fast/events/touch/emulate-touch-events.html 2013-01-21 12:06:57 UTC (rev 140321)
@@ -18,13 +18,21 @@
} else
debug(event.type);
- if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL)
+ if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
+ window.internals.settings.setTouchEventEmulationEnabled(false);
finishJSTest();
+ }
}
+function mouseMoveCallback(e) {
+ if (!lastEvent)
+ debug("Unexpected mousemove event received before touchstart");
+}
+
div.addEventListener("touchstart", touchEventCallback, false);
div.addEventListener("touchmove", touchEventCallback, false);
div.addEventListener("touchend", touchEventCallback, false);
+div.addEventListener("mousemove", mouseMoveCallback, false);
function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
{
Modified: trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html (140320 => 140321)
--- trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html 2013-01-21 11:54:00 UTC (rev 140320)
+++ trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html 2013-01-21 12:06:57 UTC (rev 140321)
@@ -21,6 +21,7 @@
}
debug("touchend (test will time out if broken)");
+ window.internals.settings.setTouchEventEmulationEnabled(false);
window.testRunner.notifyDone();
}
Modified: trunk/Source/WebCore/ChangeLog (140320 => 140321)
--- trunk/Source/WebCore/ChangeLog 2013-01-21 11:54:00 UTC (rev 140320)
+++ trunk/Source/WebCore/ChangeLog 2013-01-21 12:06:57 UTC (rev 140321)
@@ -1,3 +1,15 @@
+2013-01-21 Alexander Pavlov <[email protected]>
+
+ Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
+ https://bugs.webkit.org/show_bug.cgi?id=107419
+
+ Reviewed by Pavel Feldman.
+
+ mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
+
2013-01-21 Andrey Lushnikov <[email protected]>
Web Inspector: fix highlight bug in DTE.
Modified: trunk/Source/WebCore/page/EventHandler.cpp (140320 => 140321)
--- trunk/Source/WebCore/page/EventHandler.cpp 2013-01-21 11:54:00 UTC (rev 140320)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2013-01-21 12:06:57 UTC (rev 140321)
@@ -3981,7 +3981,7 @@
return false;
if (eventType == PlatformEvent::MouseMoved && !m_touchPressed)
- return false;
+ return true;
HitTestRequest request(HitTestRequest::Active);
MouseEventWithHitTestResults mev = prepareMouseEvent(request, event);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes