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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140321
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-01-21 Alexander Pavlov <apavlov@chromium.org>
+
+ 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 <lushnikov@chromium.org>
Web Inspector: fix highlight bug in DTE.
} 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)
{
}
debug("touchend (test will time out if broken)");
+ window.internals.settings.setTouchEventEmulationEnabled(false);
window.testRunner.notifyDone();
}
+2013-01-21 Alexander Pavlov <apavlov@chromium.org>
+
+ 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 <lushnikov@chromium.org>
Web Inspector: fix highlight bug in DTE.
return false;
if (eventType == PlatformEvent::MouseMoved && !m_touchPressed)
- return false;
+ return true;
HitTestRequest request(HitTestRequest::Active);
MouseEventWithHitTestResults mev = prepareMouseEvent(request, event);