From: https://fullscreen.spec.whatwg.org/#new-stacking-layer Ancestor elements with overflow, opacity, masks, etc. cannot affect it.
This needs a test too, unfortunately there's no WPT for this.
<rdar://problem/82158248>
https://github.com/web-platform-tests/wpt/pull/30104
Created attachment 435945 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Committed r281299 (240723@main): <https://commits.webkit.org/240723@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 435945 [details].
Comment on attachment 435945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435945&action=review > Source/WebCore/rendering/RenderLayerBacking.cpp:2435 > + // Top layer elements should not be affected by parent elements opacity > + if (m_owningLayer.establishesTopLayer()) > + return finalOpacity; This seems like the wrong way to fix this. Here we're in compositing code, but don't we want to reset opacity in style? If for some reason we end up not using compositing for top layers, we'll get bad rendering.
(In reply to Simon Fraser (smfr) from comment #7) > Comment on attachment 435945 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=435945&action=review > > > Source/WebCore/rendering/RenderLayerBacking.cpp:2435 > > + // Top layer elements should not be affected by parent elements opacity > > + if (m_owningLayer.establishesTopLayer()) > > + return finalOpacity; > > This seems like the wrong way to fix this. Here we're in compositing code, > but don't we want to reset opacity in style? If for some reason we end up > not using compositing for top layers, we'll get bad rendering. I filed https://bugs.webkit.org/show_bug.cgi?id=229350