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

Issue 595421 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
(currently inactive on Chromium)
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

ScrollAnimated doesn't take viewport scale into account

Project Member Reported by dtapu...@chromium.org, Mar 16 2016

Issue description

When calling ScrollAnimated via a MouseWheel scroll with a zoomed in viewport (via pinch zoom) the page scrolls a lot more than it should. In contrast disable smooth scrolling and the page will scroll a smaller amount. 

The deltaX/deltaY on the mouse wheel event aren't not being scaled appropriately and are applying directly to the scroll delta of the view.





 

Comment 1 by skobes@chromium.org, Mar 16 2016

Cc: osh...@chromium.org

Comment 2 by ymalik@chromium.org, Mar 16 2016

This is because LayerTreeHostImpl::ScrollAnimated doesn't really have a notion of distributing scroll between the inner and outer viewports. It simply applies all of the delta without scaling to the InnerViewport without scaling. 

We probably need to do something like this https://code.google.com/p/chromium/codesearch#chromium/src/cc/layers/viewport.cc&rcl=1458143321&l=35

This is probably not super urgent since the number of people that pinch-zoom in and use the mousewheel to scroll is not that high.

Comment 3 by skobes@chromium.org, Mar 16 2016

 Issue 575019  is closely related.
Can we not defer to Main Thread scrolling if the viewport has a scale? So at least the user behavior is correct?

Comment 5 by bokan@chromium.org, Mar 17 2016

I don't understand how this is related to viewport distribution at all. The delta should be scaled before it even makes it to the scroll animator or viewport distribution.

Comment 6 by ymalik@chromium.org, Mar 17 2016

At #4, that's probably a simple solution for now. We probably want to do what  Issue 575019  suggests though.

At #5, This is for the impl thread. The way I understand it, the scaling actually happens after a call to LTHI::ScrollBy (see https://code.google.com/p/chromium/codesearch#chromium/src/cc/trees/layer_tree_host_impl.cc&rcl=1458199924&l=2932)
Status: Started (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 7 2016

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

commit 99740e85f5ebeb08b80a13b34144f7f7f2d1687e
Author: ymalik <ymalik@chromium.org>
Date: Thu Apr 07 04:18:13 2016

Connect LTHI::ScrollAnimated to cc::Viewport

This CL removed to hack in FindScrollLayerForDeviceViewportPoint to ensure
that we scroll the outer viewport and connects the LTHI::ScrollAnimated function
to the viewport class.

The viewport class distributes the scroll delta between the inner and outer
viewports and starts animation the layer which consumes more of the scroll delta.
Our animation system does not support running two scroll offset animations and this
is something that we may need to add in future.

BUG= 575019 , 595421 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#385657}

[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/BUILD.gn
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/cc_tests.gyp
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/input/input_handler.h
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/layers/viewport.cc
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/layers/viewport.h
[add] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/layers/viewport_unittest.cc
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/99740e85f5ebeb08b80a13b34144f7f7f2d1687e/cc/trees/property_tree.h

Status: Fixed (was: Started)

Sign in to add a comment