New issue
Advanced search Search tips

Issue 826416 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 497851


Participants' hotlists:
Snap-Points-M69-Block


Sign in to add a comment

[css-scroll-snap] scroll snap should work with smooth scrolling

Project Member Reported by majidvp@chromium.org, Mar 27 2018

Issue description

Currently, smooth scrolling on compositor doe snot snap. To test, try any 
example page [1] with a regular mouse wheel on Linux.

This triggers smooth scroll animation but when animation ends [2] it calls 
ScrollEndImpl() bypassing snap logic.
 

I have attached a trace taken using Chrome Canary: 67.0.3381.0 (Official Build) canary (64-bit) (cohort: Clang-64)



[1] http://syj10.github.io/scroll-snap-demo.html
[2] LayerTreeHostImpl::ScrollOffsetAnimationFinished()


 
trace_wheel-snap-broken.json.gz
1.7 MB Download
Actually, this was discovered on a Windows 10 machine. :facepalm:
Blocking: 497851
Cc: sunyunjia@chromium.org
 Issue 826379  has been merged into this issue.
Not sure if it's worth bringing up to the csswg before asking an implementor, but would offering strictness per axis add significant overhead?

So instead of just 'scroll-snap-type: both mandatory' or 'scroll-snap-type: both proximity', something like 'scroll-snap-type: x proximity, y mandatory'?
Status: Started (was: Assigned)
re #4: Feel free to bring up with WG, if there is agreement that there are strong usecases for it and it should be added then we will consider.

I don't think it will have a lot of overhead in our implementation.

Summary: [css-scroll-snap] scroll snap should work with smooth scrolling (was: [css-scroll-snap] scrolling snap should work with smooth scrolling)
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 14 2018

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

commit 9debaa01d028062bf84a31ea663aafc69de68dd7
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Thu Jun 14 00:40:41 2018

Snap after animated wheel scroll.

This patch supports snapping after animated wheel scroll.

More generally, we should snap after a scroll animation if the
animation wasn't for snapping itself.

Bug:  826416 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic1dba95157bd4d7d36f25b92646c86561b2ecbe9
Reviewed-on: https://chromium-review.googlesource.com/1050398
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567066}
[modify] https://crrev.com/9debaa01d028062bf84a31ea663aafc69de68dd7/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/9debaa01d028062bf84a31ea663aafc69de68dd7/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/9debaa01d028062bf84a31ea663aafc69de68dd7/cc/trees/layer_tree_host_impl_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment