Skip to content

Truly independent web browser

LibWeb: Stack the number input stepper buttons vertically

Andreas Klingf04e51c3caa4
diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp
index 2ee7f95f290..1105190e8a9 100644
--- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp
@@ -859,7 +859,15 @@ static GC::Ref<CSS::CSSStyleProperties> stepper_button_style_when_visible()
if (!style) {
style = CSS::CSSStyleProperties::create({}, {});
style->set_declarations_from_text(R"~~~(
- padding: 0;
+ display: flex;
+ flex: 1;
+ align-items: center;
+ justify-content: center;
+ padding: 0 2px;
+ border: none;
+ background: none;
+ color: GrayText;
+ line-height: 0;
cursor: default;
)~~~"sv);
}
@@ -1272,14 +1280,18 @@ void HTMLInputElement::create_text_input_shadow_tree()
// NB: The buttons start out with the style they have when shown, so that the style application that follows
// only rewrites their declarations when appearance hides them.
+ auto stepper_container = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML));
+ stepper_container->set_attribute_value(HTML::AttributeNames::style, "display: flex; flex-direction: column; align-self: stretch;"_utf16);
+ MUST(element->append_child(stepper_container));
+
// Up button
m_up_button_element = MUST(DOM::create_element(document(), HTML::TagNames::button, Namespace::HTML));
set_own_inline_style(*m_up_button_element, stepper_button_style_when_visible());
auto up_button_svg = MUST(DOM::create_element(document(), SVG::TagNames::svg, Namespace::SVG));
- up_button_svg->set_attribute_value(HTML::AttributeNames::style, "width: 1em; height: 1em;"_utf16);
+ up_button_svg->set_attribute_value(HTML::AttributeNames::style, "width: 0.7em; height: 0.5em;"_utf16);
up_button_svg->set_attribute_value(SVG::AttributeNames::xmlns, Namespace::SVG.to_utf16_string());
- up_button_svg->set_attribute_value(SVG::AttributeNames::viewBox, "0 0 24 24"_utf16);
+ up_button_svg->set_attribute_value(SVG::AttributeNames::viewBox, "5 7 14 10"_utf16);
MUST(m_up_button_element->append_child(up_button_svg));
auto up_button_svg_path = MUST(DOM::create_element(document(), SVG::TagNames::path, Namespace::SVG));
@@ -1287,7 +1299,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
up_button_svg_path->set_attribute_value(SVG::AttributeNames::d, "M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"_utf16);
MUST(up_button_svg->append_child(up_button_svg_path));
- MUST(element->append_child(*m_up_button_element));
+ MUST(stepper_container->append_child(*m_up_button_element));
auto mouseup_callback_function = JS::NativeFunction::create(
HTML::relevant_realm(*this), [this](JS::VM&) {
@@ -1314,9 +1326,9 @@ void HTMLInputElement::create_text_input_shadow_tree()
set_own_inline_style(*m_down_button_element, stepper_button_style_when_visible());
auto down_button_svg = MUST(DOM::create_element(document(), SVG::TagNames::svg, Namespace::SVG));
- down_button_svg->set_attribute_value(HTML::AttributeNames::style, "width: 1em; height: 1em;"_utf16);
+ down_button_svg->set_attribute_value(HTML::AttributeNames::style, "width: 0.7em; height: 0.5em;"_utf16);
down_button_svg->set_attribute_value(SVG::AttributeNames::xmlns, Namespace::SVG.to_utf16_string());
- down_button_svg->set_attribute_value(SVG::AttributeNames::viewBox, "0 0 24 24"_utf16);
+ down_button_svg->set_attribute_value(SVG::AttributeNames::viewBox, "5 7 14 10"_utf16);
MUST(m_down_button_element->append_child(down_button_svg));
auto down_button_svg_path = MUST(DOM::create_element(document(), SVG::TagNames::path, Namespace::SVG));
@@ -1324,7 +1336,7 @@ void HTMLInputElement::create_text_input_shadow_tree()
down_button_svg_path->set_attribute_value(SVG::AttributeNames::d, "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"_utf16);
MUST(down_button_svg->append_child(down_button_svg_path));
- MUST(element->append_child(*m_down_button_element));
+ MUST(stepper_container->append_child(*m_down_button_element));
auto down_callback_function = JS::NativeFunction::create(
HTML::relevant_realm(*this), [this](JS::VM&) {
diff --git a/Tests/LibWeb/Layout/expected/input-number-placeholder.txt b/Tests/LibWeb/Layout/expected/input-number-placeholder.txt
index 1e64b16a50b..ae2b4d243bc 100644
--- a/Tests/LibWeb/Layout/expected/input-number-placeholder.txt
+++ b/Tests/LibWeb/Layout/expected/input-number-placeholder.txt
@@ -1,29 +1,24 @@
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 36 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 20 0+0+8] children: inline
- frag 0 from TextInputBox start: 0, length: 0, rect: [13,11 159.6875x14] baseline: 14.984375
+ frag 0 from TextInputBox start: 0, length: 0, rect: [13,11 159.6875x14] baseline: 13.984375
TextInputBox <input> at [13,11] inline-block [0+1+4 159.6875 4+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [13,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 16 0+0+0] [FFC] children: not-inline
- Box <div> at [13,12] flex-container(row) flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [13,12] flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [13,12 0x14] baseline: 10.984375
+ Box <div> at [13,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <div> at [13,11] flex-container(row) flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [13,11] flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [13,11 0x14] baseline: 10.984375
TextNode <#text> (not painted)
- BlockContainer <div> at [13,12] flex-item [-129.03125+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 6, rect: [13,12 52.546875x14] baseline: 10.984375
+ BlockContainer <div> at [13,11] flex-item [-146.359375+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 6, rect: [13,11 52.546875x14] baseline: 10.984375
"Amount"
TextNode <#text> (not painted)
- BlockContainer <button> at [143.03125,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [143.03125,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [143.03125,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [143.03125,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [143.03125,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
- BlockContainer <button> at [158.359375,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [158.359375,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [158.359375,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [158.359375,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [158.359375,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
+ Box <div> at [159.359375,11] flex-container(column) flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <button> at [161.359375,11] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [161.359375,11.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
+ Box <button> at [161.359375,18] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [161.359375,18.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/number-input-appearance.txt b/Tests/LibWeb/Layout/expected/number-input-appearance.txt
index 84d6151e4d8..8a50ff3ad02 100644
--- a/Tests/LibWeb/Layout/expected/number-input-appearance.txt
+++ b/Tests/LibWeb/Layout/expected/number-input-appearance.txt
@@ -1,61 +1,52 @@
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
- BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 37 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 21 0+0+8] children: inline
- frag 0 from TextInputBox start: 0, length: 0, rect: [13,11 159.6875x14] baseline: 14.984375
- frag 1 from TextNode start: 0, length: 1, rect: [177.6875,10 8x16] baseline: 12.796875
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 36 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 20 0+0+8] children: inline
+ frag 0 from TextInputBox start: 0, length: 0, rect: [13,11 159.6875x14] baseline: 13.984375
+ frag 1 from TextNode start: 0, length: 1, rect: [177.6875,9 8x16] baseline: 12.796875
" "
- frag 2 from TextInputBox start: 0, length: 0, rect: [190.6875,11 159.6875x14] baseline: 14.984375
- frag 3 from TextNode start: 0, length: 1, rect: [355.375,10 8x16] baseline: 12.796875
+ frag 2 from TextInputBox start: 0, length: 0, rect: [190.6875,11 159.6875x14] baseline: 13.984375
+ frag 3 from TextNode start: 0, length: 1, rect: [355.375,9 8x16] baseline: 12.796875
" "
- frag 4 from TextInputBox start: 0, length: 0, rect: [368.375,12 159.6875x14] baseline: 13.984375
+ frag 4 from TextInputBox start: 0, length: 0, rect: [368.375,11 159.6875x14] baseline: 13.984375
TextInputBox <input> at [13,11] inline-block [0+1+4 159.6875 4+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [13,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 16 0+0+0] [FFC] children: not-inline
- Box <div> at [13,12] flex-container(row) flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [13,12] flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 1, rect: [13,12 5.28125x14] baseline: 10.984375
+ Box <div> at [13,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <div> at [13,11] flex-container(row) flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [13,11] flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 1, rect: [13,11 5.28125x14] baseline: 10.984375
"1"
TextNode <#text> (not painted)
- BlockContainer <button> at [143.03125,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [143.03125,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [143.03125,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [143.03125,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [143.03125,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
- BlockContainer <button> at [158.359375,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [158.359375,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [158.359375,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [158.359375,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [158.359375,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
+ Box <div> at [159.359375,11] flex-container(column) flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <button> at [161.359375,11] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [161.359375,11.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
+ Box <button> at [161.359375,18] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [161.359375,18.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
TextNode <#text> (not painted)
TextInputBox <input> at [190.6875,11] inline-block [0+1+4 159.6875 4+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [190.6875,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 16 0+0+0] [FFC] children: not-inline
- Box <div> at [190.6875,12] flex-container(row) flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [190.6875,12] flex-item [0+0+0 129.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 1, rect: [190.6875,12 7.34375x14] baseline: 10.984375
+ Box <div> at [190.6875,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <div> at [190.6875,11] flex-container(row) flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [190.6875,11] flex-item [0+0+0 146.359375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 1, rect: [190.6875,11 7.34375x14] baseline: 10.984375
"2"
TextNode <#text> (not painted)
- BlockContainer <button> at [320.71875,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [320.71875,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [320.71875,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [320.71875,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [320.71875,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
- BlockContainer <button> at [336.046875,12] flex-item [0+1+0 13.328125 0+1+0] [0+1+0 14 0+1+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [336.046875,12] flex-container(column) [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <(anonymous)> at [336.046875,12] flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [336.046875,12 13.328125x13.328125] baseline: 13.328125
- SVGSVGBox <svg> at [336.046875,12] [0+0+0 13.328125 0+0+0] [0+0+0 13.328125 0+0+0] viewport-transform=[0.55533856 0 0 0.55533856 0 0] [SVG] children: not-inline
- SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
+ Box <div> at [337.046875,11] flex-container(column) flex-item [0+0+0 13.328125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <button> at [339.046875,11] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [339.046875,11.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8] [0+0+0 12 0+0+0] [0+0+0 7.40625 0+0+0] children: not-inline
+ Box <button> at [339.046875,18] flex-container(row) flex-item [0+0+2 9.328125 2+0+0] [0+0+0 7 0+0+0] [FFC] children: not-inline
+ SVGSVGBox <svg> at [339.046875,18.171875] flex-item [0+0+0 9.328125 0+0+0] [0+0+0 6.65625 0+0+0] viewport-transform=[0.665625 0 0 0.665625 -3.328125 -4.6593747] [SVG] children: not-inline
+ SVGGeometryBox <path> at [6,8.578125] [0+0+0 12 0+0+0] [0+0+0 7.421875 0+0+0] children: not-inline
TextNode <#text> (not painted)
- TextInputBox <input> at [368.375,12] inline-block [0+1+4 159.6875 4+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [368.375,12] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- Box <div> at [368.375,12] flex-container(row) flex-item [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [368.375,12] flex-item [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 1, rect: [368.375,12 7.578125x14] baseline: 10.984375
+ TextInputBox <input> at [368.375,11] inline-block [0+1+4 159.6875 4+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
+ Box <div> at [368.375,11] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ Box <div> at [368.375,11] flex-container(row) flex-item [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [368.375,11] flex-item [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 1, rect: [368.375,11 7.578125x14] baseline: 10.984375
"3"
TextNode <#text> (not painted)
+ Box <div> at [528.0625,11] flex-container(column) flex-item [0+0+0 0 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x37] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x36] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/pdf-viewer.txt b/Tests/LibWeb/Layout/expected/pdf-viewer.txt
index 9869a73cf77..5480b5c2923 100644
--- a/Tests/LibWeb/Layout/expected/pdf-viewer.txt
+++ b/Tests/LibWeb/Layout/expected/pdf-viewer.txt
@@ -108,6 +108,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
frag 0 from TextNode start: 0, length: 1, rect: [200.84375,9.5 5.15625x13] baseline: 10.390625
"1"
TextNode <#text> (not painted)
+ Box <div> at [206,9.5] flex-container(column) flex-item [0+0+0 0 0+0+0] [0+0+0 13 0+0+0] [FFC] children: not-inline
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
TextNode <#text> (not painted)
BlockContainer <(anonymous)> (not painted) [BFC] children: inline