Bug 226572 - [css-scroll-snap] Scroll snap offsets are interpreted as scroll positions in ScrollableArea
Summary: [css-scroll-snap] Scroll snap offsets are interpreted as scroll positions in ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords: InRadar
Depends on:
Blocks: 218115
  Show dependency treegraph
 
Reported: 2021-06-03 02:05 PDT by Martin Robinson
Modified: 2021-06-15 04:09 PDT (History)
2 users (show)

See Also:


Attachments
Patch (8.22 KB, patch)
2021-06-03 05:32 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (8.66 KB, patch)
2021-06-15 01:26 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2021-06-03 02:05:48 PDT
In ScrollableArea when there is an initial scroll-snap offset or while resnapping after layout, scroll offsets are interpreted as scroll positions. This leads to incorrect scroll positions when dealing with RTL layouts.
Comment 1 Martin Robinson 2021-06-03 05:32:44 PDT
Created attachment 430462 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-06-03 10:18:47 PDT
Comment on attachment 430462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430462&action=review

Please check the test failures.

> Source/WebCore/platform/ScrollableArea.cpp:516
> +IntPoint ScrollableArea::nearestActiveSnapPoint(const IntPoint& currentOffset)

Maybe we should rename this nearestActiveSnapPointForOffset(). The argument should be a ScrollOffset.
Comment 3 Martin Robinson 2021-06-04 00:24:47 PDT
It looks like these Mac failures are due to a related issue at bug 226630. I have a fix for that, but it depends on bug 226538.
Comment 4 Radar WebKit Bug Importer 2021-06-10 02:06:19 PDT
<rdar://problem/79128519>
Comment 5 Martin Robinson 2021-06-15 01:26:10 PDT
Created attachment 431414 [details]
Patch
Comment 6 EWS 2021-06-15 04:09:43 PDT
Committed r278868 (238812@main): <https://commits.webkit.org/238812@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431414 [details].