[Webkit-unassigned] [Bug 223021] CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 17 03:15:18 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=223021
Martin Robinson <mrobinson at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #423466| |review?
Flags| |
--- Comment #2 from Martin Robinson <mrobinson at webkit.org> ---
Created attachment 423466
--> https://bugs.webkit.org/attachment.cgi?id=423466&action=review
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210317/c8544076/attachment.htm>
More information about the webkit-unassigned
mailing list