https://codepen.io/smfr/pen/VwyzQvb https://www.w3.org/TR/css-contain-1/#layout-containment says that layout containment creates containing block for position:fixed. That doesn't work in WebKit.
<rdar://problem/91364127>
I noticed the problem goes away if RenderLayerCompositor treats contain: layout always as a composited layer. However I guess it should work for non composited too...
Seems like `RenderElement::canContainFixedPositionObjects()` already considers containment so not sure why this is broken. Maybe RenderLayer::flagsForUpdateLayerPositions() also needs fixing.
Created attachment 457706 [details] Patch
Comment on attachment 457706 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457706&action=review > Source/WebCore/rendering/RenderBox.cpp:2325 > + else if (hasTransform() || shouldApplyLayoutContainment(*this)) This should share code with canContainFixedPositionObjects()
Created attachment 457744 [details] Patch
Created attachment 457806 [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
Comment on attachment 457706 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457706&action=review >> Source/WebCore/rendering/RenderBox.cpp:2325 >> + else if (hasTransform() || shouldApplyLayoutContainment(*this)) > > This should share code with canContainFixedPositionObjects() Done.
Comment on attachment 457806 [details] Patch RenderSVGRoot::mapLocalToContainer() and RenderBox::mapAbsoluteToLocalPoint() need the same change.
Created attachment 458086 [details] Patch
Committed r293209 (249880@main): <https://commits.webkit.org/249880@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458086 [details].