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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 2042333006: Reset drag state variables on mouse up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying the comments Created 4 years, 5 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
Index: third_party/WebKit/Source/core/input/EventHandler.h
diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h
index 019e3ee1d79f250cc640c6086c56b32c8f97b3a6..3f44d21a35070704b772816d16cae56856c44d84 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.h
+++ b/third_party/WebKit/Source/core/input/EventHandler.h
@@ -293,8 +293,14 @@ private:
bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator);
bool tryStartDrag(const MouseEventWithHitTestResults&);
+
+ // Clears drag target and related states. It is called when drag is done or canceled.
void clearDragState();
+ // Resets the state that indicates the next events could cause a drag. It is called when
+ // we realize the next events should not cause drag based on the drag heuristics.
+ void clearDragHeuristicState();
+
WebInputEventResult dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&);
bool dragHysteresisExceeded(const IntPoint&) const;

Powered by Google App Engine
This is Rietveld 408576698