LibWeb: Add HTMLElement::uses_button_layout()

This suits the spec a bit better, and exposes the fact that we were
allowing `::ImageButton` to use the button layout although it is never
specified that it should do so. Tests were rebaselined for this.
This commit is contained in:
Jelle Raaijmakers 2025-08-15 09:42:52 +02:00 committed by Sam Atkins
commit ff5f80a196
Notes: github-actions[bot] 2025-08-18 10:05:59 +00:00
8 changed files with 112 additions and 99 deletions

View file

@ -87,6 +87,9 @@ public:
GC::Ptr<DOM::Element> command_for_element() { return m_command_for_element; } GC::Ptr<DOM::Element> command_for_element() { return m_command_for_element; }
void set_command_for_element(GC::Ptr<DOM::Element> value) { m_command_for_element = value; } void set_command_for_element(GC::Ptr<DOM::Element> value) { m_command_for_element = value; }
// https://html.spec.whatwg.org/multipage/rendering.html#the-button-element-2:button-layout-2
virtual bool uses_button_layout() const override { return true; }
private: private:
virtual void visit_edges(Visitor&) override; virtual void visit_edges(Visitor&) override;

View file

@ -165,6 +165,9 @@ public:
bool is_form_associated_custom_element(); bool is_form_associated_custom_element();
// https://html.spec.whatwg.org/multipage/rendering.html#button-layout
virtual bool uses_button_layout() const { return false; }
protected: protected:
HTMLElement(DOM::Document&, DOM::QualifiedName); HTMLElement(DOM::Document&, DOM::QualifiedName);

View file

@ -3622,4 +3622,27 @@ bool HTMLInputElement::is_mutable() const
&& !(has_attribute(AttributeNames::readonly) && is_allowed_to_be_readonly(m_type)); && !(has_attribute(AttributeNames::readonly) && is_allowed_to_be_readonly(m_type));
} }
// https://html.spec.whatwg.org/multipage/rendering.html#button-layout
bool HTMLInputElement::uses_button_layout() const
{
// https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-button:button-layout-2
// An input element whose type attribute is in the Submit Button, Reset Button, or Button state, when it generates a
// CSS box, is expected to depict a button and use button layout [..]
// https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-colour-well:button-layout-2
// The element, when it generates a CSS box, is expected to use button layout, that has no child boxes of the
// anonymous button content box.
// https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-file-upload-control:button-layout-2
// The button is expected to use button layout and match the '::file-selector-button' pseudo-element.
// https://html.spec.whatwg.org/multipage/input.html#image-button-state-(type=image):concept-button
// The element is a button, specifically a submit button.
// NOTE: Although type=image is specified to be a submit button, that does not mean that the type attribute is
// Submit Button, so we don't include ::ImageButton below.
return first_is_one_of(type_state(), TypeAttributeState::SubmitButton, TypeAttributeState::ResetButton,
TypeAttributeState::Button, TypeAttributeState::Color, TypeAttributeState::FileUpload);
}
} }

View file

@ -253,6 +253,7 @@ public:
virtual bool suffering_from_bad_input() const override; virtual bool suffering_from_bad_input() const override;
virtual bool is_mutable() const override; virtual bool is_mutable() const override;
virtual bool uses_button_layout() const override;
private: private:
HTMLInputElement(DOM::Document&, DOM::QualifiedName); HTMLInputElement(DOM::Document&, DOM::QualifiedName);

View file

