-
Notifications
You must be signed in to change notification settings - Fork 50
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
[filter-effects-2] backdrop-filter and the root element #557
Labels
Comments
It looks like the current behaviour in blink/gecko is that the canvas surface color is included in the captured backdrop if no other 'backdrop root' properties are present (like What is the expected behaviour if the |
webkit-commit-queue
pushed a commit
to mattwoodrow/WebKit
that referenced
this issue
Mar 27, 2024
… memory. https://bugs.webkit.org/show_bug.cgi?id=271340 <rdar://123831236> Reviewed by Simon Fraser. The backdrop-filter spec requires that the root element be a backdrop root, and creates a separate compositing layer, separate from the base background color of the view. However, most tests are expecting the base white color to be included in the captured backdrop. I've filed w3c/fxtf-drafts#557 to try resolve the spec/implementation mismatch. This change makes the root element only a backdrop root if it also has one of the other grouping graphics properties. Notably not included is the 'view-transition-name' property, since this is present on the root as a default UA style. It also changes RenderView::rootElementShouldPaintBaseBackground so that we don't paint the base background color as part of the root element's background, if we did end up making the root element a backdrop root. It also ensures the default value of CSSUnprefixedBackdropFilterEnabled is always false for WebKitLegacy, rather than correctly support root background rendering with backdrop filter. * LayoutTests/compositing/filters/backdrop-filter-root-element-no-backdrop-root-expected.txt: Added. * LayoutTests/compositing/filters/backdrop-filter-root-element-no-backdrop-root.html: Added. * LayoutTests/css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt: * LayoutTests/css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding-expected.txt: * LayoutTests/css3/filters/backdrop/backdrop-filter-with-cliprect-expected.txt: * LayoutTests/css3/filters/backdrop/backdrop-filter-with-mask-expected.txt: * LayoutTests/css3/filters/backdrop/backdrop-with-visibility-hidden-changing-expected.txt: * LayoutTests/css3/filters/backdrop/backdrop-with-visibility-hidden-expected.txt: * LayoutTests/css3/filters/backdrop/resource-use-add-more-layers-expected.txt: * LayoutTests/css3/filters/backdrop/resource-use-excessive-expected.txt: * LayoutTests/css3/filters/backdrop/resource-use-ok-expected.txt: * LayoutTests/css3/filters/backdrop/resource-use-remove-some-layers-expected.txt: * LayoutTests/platform/glib/compositing/filters/backdrop-filter-root-element-no-backdrop-root-expected.txt: Added. * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-filter-with-cliprect-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-filter-with-mask-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-with-visibility-hidden-changing-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/backdrop-with-visibility-hidden-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/resource-use-add-more-layers-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/resource-use-excessive-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/resource-use-ok-expected.txt: * LayoutTests/platform/glib/css3/filters/backdrop/resource-use-remove-some-layers-expected.txt: * LayoutTests/platform/ios/css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt: * LayoutTests/platform/ios/css3/filters/backdrop/backdrop-filter-with-cliprect-expected.txt: * LayoutTests/platform/ios/css3/filters/backdrop/backdrop-filter-with-mask-expected.txt: * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeCanBeBackdropRoot const): * Source/WebCore/rendering/RenderView.cpp: (WebCore::RenderView::rootElementShouldPaintBaseBackground const): Canonical link: https://commits.webkit.org/276749@main
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like many of the current WPT tests are capturing the backdrop of a document without a background-color value set anywhere, and expecting to capture white (see backdrop-filter-basic.html)
My understanding is that the default background color is transparent, and it's only the UA-specific 'canvas surface' that would be providing a white background color in this case - https://www.w3.org/TR/css-backgrounds-3/#special-backgrounds.
We also likely want to clarify what happens when there is a background on the root element (or <body>), but it gets propagated to the canvas background. If the root element itself is the backdrop root, then I'd expect the propagated background to not be included in the captured backdrop.
The text was updated successfully, but these errors were encountered: