New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591918 link

Starred by 5 users

Issue metadata

Status: Fixed
Merged: issue 591503
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Page scrolls very slowly while selecting text on some websites with smooth scrolling

Reported by dmtab...@gmail.com, Mar 4 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36

Example URL:
https://bugs.chromium.org/p/chromium/issues/detail?id=591768

Steps to reproduce the problem:
1. Open some URLs that can scroll, examples are:
https://bugs.chromium.org/p/chromium/issues/detail?id=591768
chrome://gpu/
2. Click and select random text and hold the mouse button.
3. Scroll down.

What is the expected behavior?
It scrolls normally (and smoothly) until the end of the page.

What went wrong?
It scrolls but to some point the speed suddenly gets very slow (both upwards and downwards when this occurs).

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes r367941 works but r367953 doesn't. r367942 enables smooth scrolling.

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.75  Channel: stable
OS Version: Ubuntu 14.04 LTS
Flash Version: Shockwave Flash 20.0 r0

This does not reproduce on all websites. Some examples that do not exhibit this issue are:
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/UhE1rxzhkkk
https://www.google.com/chrome/browser/desktop/index.html

https://support.google.com/chrome_webstore/answer/1053346?hl=en works in r367953 but not in the current stable release.
 

Comment 1 by dmtab...@gmail.com, Mar 4 2016

PS. The scrolling is done by scrolling the mouse wheel.

Comment 2 by dmtab...@gmail.com, Mar 4 2016

A minimal HTML that reproduces this issue is attached. It just contains a div with position: fixed and lots of text to fill the screen.
591918.html
19.1 KB View Download
Cc: ashej...@chromium.org
Mergedinto: 591503
Status: Duplicate (was: Unconfirmed)
There is already issue reported for the same '591503', hence merging.

Feel free to un-merge, if someone feels otherwise.

Thank you!

Comment 4 by dmtab...@gmail.com, Mar 4 2016

591503 is different from this one.  Bug 591503  is just scrolling, without holding the left mouse button, while this issue is about scrolling with the left mouse button pressed.
I agree with comment #4. Also it can be reproduce on Windows.
Owner: skobes@chromium.org
Status: Assigned (was: Duplicate)
Cc: brajkumar@chromium.org
 Issue 589761  has been merged into this issue.
Status: Duplicate (was: Assigned)
Status: Assigned (was: Duplicate)
Agreed, not a dupe of 591503.  (It looks like Monorail won't clear the "Merged" field.)

Comment 11 by rtoy@chromium.org, Mar 4 2016

crblink-bug rotation triaging:

skobes: Please select the correct component.


Components: -Blink Blink>Scroll
Labels: Hotlist-SmoothScroll
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67a7b9d7646d67829d2991376cef8462ff4c6071

commit 67a7b9d7646d67829d2991376cef8462ff4c6071
Author: skobes <skobes@chromium.org>
Date: Wed Mar 09 18:44:13 2016

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}

[add] https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection-expected.txt
[add] https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection.html
[modify] https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/67a7b9d7646d67829d2991376cef8462ff4c6071/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp

Cc: ymalik@chromium.org
Status: Started (was: Assigned)
Labels: -Type-Bug M-49 OS-Chrome OS-Windows Type-Bug-Regression
Labels: Merge-Request-50 M-50
Verified in canary (51.0.2677.0).

Comment 17 by tin...@google.com, Mar 14 2016

Labels: -Merge-Request-50 Merge-Approved-50 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M50 (branch: 2661)
Project Member

Comment 18 by bugdroid1@chromium.org, Mar 14 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e06e96e69b17195071fd80772f331e957afd9465

commit e06e96e69b17195071fd80772f331e957afd9465
Author: Steve Kobes <skobes@chromium.org>
Date: Mon Mar 14 17:42:02 2016

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)

Review URL: https://codereview.chromium.org/1797623003 .

Cr-Commit-Position: refs/branch-heads/2661@{#215}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[add] https://crrev.com/e06e96e69b17195071fd80772f331e957afd9465/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection-expected.txt
[add] https://crrev.com/e06e96e69b17195071fd80772f331e957afd9465/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/scroll-during-selection.html
[modify] https://crrev.com/e06e96e69b17195071fd80772f331e957afd9465/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/e06e96e69b17195071fd80772f331e957afd9465/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp

Status: Fixed (was: Started)
Labels: TE-Verified-M50 TE-Verified-50.0.2661.37
Retested the above issue on Windows 7 & Ubuntu 14.04 with chrome version '50.0.2661.37' & working as intended. Tried scrolling with html provided in comment 2 & also on chrome://gpu & scroll slow down in speed observed. Hence marking the same as TE-Verified-50.0.2661.37.

Thank you!
 Issue 595610  has been merged into this issue.
Thanks @ashejole

Sign in to add a comment