-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Liquid Glass] [macOS] Top overhang color extension layer is clipped when rubber-banding against the top of the page while zoomed in #47273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
EWS run on previous version of this PR (hash d1b02c6) |
EWS run on previous version of this PR (hash 0ef6e24) |
EWS run on previous version of this PR (hash 98dfbe2) |
EWS run on previous version of this PR (hash 1790d7d) |
EWS run on current version of this PR (hash 2ba6900) |
…when rubber-banding against the top of the page while zoomed in https://bugs.webkit.org/show_bug.cgi?id=295077 Followup to rdar://151482288 Reviewed by Abrar Rahman Protyasha. Small followup fix after the changes in 296667@main — the new top overhang color extension layer should have been positioned right above the root content layer; the width should match that of the root content layer (`frameView`'s `contentsSize`), and the bottom edge should meet the root content layer's top edge. In particular, the existing logic (without this adjustment) causes the width of the color extension layer to be shorter than required to span the full content width, when pinch-zooming into the web view and scrolling against the top right edge of the screen. * Source/WebCore/page/LocalFrameView.cpp: (WebCore::LocalFrameView::setContentsSize): * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): Move the call to `updateSizeAndPositionForTopOverhangColorExtensionLayer` into `updateRootLayerPosition`, after the existing calls to update overhang layers. (WebCore::RenderLayerCompositor::updateRootLayerPosition): (WebCore::RenderLayerCompositor::updateSizeAndPositionForTopOverhangColorExtensionLayer): See above. Note that the height of this color extension layer shouldn't really matter in practice — as long as it's tall enough that it covers at least any vertical distance when rubber-banding. I arbitrarily chose the visible height of the frame view here, assuming that users wouldn't need to rubber-band the page so far, such that the page is not even visible. * Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm: (TestWebKitAPI::TEST(ObscuredContentInsets, TopOverhangColorExtensionLayer)): Augment this API test to additionally sanity check the frame and background of the color extension layer, both before and after zooming in. In both cases, the width should be consistent with the root content layer, and it should be positioned such that the bottom of the layer is aligned to the top of the root content layer. Canonical link: https://commits.webkit.org/296704@main
2ba6900
to
6cc2003
Compare
Committed 296704@main (6cc2003): https://commits.webkit.org/296704@main Reviewed commits have been landed. Closing PR #47273 and removing active labels. |
6cc2003
2ba6900
🧪 mac-AS-debug-wk2