1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibWeb: Add support for "display: contents"

This change makes tree builder omit elements with "display: contents"
from the layout tree during construction. Their child elements are
instead directly appended to the parent element in layout tree.
This commit is contained in:
Aliaksandr Kalenik 2023-07-27 23:31:42 +02:00 committed by Andreas Kling
parent b91af3c6a0
commit 0e8a0a8191
5 changed files with 31 additions and 3 deletions

View file

@ -347,7 +347,7 @@ JS::GCPtr<Layout::Node> Element::create_layout_node_for_display_type(DOM::Docume
if (display.is_flex_inside() || display.is_grid_inside())
return document.heap().allocate_without_realm<Layout::Box>(document, element, move(style));
if (display.is_flow_inside() || display.is_flow_root_inside())
if (display.is_flow_inside() || display.is_flow_root_inside() || display.is_contents())
return document.heap().allocate_without_realm<Layout::BlockContainer>(document, element, move(style));
dbgln("FIXME: CSS display '{}' not implemented yet.", display.to_string().release_value_but_fixme_should_propagate_errors());