| Summary: | [css-scroll-snap] Properly handle overflowing snap areas | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Martin Robinson <mrobinson> | ||||||||||
| Component: | CSS | Assignee: | Martin Robinson <mrobinson> | ||||||||||
| Status: | RESOLVED DUPLICATE | ||||||||||||
| Severity: | Normal | CC: | cmarcelo, ews-watchlist, fred.wang, jamesr, luiz, tonikitoo | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Martin Robinson
2021-03-15 01:17:37 PDT
Created attachment 423157 [details]
Patch
Created attachment 423166 [details]
Patch
Created attachment 423189 [details]
Patch
Created attachment 423311 [details]
Patch
Here's some background on these changes as they are a bit larger and more complicated than normal: Before this change when snap points were calculated after a layout and a ScrollSnapOffsetsInfo was created with both the offsets of the snap points and a set of ranges of offsets where no snapping occurred. These ranges were useful because it made it simple to determine if a particular offset was subject to snapping. With the implementation of this part of the specification, the range-based approach is not as suitable because snap areas (which may overlap) now affect whether or not a scroll will snap to a snap point. Instead, this change take a lazier approach. During scrolling, we walk through each potential snap offset and look at the associated snap area. This information to determine if the destination scroll offset falls onto a snap area that overflows the snapport or if it is subject to proximity snapping. *** This bug has been marked as a duplicate of bug 223021 *** |