Bug 207826 - An RTL document with scroll snap scrolls to the wrong place on load
Summary: An RTL document with scroll snap scrolls to the wrong place on load
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
Keywords: InRadar
Depends on: 214788
  Show dependency treegraph
Reported: 2020-02-15 21:03 PST by Simon Fraser (smfr)
Modified: 2021-07-07 13:28 PDT (History)
4 users (show)

See Also:

Testcase (1.24 KB, text/html)
2020-02-15 21:03 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-02-15 21:03:42 PST
Created attachment 390884 [details]

Loading at the testcase on iOS causes the page to scroll all the way to the left, but it should remain scrolled to the right.

There are some ordering issues where we fail to compute the non-zero initial snap index in RTL.
Comment 1 Simon Fraser (smfr) 2020-02-15 21:04:42 PST
The problem is that we push data into the scrolling tree via RenderLayerCompositor::updateScrollingNodeForScrollingRole(), but this runs before updateScrollSnapState() which runs as a post-layout task.
Comment 2 Radar WebKit Bug Importer 2020-09-23 10:20:00 PDT
Comment 3 Martin Robinson 2021-07-07 09:13:27 PDT
I think this is working now? Perhaps this was improved by recent fixes around treating points as scroll offsets versus scroll positions in ScrollableArea?
Comment 4 Simon Fraser (smfr) 2021-07-07 13:28:44 PDT
I still see issues when first loading the test case on iPhone, with iOS 15.