ScrollAnimated doesn't take viewport scale into account |
|||
Issue descriptionWhen 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.
,
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.
,
Mar 16 2016
Issue 575019 is closely related.
,
Mar 17 2016
Can we not defer to Main Thread scrolling if the viewport has a scale? So at least the user behavior is correct?
,
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.
,
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)
,
Apr 6 2016
,
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
,
Apr 8 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by skobes@chromium.org
, Mar 16 2016