Bug 220676

Summary: Scroll position is lost when homing out and resuming Safari on iOS
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, ews-watchlist, fred.wang, ggaren, jamesr, luiz, simon.fraser, thorton, tonikitoo
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2021-01-15 16:41:43 PST
Scroll position is lost when homing out and resuming Safari on iOS
Comment 1 Simon Fraser (smfr) 2021-01-15 16:45:16 PST
Created attachment 417749 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-01-15 16:45:45 PST
<rdar://problem/71534598>
Comment 3 EWS 2021-01-15 19:44:43 PST
Committed r271551: <https://trac.webkit.org/changeset/271551>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417749 [details].
Comment 4 Geoffrey Garen 2021-01-19 10:53:24 PST
I believe we have code that avoids sending certain JS events during snapshotting (resize and orientation). Maybe it would be less risky to run the scrolling code and just avoid sending the JS event that would trigger programmatic scroll?
Comment 5 Simon Fraser (smfr) 2021-01-19 10:57:02 PST
The programmatic scroll is not from JS. It's from layout (when you layout narrow, and then wide, you may need to adjust your scroll offset because the current one is no longer valid).