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

Unified Diff: third_party/WebKit/Source/core/page/AutoscrollController.cpp

Issue 2355643002: Selection-autoscroll should be triggered when the pointer is in the border belt. (Closed)
Patch Set: Patch Created 4 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
Index: third_party/WebKit/Source/core/page/AutoscrollController.cpp
diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
index 734071ef3706067c5e2988db4662bc601719f9b0..53d3b702e86c6e159d8e70cd281c0cb2ef5563bb 100644
--- a/third_party/WebKit/Source/core/page/AutoscrollController.cpp
+++ b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
@@ -234,6 +234,8 @@ void AutoscrollController::animate(double)
}
EventHandler& eventHandler = m_autoscrollLayoutObject->frame()->eventHandler();
+ IntSize offset = m_autoscrollLayoutObject->calculateAutoscrollDirection(eventHandler.lastKnownMousePosition());
+ IntPoint selectionPoint = eventHandler.lastKnownMousePosition() + offset;
switch (m_autoscrollType) {
case AutoscrollForDragAndDrop:
if (WTF::monotonicallyIncreasingTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
@@ -245,7 +247,7 @@ void AutoscrollController::animate(double)
return;
}
eventHandler.updateSelectionForMouseDrag();
- m_autoscrollLayoutObject->autoscroll(eventHandler.lastKnownMousePosition());
+ m_autoscrollLayoutObject->autoscroll(selectionPoint);
break;
case NoAutoscroll:
break;

Powered by Google App Engine
This is Rietveld 408576698