When a scrollable element has padding added to it, the last item can never be scrolled into view. This appears to be because there's not enough scrollable area added. Potentially related: the `scrollWidth` property appears to be smaller than that of Chrome and Firefox. Reduced repro (see Firefox/Chrome handling): https://jsfiddle.net/comp615/Lf15jkgp/15/ The example kind of illustrates Twitter's use case. We want to show a preview/peek of the next item, or to overflow the parent, while still aligning the scroller to the parent layout). Potentially related bugs: #95032 #201453
This does indeed look like a rather serious bug.
<rdar://problem/88495053>
Created attachment 453268 [details] Test case
This works for vertical scrollers, but not horizontal scrollers. For vertical scrollers, the padding is taken into account by the `oldClientAfterEdge` value passed in to `computeOverflow()`, which comes from clientLogicalBottom(). But there is no equivalent logic for horizontal padding.
This is about the computation of layout overflow.
Created attachment 460292 [details] Patch
Created attachment 460305 [details] Patch
Created attachment 460330 [details] Patch
https://github.com/w3c/csswg-drafts/issues/129
Related: https://github.com/w3c/csswg-drafts/issues/129
Created attachment 460392 [details] Test reduction
Created attachment 460424 [details] Patch
Created attachment 460426 [details] Patch
Committed r295765 (251770@main): <https://commits.webkit.org/251770@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460426 [details].