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

Issue 1775213002: 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:
bokan
CC:
chromium-reviews, blink-reviews, ymalik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071 Cr-Commit-Position: refs/heads/master@{#380162}

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: 13 (8 generated)
skobes
4 years, 9 months ago (2016-03-09 00:43:14 UTC) #6
bokan
lgtm
4 years, 9 months ago (2016-03-09 18:34:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775213002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775213002/1
4 years, 9 months ago (2016-03-09 18:35:41 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-09 18:44:22 UTC) #11
commit-bot: I haz the power
4 years, 9 months ago (2016-03-09 18:45:28 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071
Cr-Commit-Position: refs/heads/master@{#380162}

Powered by Google App Engine
This is Rietveld 408576698