Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 286da457d7a6bc70021bd2f9e36774e1f7b2f381 https://github.com/WebKit/WebKit/commit/286da457d7a6bc70021bd2f9e36774e1f7b2f381 Author: Matt Woodrow <mattwood...@apple.com> Date: 2025-06-08 (Sun, 08 Jun 2025)
Changed paths: A LayoutTests/fast/block/missing-absolute-positioned-content-expected.html A LayoutTests/fast/block/missing-absolute-positioned-content-inline-expected.html A LayoutTests/fast/block/missing-absolute-positioned-content-inline.html A LayoutTests/fast/block/missing-absolute-positioned-content.html M Source/WebCore/rendering/RenderBlock.cpp M Source/WebCore/rendering/RenderBlock.h M Source/WebCore/rendering/RenderBoxModelObject.cpp M Source/WebCore/rendering/RenderBoxModelObject.h M Source/WebCore/rendering/RenderInline.cpp Log Message: ----------- Inline elements don't relayout out-of-flow descendants when they become containing blocks for position:fixed descendants. https://bugs.webkit.org/show_bug.cgi?id=294189 Reviewed by Alan Baradlay. RenderInline::styleWillChange currently only handles the case where the element is no longer a containing block, but not where it newly is one. It also incorrectly handles the case where the parent was previously holding out-of-flows as a delegate for the inline, and now is the actual containing block for those out-of-flows. The current code makes no change, and it needs to at least request layout since the actual containing block (and thus sizing) has changed. There's also a third issue where RenderBlock early exits after removing position:fixed out-of-flows from the old containing block, but may also need to remove position:absolute out-of-flows from their containing block (which could be different). The fix moves the existing RenderBlock code into RenderBoxModelObject, so that both renderer types can use it, and removes the early return. It handles the parent changing from being a delegate to the actual containing block by just removing the out-of-flows regardless. This is probably less performant than detecting this situation and just requesting layout, but makes the logic significantly simpler. Two new tests added, that cover all three of these issues. * LayoutTests/fast/block/missing-absolute-positioned-content-expected.html: Added. * LayoutTests/fast/block/missing-absolute-positioned-content-inline-expected.html: Added. * LayoutTests/fast/block/missing-absolute-positioned-content-inline.html: Added. * LayoutTests/fast/block/missing-absolute-positioned-content.html: Added. * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::removeOutOfFlowBoxesIfNeededOnStyleChange): Deleted. * Source/WebCore/rendering/RenderBlock.h: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::removeOutOfFlowBoxesIfNeededOnStyleChange): * Source/WebCore/rendering/RenderElement.h: * Source/WebCore/rendering/RenderInline.cpp: (WebCore::RenderInline::styleWillChange): Canonical link: https://commits.webkit.org/295979@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes