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

Unified Diff: third_party/WebKit/Source/core/frame/RootFrameViewport.cpp

Issue 1775213002: Fix premature termination of scroll animations while selecting text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
index 48e18c43c4b9c8a31e222648a714a666140acf0b..c8edee42c1e03226c44856f5113290888876d6e9 100644
--- a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
@@ -109,9 +109,8 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent, co
LayoutRect viewRectInContent = intersection(visualRectInContent, frameRectInContent);
LayoutRect targetViewport =
ScrollAlignment::getRectToExpose(viewRectInContent, rectInContent, alignX, alignY);
- DoublePoint targetOffset(targetViewport.x(), targetViewport.y());
-
- setScrollPosition(targetOffset, scrollType, ScrollBehaviorInstant);
+ if (targetViewport != viewRectInContent)
+ setScrollPosition(DoublePoint(targetViewport.x(), targetViewport.y()), scrollType);
// RootFrameViewport only changes the viewport relative to the document so we can't change the input
// rect's location relative to the document origin.
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698