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

Issue 1797623003: Fix premature termination of scroll animations while selecting text. (Closed)

Created:
4 years, 9 months ago by skobes
Modified:
4 years, 9 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2661
Target Ref:
refs/pending/branch-heads/2661
Project:
chromium
Visibility:
Public.

Description

Fix premature termination of scroll animations while selecting text. During text selection, AutoscrollController calls scrollIntoView continuously to make the scroll position follow the selection. This had the side effect of resetting ScrollAnimator before it could finish a main-thread smooth scroll. There are early returns for zero-delta scrolls in FrameView::setScrollPosition and RootFrameViewport::distributeScrollBetweenViewports, but scrollIntoView's conversion of fractional scroll offsets to LayoutUnits resulted in a very small (< 1px) non-zero scroll delta. We now avoid this by directly comparing the input and output of getRectToExpose and skipping the unneeded calls to setScrollPosition. BUG=591918 Review URL: https://codereview.chromium.org/1775213002 Cr-Commit-Position: refs/heads/master@{#380162} (cherry picked from commit 67a7b9d7646d67829d2991376cef8462ff4c6071) Committed: https://chromium.googlesource.com/chromium/src/+/e06e96e69b17195071fd80772f331e957afd9465

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -10 lines) Patch
A third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection.html View 1 chunk +39 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection-expected.txt View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/RootFrameViewport.cpp View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
skobes
4 years, 9 months ago (2016-03-14 17:44:20 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e06e96e69b17195071fd80772f331e957afd9465.

Powered by Google App Engine
This is Rietveld 408576698