Index: Source/WebCore/page/EventHandler.cpp |
=================================================================== |
--- Source/WebCore/page/EventHandler.cpp (revision 145698) |
+++ Source/WebCore/page/EventHandler.cpp (working copy) |
@@ -1611,14 +1611,6 @@ |
RefPtr<FrameView> protector(m_frame->view()); |
MaximumDurationTracker maxDurationTracker(&m_maxMouseMovedDuration); |
- |
-#if ENABLE(TOUCH_EVENTS) |
- // FIXME: this should be moved elsewhere to also be able to dispatch touchcancel events. |
- bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(event); |
- if (defaultPrevented) |
- return true; |
-#endif |
- |
HitTestResult hoveredNode = HitTestResult(LayoutPoint()); |
bool result = handleMouseMoveEvent(event, &hoveredNode); |
@@ -1658,6 +1650,12 @@ |
if (!m_frame) |
return false; |
+#if ENABLE(TOUCH_EVENTS) |
+ bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); |
+ if (defaultPrevented) |
+ return true; |
+#endif |
+ |
RefPtr<FrameView> protector(m_frame->view()); |
setLastKnownMousePosition(mouseEvent); |
@@ -4009,15 +4007,15 @@ |
if (eventType != PlatformEvent::MouseMoved && eventType != PlatformEvent::MousePressed && eventType != PlatformEvent::MouseReleased) |
return false; |
- if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) |
- return true; |
- |
HitTestRequest request(HitTestRequest::Active); |
MouseEventWithHitTestResults mev = prepareMouseEvent(request, event); |
- |
if (mev.scrollbar() || subframeForHitTestResult(mev)) |
return false; |
+ // The order is important. This check should follow the subframe test: http://webkit.org/b/111292. |
+ if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) |
+ return true; |
+ |
SyntheticSingleTouchEvent touchEvent(event); |
return handleTouchEvent(touchEvent); |
} |