LibWeb: Resolve content-visibility fixme in html details element

This commit is contained in:
Edwin Hoksberg 2024-06-24 12:11:02 +02:00 committed by Sam Atkins
parent 020b20d817
commit 0ae048102c
Notes: sideshowbarker 2024-07-19 21:35:40 +09:00
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
"I'm a summary"
TextNode <#text>
ListItemMarkerBox <(anonymous)> at (8,8) content-size 12x17 children: not-inline
BlockContainer <slot> at (8,25) content-size 784x0 children: not-inline
BlockContainer <(anonymous)> at (8,25) content-size 784x0 children: inline
TextNode <#text>
@ -19,4 +20,5 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (ListItemBox<SUMMARY>) [32,8 760x17]
TextPaintable (TextNode<#text>)
MarkerPaintable (ListItemMarkerBox(anonymous)) [8,8 12x17]
PaintableWithLines (BlockContainer<SLOT>) [8,25 784x0]
PaintableWithLines (BlockContainer(anonymous)) [8,25 784x0]

View file

@ -185,9 +185,8 @@ void HTMLDetailsElement::update_shadow_tree_style()
display: block;
)~~~"_string));
} else {
// FIXME: Should be `display: block` but we do not support `content-visibility: hidden`.
MUST(m_descendants_slot->set_attribute(HTML::AttributeNames::style, R"~~~(
display: none;
display: block;
content-visibility: hidden;
)~~~"_string));
}