Bug 207826

Summary: An RTL document with scroll snap scrolls to the wrong place on load
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: ASSIGNED ---    
Severity: Normal CC: mrobinson, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193671
Bug Depends on: 214788    
Bug Blocks:    
Description Flags
Testcase none

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.