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:
parent
b91af3c6a0
commit
0e8a0a8191
5 changed files with 31 additions and 3 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue