Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: Source/WebCore/page/EventHandler.cpp

Issue 12561004: Merge 144608 "Web Inspector: touchmove not emulated inside iframe" (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698