Summary: | Content offset in this codepen when switching tabs | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||
Component: | Scrolling | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | ayumi_kojima, changseok, cmarcelo, esprehn+autocc, ews-watchlist, fred.wang, glenn, jamesr, kondapallykalyan, luiz, pdr, simon.fraser, thorton, tonikitoo, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | Safari Technology Preview | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
URL: | https://codepen.io/isladjan/pen/abdyPBw | ||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=232148 | ||||||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2021-10-19 15:07:09 PDT
The compositing layers for the RenderSVGRoot and its siblings has different positions after switching tabs I think this is scrolling tree related. When we rebuild the scrolling tree after the view is reattached on tab switch, the iframe's scrolling tree node has a 0,0 scroll position rather than the correct one, causing the position:fixed to get mis-positioned. Created attachment 441985 [details]
Patch
Created attachment 442049 [details]
Patch
Created attachment 442063 [details]
Patch
Comment on attachment 442063 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442063&action=review > Tools/TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm:39 > +static void synthesizeWheelEvents(NSView *view, CGPoint locationInView, CGSize delta) Surely not unique to this test, should it be on TestWKWebView? > Tools/TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm:82 > + return [obj hasPrefix:@" (last committed scroll position"]; Somewhat eww > Tools/TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm:115 > + NSWindow *hostWindow = [webView window]; Doesn't TestWKWebView have helpers for moving in and out of window too? I guess your test is platform specific so it doesn't really matter. > Tools/TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm:125 > + scrollY = waitForScrollEventAndReturnScrollY(webView.get(), [](WKWebView* webView) { Star's on the wrong side etc. Created attachment 442070 [details]
Patch
Committed r284654 (243374@main): <https://commits.webkit.org/243374@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442070 [details]. Reverted r284654 for reason: Reverting because this commit caused scrolling tests to fail Committed r284685 (243405@main): <https://commits.webkit.org/243405@main> Created attachment 442190 [details]
Patch
Committed r284738 (243447@main): <https://commits.webkit.org/243447@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442190 [details]. |