Title: [140311] trunk
Revision
140311
Author
[email protected]
Date
2013-01-21 00:49:54 -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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (140310 => 140311)


--- trunk/LayoutTests/ChangeLog	2013-01-21 08:32:32 UTC (rev 140310)
+++ trunk/LayoutTests/ChangeLog	2013-01-21 08:49:54 UTC (rev 140311)
@@ -1,3 +1,12 @@
+2013-01-20  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.
+
 2013-01-21  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Update the RTCPeerConnection states to match the latest specification

Modified: trunk/LayoutTests/fast/events/touch/emulate-touch-events.html (140310 => 140311)


--- trunk/LayoutTests/fast/events/touch/emulate-touch-events.html	2013-01-21 08:32:32 UTC (rev 140310)
+++ trunk/LayoutTests/fast/events/touch/emulate-touch-events.html	2013-01-21 08:49:54 UTC (rev 140311)
@@ -9,6 +9,7 @@
 var div = document.getElementById("touchtarget");
 var lastEvent = null;
 var touchEventsReceived = 0;
+var mouseMoveEventsReceived = 0;
 var EXPECTED_TOUCH_EVENTS_TOTAL = 3;
 
 function touchEventCallback() {
@@ -22,9 +23,15 @@
         finishJSTest();
 }
 
+function mouseMoveCallback(e) {
+    if (++mouseMoveEventsReceived === 2)
+        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/Source/WebCore/ChangeLog (140310 => 140311)


--- trunk/Source/WebCore/ChangeLog	2013-01-21 08:32:32 UTC (rev 140310)
+++ trunk/Source/WebCore/ChangeLog	2013-01-21 08:49:54 UTC (rev 140311)
@@ -1,3 +1,15 @@
+2013-01-20  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  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Update the RTCPeerConnection states to match the latest specification

Modified: trunk/Source/WebCore/page/EventHandler.cpp (140310 => 140311)


--- trunk/Source/WebCore/page/EventHandler.cpp	2013-01-21 08:32:32 UTC (rev 140310)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2013-01-21 08:49:54 UTC (rev 140311)
@@ -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

Reply via email to