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

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

Issue 558753002: Correctly mark all mouse events derived from touch with FromTouch (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « no previous file | Source/web/PopupContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 8aa13a37349ccc9df8cfd1a77e280f12a1f8f469..80bb52fe51fd397b52dc83e4d72286eb9d851a21 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1226,9 +1226,6 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
}
m_mouseDownWasInSubframe = false;
- // Mouse events simulated from touch should not hit-test again.
- ASSERT(!mouseEvent.fromTouch());
-
HitTestRequest request(HitTestRequest::Active);
// Save the document point we generate in case the window coordinate is invalidated by what happens
// when we dispatch the event.
@@ -2288,11 +2285,11 @@ bool EventHandler::handleGestureLongPress(const GestureEventWithHitTestResults&
m_longTapShouldInvokeContextMenu = false;
if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled() && m_frame->view()) {
PlatformMouseEvent mouseDownEvent(adjustedPoint, gestureEvent.globalPosition(), LeftButton, PlatformEvent::MousePressed, 1,
- gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::RealOrIndistinguishable, WTF::currentTime());
+ gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::FromTouch, WTF::currentTime());
m_mouseDown = mouseDownEvent;
PlatformMouseEvent mouseDragEvent(adjustedPoint, gestureEvent.globalPosition(), LeftButton, PlatformEvent::MouseMoved, 1,
- gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::RealOrIndistinguishable, WTF::currentTime());
+ gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::FromTouch, WTF::currentTime());
HitTestRequest request(HitTestRequest::ReadOnly);
MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseDragEvent);
m_didStartDrag = false;
@@ -2802,7 +2799,7 @@ bool EventHandler::sendContextMenuEventForGesture(const GestureEventWithHitTestR
PlatformEvent::Type eventType = PlatformEvent::MousePressed;
#endif
- PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishable, WTF::currentTime());
+ PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1, false, false, false, false, PlatformMouseEvent::FromTouch, WTF::currentTime());
// To simulate right-click behavior, we send a right mouse down and then
// context menu event.
// FIXME: Send HitTestResults to avoid redundant hit tests.
« no previous file with comments | « no previous file | Source/web/PopupContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698