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:    
Attachments:
Description Flags
Testcase none

Simon Fraser (smfr)
Reported 2020-02-15 21:03:42 PST
Created attachment 390884 [details] Testcase 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.
Attachments
Testcase (1.24 KB, text/html)
2020-02-15 21:03 PST, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 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.
Radar WebKit Bug Importer
Comment 2 2020-09-23 10:20:00 PDT
Martin Robinson
Comment 3 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?
Simon Fraser (smfr)
Comment 4 2021-07-07 13:28:44 PDT
I still see issues when first loading the test case on iPhone, with iOS 15.
Note You need to log in before you can comment on or make changes to this bug.