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

Unified Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2212543002: Disable scroll anchoring if the user engages in a drag motion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove irrelevant comment Created 4 years, 4 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/PointerEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index 3fe3d505ceb762ad2aa1113063f61d54fca70961..5a18aae0841dae474c34bcf3d723dce1ebd0c350 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -153,6 +153,15 @@ WebInputEventResult PointerEventManager::dispatchPointerEvent(
}
}
+ if (pointerEvent->type() == EventTypeNames::pointermove
+ && m_pointerEventFactory.isActiveButtonsState(pointerEvent->pointerId())) {
+ // If we see a pointermove while a button is down, presumably the user
+ // is engaging in drag motion.
+ // TODO(ymalik): This will need to be updated to account for pointermove
+ // events that occur within the slop region (see crbug.com/632067).
+ m_frame->view()->setUserMayHaveDragged(true);
Navid Zolghadr 2016/08/04 18:11:00 Maybe for the events that cannot possibly cause sc
+ }
+
if (!RuntimeEnabledFeatures::pointerEventEnabled())
return WebInputEventResult::NotHandled;
if (!checkForListener || target->hasEventListeners(eventType)) {

Powered by Google App Engine
This is Rietveld 408576698