@ -724,36 +724,23 @@ void TreeBuilder::update_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
void TreeBuilder::wrap_in_button_layout_tree_if_needed(DOM::Node& dom_node, GC::Ref<Layout::Node> layout_node) void TreeBuilder::wrap_in_button_layout_tree_if_needed(DOM::Node& dom_node, GC::Ref<Layout::Node> layout_node)
{ {
auto is_button_layout = [&] { auto const* html_element = as_if<HTML::HTMLElement>(dom_node);
if (dom_node.is_html_button_element()) if (!html_element || !html_element->uses_button_layout())
return true;
if (!dom_node.is_html_input_element())
return false;
// https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-button
// An input element whose type attribute is in the Submit Button, Reset Button, or Button state, when it generates a CSS box, is expected to depict a button and use button layout
auto const& input_element = static_cast<HTML::HTMLInputElement const&>(dom_node);
if (input_element.is_button())
return true;
return false;
}();
if (!is_button_layout)
return; return;
auto display = layout_node->display();
// https://html.spec.whatwg.org/multipage/rendering.html#button-layout // https://html.spec.whatwg.org/multipage/rendering.html#button-layout
// If the computed value of 'inline-size' is 'auto', then the used value is the fit-content inline size. // If the computed value of 'inline-size' is 'auto', then the used value is the fit-content inline size.
if (is_button_layout && dom_node.layout_node()->computed_values().width().is_auto()) { if (dom_node.layout_node()->computed_values().width().is_auto()) {
auto& computed_values = as<NodeWithStyle>(*dom_node.layout_node()).mutable_computed_values(); auto& computed_values = as<NodeWithStyle>(*dom_node.layout_node()).mutable_computed_values();
computed_values.set_width(CSS::Size::make_fit_content()); computed_values.set_width(CSS::Size::make_fit_content());
} }
// https://html.spec.whatwg.org/multipage/rendering.html#button-layout // https://html.spec.whatwg.org/multipage/rendering.html#button-layout
// If the element is an input element, or if it is a button element and its computed value for // If the element is an input element, or if it is a button element and its computed value for 'display' is not
// 'display' is not 'inline-grid', 'grid', 'inline-flex', or 'flex', then the element's box has // 'inline-grid', 'grid', 'inline-flex', or 'flex', then the element's box has a child anonymous button content box
// a child anonymous button content box with the following behaviors: // with the following behaviors:
if (is_button_layout && !display.is_grid_inside() && !display.is_flex_inside()) { auto display = layout_node->display();
if (!display.is_grid_inside() && !display.is_flex_inside()) {
auto& parent = *layout_node; auto& parent = *layout_node;
// If the box does not overflow in the vertical axis, then it is centered vertically. // If the box does not overflow in the vertical axis, then it is centered vertically.

View file

@ -1,83 +1,95 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x38 [BFC] children: not-inline BlockContainer <html> at (0,0) content-size 800x42 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x22 children: inline BlockContainer <body> at (8,8) content-size 784x26 children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [8,8 236.65625x22] baseline: 15.796875 frag 0 from BlockContainer start: 0, length: 0, rect: [8,8 236.65625x26] baseline: 15.796875
frag 1 from TextNode start: 0, length: 1, rect: [244.65625,10 8x18] baseline: 13.796875 frag 1 from TextNode start: 0, length: 1, rect: [244.65625,10 8x18] baseline: 13.796875
" " " "
frag 2 from BlockContainer start: 0, length: 0, rect: [252.65625,8 255.34375x22] baseline: 15.796875 frag 2 from BlockContainer start: 0, length: 0, rect: [252.65625,8 255.34375x26] baseline: 15.796875
frag 3 from TextNode start: 0, length: 1, rect: [508,10 8x18] baseline: 13.796875 frag 3 from TextNode start: 0, length: 1, rect: [508,10 8x18] baseline: 13.796875
" " " "
frag 4 from BlockContainer start: 0, length: 0, rect: [516,8 255.34375x22] baseline: 15.796875 frag 4 from BlockContainer start: 0, length: 0, rect: [516,8 255.34375x26] baseline: 15.796875
BlockContainer <input> at (8,8) content-size 236.65625x22 inline-block [BFC] children: inline BlockContainer <input> at (8,8) content-size 236.65625x26 inline-block [BFC] children: not-inline
frag 0 from BlockContainer start: 0, length: 0, rect: [13,10 94.375x18] baseline: 15.796875 BlockContainer <(anonymous)> at (8,8) content-size 236.65625x26 flex-container(column) [FFC] children: not-inline
frag 1 from Label start: 0, length: 0, rect: [116.375,10 128.28125x18] baseline: 13.796875 BlockContainer <(anonymous)> at (8,8) content-size 236.65625x26 flex-item [BFC] children: inline
BlockContainer <button> at (13,10) content-size 94.375x18 inline-block [BFC] children: not-inline frag 0 from BlockContainer start: 0, length: 0, rect: [13,10 94.375x18] baseline: 15.796875
BlockContainer <(anonymous)> at (13,10) content-size 94.375x18 flex-container(column) [FFC] children: not-inline frag 1 from Label start: 0, length: 0, rect: [116.375,10 128.28125x18] baseline: 13.796875
BlockContainer <(anonymous)> at (13,10) content-size 94.375x18 flex-item [BFC] children: inline BlockContainer <button> at (13,10) content-size 94.375x18 inline-block [BFC] children: not-inline
frag 0 from TextNode start: 0, length: 14, rect: [13,10 94.375x18] baseline: 13.796875 BlockContainer <(anonymous)> at (13,10) content-size 94.375x18 flex-container(column) [FFC] children: not-inline
"Select file..." BlockContainer <(anonymous)> at (13,10) content-size 94.375x18 flex-item [BFC] children: inline
frag 0 from TextNode start: 0, length: 14, rect: [13,10 94.375x18] baseline: 13.796875
"Select file..."
TextNode <#text>
Label <label> at (116.375,10) content-size 128.28125x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 17, rect: [116.375,10 128.28125x18] baseline: 13.796875
"No file selected."
TextNode <#text> TextNode <#text>
Label <label> at (116.375,10) content-size 128.28125x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 17, rect: [116.375,10 128.28125x18] baseline: 13.796875
"No file selected."
TextNode <#text>
TextNode <#text> TextNode <#text>
BlockContainer <input> at (252.65625,8) content-size 255.34375x22 inline-block [BFC] children: inline BlockContainer <input> at (252.65625,8) content-size 255.34375x26 inline-block [BFC] children: not-inline
frag 0 from BlockContainer start: 0, length: 0, rect: [257.65625,10 103.71875x18] baseline: 15.796875 BlockContainer <(anonymous)> at (252.65625,8) content-size 255.34375x26 flex-container(column) [FFC] children: not-inline
frag 1 from Label start: 0, length: 0, rect: [370.375,10 137.625x18] baseline: 13.796875 BlockContainer <(anonymous)> at (252.65625,8) content-size 255.34375x26 flex-item [BFC] children: inline
BlockContainer <button> at (257.65625,10) content-size 103.71875x18 inline-block [BFC] children: not-inline frag 0 from BlockContainer start: 0, length: 0, rect: [257.65625,10 103.71875x18] baseline: 15.796875
BlockContainer <(anonymous)> at (257.65625,10) content-size 103.71875x18 flex-container(column) [FFC] children: not-inline frag 1 from Label start: 0, length: 0, rect: [370.375,10 137.625x18] baseline: 13.796875
BlockContainer <(anonymous)> at (257.65625,10) content-size 103.71875x18 flex-item [BFC] children: inline BlockContainer <button> at (257.65625,10) content-size 103.71875x18 inline-block [BFC] children: not-inline
frag 0 from TextNode start: 0, length: 15, rect: [257.65625,10 103.71875x18] baseline: 13.796875 BlockContainer <(anonymous)> at (257.65625,10) content-size 103.71875x18 flex-container(column) [FFC] children: not-inline
"Select files..." BlockContainer <(anonymous)> at (257.65625,10) content-size 103.71875x18 flex-item [BFC] children: inline
frag 0 from TextNode start: 0, length: 15, rect: [257.65625,10 103.71875x18] baseline: 13.796875
"Select files..."
TextNode <#text>
Label <label> at (370.375,10) content-size 137.625x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 18, rect: [370.375,10 137.625x18] baseline: 13.796875
"No files selected."
TextNode <#text> TextNode <#text>
Label <label> at (370.375,10) content-size 137.625x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 18, rect: [370.375,10 137.625x18] baseline: 13.796875
"No files selected."
TextNode <#text>
TextNode <#text> TextNode <#text>
BlockContainer <input#multiple> at (516,8) content-size 255.34375x22 inline-block [BFC] children: inline BlockContainer <input#multiple> at (516,8) content-size 255.34375x26 inline-block [BFC] children: not-inline
frag 0 from BlockContainer start: 0, length: 0, rect: [521,10 103.71875x18] baseline: 15.796875 BlockContainer <(anonymous)> at (516,8) content-size 255.34375x26 flex-container(column) [FFC] children: not-inline
frag 1 from Label start: 0, length: 0, rect: [633.71875,10 137.625x18] baseline: 13.796875 BlockContainer <(anonymous)> at (516,8) content-size 255.34375x26 flex-item [BFC] children: inline
BlockContainer <button> at (521,10) content-size 103.71875x18 inline-block [BFC] children: not-inline frag 0 from BlockContainer start: 0, length: 0, rect: [521,10 103.71875x18] baseline: 15.796875
BlockContainer <(anonymous)> at (521,10) content-size 103.71875x18 flex-container(column) [FFC] children: not-inline frag 1 from Label start: 0, length: 0, rect: [633.71875,10 137.625x18] baseline: 13.796875
BlockContainer <(anonymous)> at (521,10) content-size 103.71875x18 flex-item [BFC] children: inline BlockContainer <button> at (521,10) content-size 103.71875x18 inline-block [BFC] children: not-inline
frag 0 from TextNode start: 0, length: 15, rect: [521,10 103.71875x18] baseline: 13.796875 BlockContainer <(anonymous)> at (521,10) content-size 103.71875x18 flex-container(column) [FFC] children: not-inline
"Select files..." BlockContainer <(anonymous)> at (521,10) content-size 103.71875x18 flex-item [BFC] children: inline
frag 0 from TextNode start: 0, length: 15, rect: [521,10 103.71875x18] baseline: 13.796875
"Select files..."
TextNode <#text>
Label <label> at (633.71875,10) content-size 137.625x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 18, rect: [633.71875,10 137.625x18] baseline: 13.796875
"No files selected."
TextNode <#text> TextNode <#text>
Label <label> at (633.71875,10) content-size 137.625x18 inline-block [BFC] children: inline
frag 0 from TextNode start: 0, length: 18, rect: [633.71875,10 137.625x18] baseline: 13.796875
"No files selected."
TextNode <#text>
TextNode <#text> TextNode <#text>
TextNode <#text> TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600] ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x38] PaintableWithLines (BlockContainer<HTML>) [0,0 800x42]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x22] PaintableWithLines (BlockContainer<BODY>) [8,8 784x26]
PaintableWithLines (BlockContainer<INPUT>) [8,8 236.65625x22] PaintableWithLines (BlockContainer<INPUT>) [8,8 236.65625x26]
PaintableWithLines (BlockContainer<BUTTON>) [8,8 104.375x22] PaintableWithLines (BlockContainer(anonymous)) [8,8 236.65625x26]
PaintableWithLines (BlockContainer(anonymous)) [13,10 94.375x18] PaintableWithLines (BlockContainer(anonymous)) [8,8 236.65625x26]
PaintableWithLines (BlockContainer(anonymous)) [13,10 94.375x18] PaintableWithLines (BlockContainer<BUTTON>) [8,8 104.375x22]
PaintableWithLines (BlockContainer(anonymous)) [13,10 94.375x18]
PaintableWithLines (BlockContainer(anonymous)) [13,10 94.375x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [112.375,10 132.28125x18]
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [112.375,10 132.28125x18]
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<INPUT>) [252.65625,8 255.34375x22] PaintableWithLines (BlockContainer<INPUT>) [252.65625,8 255.34375x26]
PaintableWithLines (BlockContainer<BUTTON>) [252.65625,8 113.71875x22] PaintableWithLines (BlockContainer(anonymous)) [252.65625,8 255.34375x26]
PaintableWithLines (BlockContainer(anonymous)) [257.65625,10 103.71875x18] PaintableWithLines (BlockContainer(anonymous)) [252.65625,8 255.34375x26]
PaintableWithLines (BlockContainer(anonymous)) [257.65625,10 103.71875x18] PaintableWithLines (BlockContainer<BUTTON>) [252.65625,8 113.71875x22]
PaintableWithLines (BlockContainer(anonymous)) [257.65625,10 103.71875x18]
PaintableWithLines (BlockContainer(anonymous)) [257.65625,10 103.71875x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [366.375,10 141.625x18]
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [366.375,10 141.625x18]
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<INPUT>#multiple) [516,8 255.34375x22] PaintableWithLines (BlockContainer<INPUT>#multiple) [516,8 255.34375x26]
PaintableWithLines (BlockContainer<BUTTON>) [516,8 113.71875x22] PaintableWithLines (BlockContainer(anonymous)) [516,8 255.34375x26]
PaintableWithLines (BlockContainer(anonymous)) [521,10 103.71875x18] PaintableWithLines (BlockContainer(anonymous)) [516,8 255.34375x26]
PaintableWithLines (BlockContainer(anonymous)) [521,10 103.71875x18] PaintableWithLines (BlockContainer<BUTTON>) [516,8 113.71875x22]
PaintableWithLines (BlockContainer(anonymous)) [521,10 103.71875x18]
PaintableWithLines (BlockContainer(anonymous)) [521,10 103.71875x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [629.71875,10 141.625x18]
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
PaintableWithLines (Label<LABEL>) [629.71875,10 141.625x18]
TextPaintable (TextNode<#text>)
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
SC for BlockContainer<HTML> [0,0 800x38] [children: 0] (z-index: auto) SC for BlockContainer<HTML> [0,0 800x42] [children: 0] (z-index: auto)

View file

@ -11,16 +11,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 4 from ImageBox start: 0, length: 0, rect: [136,8 128x256] baseline: 256 frag 4 from ImageBox start: 0, length: 0, rect: [136,8 128x256] baseline: 256
TextNode <#text> TextNode <#text>
ImageBox <input> at (8,216) content-size 48x48 inline-block children: not-inline ImageBox <input> at (8,216) content-size 48x48 inline-block children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
TextNode <#text> TextNode <#text>
ImageBox <input> at (64,200) content-size 64x64 inline-block children: not-inline ImageBox <input> at (64,200) content-size 64x64 inline-block children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
TextNode <#text> TextNode <#text>
ImageBox <input> at (136,8) content-size 128x256 inline-block children: not-inline ImageBox <input> at (136,8) content-size 128x256 inline-block children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
TextNode <#text> TextNode <#text>
BlockContainer <(anonymous)> at (8,268) content-size 784x0 children: inline BlockContainer <(anonymous)> at (8,268) content-size 784x0 children: inline
TextNode <#text> TextNode <#text>
@ -30,16 +24,10 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x260] PaintableWithLines (BlockContainer<BODY>) [8,8 784x260]
PaintableWithLines (BlockContainer<FORM>) [8,8 784x260] PaintableWithLines (BlockContainer<FORM>) [8,8 784x260]
ImagePaintable (ImageBox<INPUT>) [8,216 48x48] ImagePaintable (ImageBox<INPUT>) [8,216 48x48]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
PaintableWithLines (BlockContainer(anonymous)) [8,8 0x0]
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
ImagePaintable (ImageBox<INPUT>) [64,200 64x64] ImagePaintable (ImageBox<INPUT>) [64,200 64x64]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
PaintableWithLines (BlockContainer(anonymous)) [8,8 0x0]
TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>)
ImagePaintable (ImageBox<INPUT>) [136,8 128x256] ImagePaintable (ImageBox<INPUT>) [136,8 128x256]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
PaintableWithLines (BlockContainer(anonymous)) [8,8 0x0]
PaintableWithLines (BlockContainer(anonymous)) [8,268 784x0] PaintableWithLines (BlockContainer(anonymous)) [8,268 784x0]
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)

View file

@ -3,8 +3,6 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <body> at (8,8) content-size 784x120 children: inline BlockContainer <body> at (8,8) content-size 784x120 children: inline
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 120x120] baseline: 120 frag 0 from ImageBox start: 0, length: 0, rect: [8,8 120x120] baseline: 120
ImageBox <input> at (8,8) content-size 120x120 inline-block children: not-inline ImageBox <input> at (8,8) content-size 120x120 inline-block children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: not-inline
TextNode <#text> TextNode <#text>
TextNode <#text> TextNode <#text>
@ -12,8 +10,6 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x136] PaintableWithLines (BlockContainer<HTML>) [0,0 800x136]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x120] PaintableWithLines (BlockContainer<BODY>) [8,8 784x120]
ImagePaintable (ImageBox<INPUT>) [8,8 120x120] ImagePaintable (ImageBox<INPUT>) [8,8 120x120]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
PaintableWithLines (BlockContainer(anonymous)) [8,8 0x0]
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
SC for BlockContainer<HTML> [0,0 800x136] [children: 0] (z-index: auto) SC for BlockContainer<HTML> [0,0 800x136] [children: 0] (z-index: auto)