New issue
Advanced search Search tips

Issue 826359 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 497851


Participants' hotlists:
Snap-Points-M69-Block


Sign in to add a comment

[css-scroll-snap] Snap points should consider large area visibility requirement

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

Issue description

According to the spec, https://drafts.csswg.org/css-scroll-snap-1/

If the snap area is larger than the snapport in a particular axis, then any scroll position in which the snap area covers the snapport, and the distance between the geometrically previous and subsequent snap positions in that axis is larger than size of the snapport in that axis, is a valid snap position in that axis.

 
Summary: [css-scroll-snap] Snap points should consider large area visibility requirement (was: CSSScrollSnap should consider large area visibility requirement)
Blockedon: 855717
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 26 2018

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

commit c11285b3274b0f59a4baf2236d978be695eb1f48
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Tue Jun 26 00:15:08 2018

Allows panning inside overflowing snap areas.

According to the spec[1], if an overflowing snap area covers the
snapport in one axis and the distance between the previous snap
position and the next snap position is larger than the size of the
snapport, the current scroll position is a valid snap position.

This patch also rewrites the data structure of SnapAreaData and
SnapContainerData so that they only keep the rect and calculate the
snap points, visible region, overflow condition only when scroll
occurs.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-overflow

Bug:  826359 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iec1ebe48abe8d2653128ac2af4e6137a14c05502
Reviewed-on: https://chromium-review.googlesource.com/1075558
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570255}
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data.cc
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data.h
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data_unittest.cc
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/trees/layer_tree_host_impl_unittest.cc
[add] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/WebKit/LayoutTests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/WebKit/LayoutTests/external/wpt/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator.cc
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator.h
[modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc

Status: Fixed (was: Assigned)
Blockedon: -855717

Sign in to add a comment