Skip to content

Truly independent web browser

LibGfx+LibWeb: Preserve fractional inline alignment

Timothy Flynnf4e06c81c367
diff --git a/Libraries/LibGfx/Font/Font.cpp b/Libraries/LibGfx/Font/Font.cpp
index 1c12ba7e8df..41821b2c2b0 100644
--- a/Libraries/LibGfx/Font/Font.cpp
+++ b/Libraries/LibGfx/Font/Font.cpp
@@ -73,6 +73,23 @@ FontPixelMetrics Font::compute_pixel_metrics() const
metrics.descent = -font_units_to_pixels(vertical_metrics.descender + hb_ot_metrics_get_variation(m_harfbuzz_font, HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER));
metrics.line_gap = max(0.0f, font_units_to_pixels(vertical_metrics.line_gap + hb_ot_metrics_get_variation(m_harfbuzz_font, HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP)));
+#ifdef AK_OS_LINUX
+ if (m_typeface->system_font_identifier().has_value()) {
+ // INTEROP: Use FreeType's enclosing pixel sizes for Linux system fonts with legacy horizontal metrics.
+ // https://learn.microsoft.com/en-us/typography/opentype/spec/os2#fsselection
+ static constexpr u16 USE_TYPO_METRICS = 1 << 7;
+ auto* face = hb_font_get_face(m_harfbuzz_font);
+ FontTable os2 { face, FourCC { "OS/2" } };
+ FontTable hhea { face, FourCC { "hhea" } };
+ auto requested_typo_metrics = os2.contains(62, 2) && (os2.u16_at(62) & USE_TYPO_METRICS);
+ auto hhea_has_metrics = hhea.contains(4, 4) && (hhea.i16_at(4) != 0 || hhea.i16_at(6) != 0);
+ if (!requested_typo_metrics && hhea_has_metrics) {
+ metrics.ascent = AK::ceil(AK::round(metrics.ascent * text_shaping_resolution) / text_shaping_resolution);
+ metrics.descent = AK::ceil(AK::round(metrics.descent * text_shaping_resolution) / text_shaping_resolution);
+ }
+ }
+#endif
+
// https://drafts.csswg.org/css-values-4/#ex
// In the cases where it is impossible or impractical to determine the x-height, a value of 0.5em must be assumed.
metrics.x_height = m_pixel_size / 2;
diff --git a/Libraries/LibWeb/Rust/src/layout/line_builder.rs b/Libraries/LibWeb/Rust/src/layout/line_builder.rs
index 2df459a0a25..0f137b0dad4 100644
--- a/Libraries/LibWeb/Rust/src/layout/line_builder.rs
+++ b/Libraries/LibWeb/Rust/src/layout/line_builder.rs
@@ -1755,7 +1755,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {
{
let fragment = &mut self.line_mut(line_index).fragments[fragment_index];
fragment.inline_offset = new_inline_offset;
- fragment.block_offset = new_block_offset.floor() + block_offset;
+ fragment.block_offset = new_block_offset + block_offset;
fragment.accumulated_vertical_shift = accumulated_vertical_shift;
snapshot.block_offset = fragment.block_offset;
}
@@ -2041,15 +2041,13 @@ pub(crate) struct TextLayoutBounds {
}
impl TextLayoutBounds {
- /// The bounds of text in a font with `ascent` and `descent`, with the line height's leading split above and
- /// below it. A font's ascent and descent count in whole pixels, as they do for 'line-height: normal', and the
- /// leading above the text is a whole number of pixels too. So the baseline of text whose line height is a whole
- /// number of pixels lands on a pixel, wherever the text is.
+ /// The bounds of text in a font with `ascent` and `descent`, with half the line height's leading on each side.
+ /// A font's ascent and descent count in whole pixels, as they do for 'line-height: normal'.
fn with_leading(ascent: f32, descent: f32, line_height: CssPixels) -> Self {
let ascent = font_metric_in_whole_pixels(ascent);
let descent = font_metric_in_whole_pixels(descent);
let leading = line_height - (ascent + descent);
- let leading_above = (leading / 2).floor();
+ let leading_above = leading / 2;
Self {
ascent: ascent + leading_above,
descent: descent + (leading - leading_above),
diff --git a/Libraries/LibWeb/Rust/src/layout/query/inline_cursor.rs b/Libraries/LibWeb/Rust/src/layout/query/inline_cursor.rs
index affbbb48eda..7aa6a602685 100644
--- a/Libraries/LibWeb/Rust/src/layout/query/inline_cursor.rs
+++ b/Libraries/LibWeb/Rust/src/layout/query/inline_cursor.rs
@@ -276,8 +276,7 @@ impl<'a, A: PaintRead> InlineCursor<'a, A> {
}
/// A caret as tall as the font of `style_source`, at the inline start of `area` and where layout puts text across a
- /// line of `line_height` from its block start, or across its block extent: the smaller half of the leading is on
- /// the ascent side.
+ /// line of `line_height` from its block start, or across its block extent.
fn caret_rect_at_inline_start(
&self,
area: CssPixelRect,
@@ -290,7 +289,7 @@ impl<'a, A: PaintRead> InlineCursor<'a, A> {
let font_height = CssPixels::from_integer((style.font_ascent() + style.font_descent()) as i64);
let height = font_height.min(line_height);
let leading = line_height - height;
- let leading_above = leading.scaled(0.5).floor();
+ let leading_above = leading / 2;
let one = CssPixels::from_integer(1);
let at_end = style.inline_axis_is_reverse();
Some(if horizontal {
diff --git a/Tests/LibGfx/TestFont.cpp b/Tests/LibGfx/TestFont.cpp
index dffaf85c48c..4f405d090b8 100644
--- a/Tests/LibGfx/TestFont.cpp
+++ b/Tests/LibGfx/TestFont.cpp
@@ -90,6 +90,19 @@ static NonnullRefPtr<Gfx::Font> load_text_font(float point_size)
return adopt_ref(*new Gfx::Font(typeface, point_size, point_size, {}, {}));
}
+#ifdef AK_OS_LINUX
+TEST_CASE(linux_system_font_metrics_enclose_the_legacy_ascent_and_descent)
+{
+ auto file = MUST(Core::MappedFile::map(TEST_INPUT("fonts/text.ttf"sv)));
+ auto typeface = MUST(Gfx::Typeface::try_load_from_temporary_memory(file->bytes()));
+ typeface->set_system_font_identifier({ 1, 1 });
+ auto font = typeface->font(12);
+
+ EXPECT_EQ(font->pixel_metrics().ascent, 16.0f);
+ EXPECT_EQ(font->pixel_metrics().descent, 4.0f);
+}
+#endif
+
TEST_CASE(pending_font_only_hides_its_unicode_range)
{
auto font = load_text_font(16);
diff --git a/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-atomic-inline-border-box.txt b/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-atomic-inline-border-box.txt
index 14973c7aa27..b37cbdb01f4 100644
--- a/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-atomic-inline-border-box.txt
+++ b/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-atomic-inline-border-box.txt
@@ -70,13 +70,13 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <span.overlay> at [20,510] positioned [0+0+0 20 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
BlockContainer <div.case.vertical> at [20,540] [20+0+0 20 0+0+20] [20+0+0 10 0+0+20] [BFC] children: inline
InlineNode <span.host> at [20,540] [0+0+0 20 0+0+0] [0+0+0 10 0+0+0]
- frag 0 from BlockContainer start: 0, length: 0, rect: [30,545 0x0] baseline: 10.375
- BlockContainer <span.atomic.middle.border-only> at [30,545] inline-block [0+5+0 0 0+5+0] [0+5+0 0 0+5+0] [BFC] children: not-inline
+ frag 0 from BlockContainer start: 0, length: 0, rect: [29.375,545 0x0] baseline: 10.375
+ BlockContainer <span.atomic.middle.border-only> at [29.375,545] inline-block [0+5+0 0 0+5+0] [0+5+0 0 0+5+0] [BFC] children: not-inline
BlockContainer <span.overlay> at [20,540] positioned [0+0+0 20 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
BlockContainer <div.case> at [20,570] [20+0+0 360 0+0+20] [20+0+0 20 0+0+20] children: inline
InlineNode <span.host> at [20,570] [0+0+0 10 0+0+0] [0+0+0 20 0+0+0]
- frag 0 from BlockContainer start: 0, length: 0, rect: [25,580 0x0] baseline: 10.375
- BlockContainer <span.atomic.middle.border-only> at [25,580] inline-block [0+5+0 0 0+5+0] [0+5+0 0 0+5+0] [BFC] children: not-inline
+ frag 0 from BlockContainer start: 0, length: 0, rect: [25,580.625 0x0] baseline: 10.375
+ BlockContainer <span.atomic.middle.border-only> at [25,580.625] inline-block [0+5+0 0 0+5+0] [0+5+0 0 0+5+0] [BFC] children: not-inline
BlockContainer <span.overlay> at [20,570] positioned [0+0+0 10 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inline
BlockContainer <div.case> at [20,610] [20+0+0 360 0+0+20] [20+0+0 40 0+0+20] children: inline
InlineNode <span.zero-host> at [20,610] [0+0+0 68.5 0+0+0] [0+0+0 40 0+0+0]
diff --git a/Tests/LibWeb/Layout/expected/acid1.txt b/Tests/LibWeb/Layout/expected/acid1.txt
index 4964f28235d..11e0be5f15c 100644
--- a/Tests/LibWeb/Layout/expected/acid1.txt
+++ b/Tests/LibWeb/Layout/expected/acid1.txt
@@ -17,24 +17,24 @@ 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: 14, rect: [235,55 74.296875x10] baseline: 8
"the world ends"
TextNode <#text> (not painted)
- BlockContainer <(anonymous)> at [235,65] [0+0+0 139.96875 0+0+0] [0+0+0 44 0+0+0] children: inline
+ BlockContainer <(anonymous)> at [235,65] [0+0+0 139.96875 0+0+0] [0+0+0 43 0+0+0] children: inline
InlineNode <form> at [235,65] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0]
- frag 0 from BlockContainer start: 0, length: 0, rect: [235,65 139.96875x22] baseline: 0
- frag 0 from BlockContainer start: 0, length: 0, rect: [235,87 139.96875x22] baseline: 0
+ frag 0 from BlockContainer start: 0, length: 0, rect: [235,65 139.96875x21.5] baseline: 0
+ frag 0 from BlockContainer start: 0, length: 0, rect: [235,86.5 139.96875x21.5] baseline: 0
TextNode <#text> (not painted)
- BlockContainer <p> at [235,65] [0+0+0 139.96875 0+0+0] [0+0+0 22 0+0+0] children: inline
+ BlockContainer <p> at [235,65] [0+0+0 139.96875 0+0+0] [0+0+0 21.5 0+0+0] children: inline
frag 0 from TextNode start: 33, length: 5, rect: [235,72 27.5x10] baseline: 8
"bang "
frag 1 from RadioButton start: 0, length: 0, rect: [267.5,68 12x12] baseline: 15
TextNode <#text> (not painted)
RadioButton <input> at [267.5,68] inline-block [5+0+0 12 0+0+3] [3+0+0 12 0+0+0] children: not-inline
TextNode <#text> (not painted)
- BlockContainer <p> at [235,87] [0+0+0 139.96875 0+0+0] [0+0+0 22 0+0+0] children: inline
- frag 0 from TextNode start: 33, length: 8, rect: [235,94 45.171875x10] baseline: 8
+ BlockContainer <p> at [235,86.5] [0+0+0 139.96875 0+0+0] [0+0+0 21.5 0+0+0] children: inline
+ frag 0 from TextNode start: 33, length: 8, rect: [235,93.5 45.171875x10] baseline: 8
"whimper "
- frag 1 from RadioButton start: 0, length: 0, rect: [285.171875,90 12x12] baseline: 15
+ frag 1 from RadioButton start: 0, length: 0, rect: [285.171875,89.5 12x12] baseline: 15
TextNode <#text> (not painted)
- RadioButton <input> at [285.171875,90] inline-block [5+0+0 12 0+0+3] [3+0+0 12 0+0+0] children: not-inline
+ RadioButton <input> at [285.171875,89.5] inline-block [5+0+0 12 0+0+3] [3+0+0 12 0+0+0] children: not-inline
TextNode <#text> (not painted)
TextNode <#text> (not painted)
BlockContainer <li> at [409.96875,60] floating [0+5+10 50 10+5+0] [0+5+10 90 10+5+0] [BFC] children: inline
@@ -61,36 +61,36 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
"erbarme dich"
TextNode <#text> (not painted)
BlockContainer <p> at [20,335] [0+0+0 480 0+0+0] [0+0+0 65 0+0+0] children: inline
- frag 0 from TextNode start: 13, length: 86, rect: [20,336 448.296875x10] baseline: 8
+ frag 0 from TextNode start: 13, length: 86, rect: [20,336.5 448.296875x10] baseline: 8
"This is a nonsensical document, but syntactically valid HTML 4.0. All 100%-conformant "
- frag 1 from TextNode start: 111, length: 4, rect: [468.296875,336 25.390625x10] baseline: 8
+ frag 1 from TextNode start: 111, length: 4, rect: [468.296875,336.5 25.390625x10] baseline: 8
"CSS1"
- frag 2 from TextNode start: 116, length: 74, rect: [20,349 396.96875x10] baseline: 8
+ frag 2 from TextNode start: 116, length: 74, rect: [20,349.5 396.96875x10] baseline: 8
"agents should be able to render the document elements above this paragraph"
- frag 3 from TextNode start: 203, length: 43, rect: [20,362 207.9375x10] baseline: 8
+ frag 3 from TextNode start: 203, length: 43, rect: [20,362.5 207.9375x10] baseline: 8
"indistinguishably (to the pixel) from this "
- frag 4 from TextNode start: 0, length: 1, rect: [330.96875,362 5x10] baseline: 8
+ frag 4 from TextNode start: 0, length: 1, rect: [330.96875,362.5 5x10] baseline: 8
" "
- frag 5 from TextNode start: 13, length: 30, rect: [335.96875,362 154.671875x10] baseline: 8
+ frag 5 from TextNode start: 13, length: 30, rect: [335.96875,362.5 154.671875x10] baseline: 8
"(except font rasterization and"
- frag 6 from TextNode start: 44, length: 56, rect: [20,375 286.6875x10] baseline: 8
+ frag 6 from TextNode start: 44, length: 56, rect: [20,375.5 286.6875x10] baseline: 8
"form widgets). All discrepancies should be traceable to "
- frag 7 from TextNode start: 112, length: 33, rect: [306.6875,375 178.40625x10] baseline: 8
+ frag 7 from TextNode start: 112, length: 33, rect: [306.6875,375.5 178.40625x10] baseline: 8
"CSS1 implementation shortcomings."
- frag 8 from TextNode start: 146, length: 53, rect: [20,388 271.421875x10] baseline: 8
+ frag 8 from TextNode start: 146, length: 53, rect: [20,388.5 271.421875x10] baseline: 8
"Once you have finished evaluating this test, you can "
- frag 9 from TextNode start: 211, length: 14, rect: [291.421875,388 74.171875x10] baseline: 8
+ frag 9 from TextNode start: 211, length: 14, rect: [291.421875,388.5 74.171875x10] baseline: 8
"return to the "
- frag 10 from TextNode start: 0, length: 1, rect: [425.5,388 2.71875x10] baseline: 8
+ frag 10 from TextNode start: 0, length: 1, rect: [425.5,388.5 2.71875x10] baseline: 8
"."
TextNode <#text> (not painted)
- InlineNode <a> at [227.9375,362] [0+0+0 103.03125 0+0+0] [0+0+0 10 0+0+0]
- frag 0 from TextNode start: 0, length: 20, rect: [227.9375,362 103.03125x10] baseline: 8
+ InlineNode <a> at [227.9375,362.5] [0+0+0 103.03125 0+0+0] [0+0+0 10 0+0+0]
+ frag 0 from TextNode start: 0, length: 20, rect: [227.9375,362.5 103.03125x10] baseline: 8
"reference rendering,"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
- InlineNode <a> at [365.59375,388] [0+0+0 59.90625 0+0+0] [0+0+0 10 0+0+0]
- frag 0 from TextNode start: 0, length: 11, rect: [365.59375,388 59.90625x10] baseline: 8
+ InlineNode <a> at [365.59375,388.5] [0+0+0 59.90625 0+0+0] [0+0+0 10 0+0+0]
+ frag 0 from TextNode start: 0, length: 11, rect: [365.59375,388.5 59.90625x10] baseline: 8
"parent page"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/atomic-inline-with-calculated-vertical-align.txt b/Tests/LibWeb/Layout/expected/block-and-inline/atomic-inline-with-calculated-vertical-align.txt
index a6763fe4a00..3feb0ad0e0b 100644
--- a/Tests/LibWeb/Layout/expected/block-and-inline/atomic-inline-with-calculated-vertical-align.txt
+++ b/Tests/LibWeb/Layout/expected/block-and-inline/atomic-inline-with-calculated-vertical-align.txt
@@ -3,9 +3,9 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 80 0+0+0] children: inline
frag 0 from TextNode start: 0, length: 12, rect: [0,32 104.15625x16] baseline: 13
"Get in touch"
- frag 1 from BlockContainer start: 0, length: 0, rect: [104.15625,30 16x16] baseline: 16
+ frag 1 from BlockContainer start: 0, length: 0, rect: [104.15625,30.953125 16x16] baseline: 16
TextNode <#text> (not painted)
- BlockContainer <span.icon> at [104.15625,30] inline-block [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
+ BlockContainer <span.icon> at [104.15625,30.953125] inline-block [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-vertical-align-middle.txt b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-vertical-align-middle.txt
index efdee832f89..6a61fed53b1 100644
--- a/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-vertical-align-middle.txt
+++ b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-vertical-align-middle.txt
@@ -1,8 +1,8 @@
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 116 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 100 0+0+8] children: inline
- InlineNode <span> at [8,49] [0+0+0 135.15625 0+0+0] [0+0+0 16 0+0+0]
- frag 0 from TextNode start: 0, length: 4, rect: [8,49 35.15625x16] baseline: 13
+ InlineNode <span> at [8,49.296875] [0+0+0 135.15625 0+0+0] [0+0+0 16 0+0+0]
+ frag 0 from TextNode start: 0, length: 4, rect: [8,49.296875 35.15625x16] baseline: 13
"foo "
frag 1 from BlockContainer start: 0, length: 0, rect: [43.15625,8 100x100] baseline: 54.296875
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/flex/intrinsic-sizing-uses-inline-flex-baseline.txt b/Tests/LibWeb/Layout/expected/flex/intrinsic-sizing-uses-inline-flex-baseline.txt
index 4c5c85a26e4..b9487c618dc 100644
--- a/Tests/LibWeb/Layout/expected/flex/intrinsic-sizing-uses-inline-flex-baseline.txt
+++ b/Tests/LibWeb/Layout/expected/flex/intrinsic-sizing-uses-inline-flex-baseline.txt
@@ -3,12 +3,12 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 32 0+0+0] children: not-inline
Box <div.row> at [0,0] flex-container(row) [0+0+0 800 0+0+0] [0+0+0 32 0+0+0] [FFC] children: not-inline
BlockContainer <div.item> at [0,0] flex-item [0+0+0 164.9375 0+0+0] [0+0+0 32 0+0+0] [BFC] children: inline
- frag 0 from Box start: 0, length: 0, rect: [13,1 48.203125x30] baseline: 19.5
- frag 1 from TextNode start: 0, length: 14, rect: [74.203125,8 90.734375x14] baseline: 11
+ frag 0 from Box start: 0, length: 0, rect: [13,1 48.203125x30] baseline: 20
+ frag 1 from TextNode start: 0, length: 14, rect: [74.203125,9 90.734375x14] baseline: 11
" trailing text"
Box <span.button> at [13,1] flex-container(row) [0+1+12 48.203125 12+1+0] [0+1+0 30 0+1+0] [FFC] children: not-inline
BlockContainer <(anonymous)> at [13,5.5] flex-item [0+0+0 48.203125 0+0+0] [0+0+0 21 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [13,8.5 48.203125x14] baseline: 11
+ frag 0 from TextNode start: 0, length: 7, rect: [13,9 48.203125x14] baseline: 11
"Filters"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/float-after-short-inline-block-goes-below-line-box.txt b/Tests/LibWeb/Layout/expected/float-after-short-inline-block-goes-below-line-box.txt
index 312da2698b9..00286172894 100644
--- a/Tests/LibWeb/Layout/expected/float-after-short-inline-block-goes-below-line-box.txt
+++ b/Tests/LibWeb/Layout/expected/float-after-short-inline-block-goes-below-line-box.txt
@@ -1,6 +1,6 @@
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 385.328125 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [0,0] [0+0+0 400 0+0+400] [0+0+0 385.328125 0+0+0] children: not-inline
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 385.515625 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [0,0] [0+0+0 400 0+0+400] [0+0+0 385.515625 0+0+0] children: not-inline
BlockContainer <div> at [0,0] [0+0+0 400 0+0+0] [0+0+0 26 0+0+0] [BFC] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [20,12 200x1] baseline: 1
BlockContainer <div.short> at [20,12] inline-block [20+0+0 200 0+0+0] [0+0+0 1 0+0+0] [BFC] children: not-inline
@@ -17,7 +17,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <div.short.tall> at [61.671875,69] inline-block [20+0+0 200 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
BlockContainer <div.wide> at [0,102] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
BlockContainer <div> at [0,112] [0+0+0 400 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 5, rect: [0,118 41.671875x16] baseline: 13
+ frag 0 from TextNode start: 0, length: 5, rect: [0,118.296875 41.671875x16] baseline: 13
"gjpqy"
frag 1 from BlockContainer start: 0, length: 0, rect: [61.671875,112 200x30] baseline: 19.296875
TextNode <#text> (not painted)
@@ -32,46 +32,46 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <div.short.tall.narrow.text-top> at [61.671875,166] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
BlockContainer <div.short.tall.narrow.text-bottom> at [131.671875,152] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
BlockContainer <div.wide> at [0,196] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [0,206] [0+0+0 400 0+0+0] [0+0+0 48.328125 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 5, rect: [0,228 41.671875x16] baseline: 13
+ BlockContainer <div> at [0,206] [0+0+0 400 0+0+0] [0+0+0 48.515625 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 5, rect: [0,228.328125 41.671875x16] baseline: 13
"gjpqy"
frag 1 from BlockContainer start: 0, length: 0, rect: [61.671875,206 50x30] baseline: 30
- frag 2 from BlockContainer start: 0, length: 0, rect: [131.671875,214 50x30] baseline: 30
+ frag 2 from BlockContainer start: 0, length: 0, rect: [131.671875,214.515625 50x30] baseline: 30
TextNode <#text> (not painted)
BlockContainer <div.short.tall.narrow.super> at [61.671875,206] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
- BlockContainer <div.short.tall.narrow.sub> at [131.671875,214] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
- BlockContainer <div.wide> at [0,244.328125] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [0,254.328125] [0+0+0 400 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 5, rect: [0,260.328125 41.671875x16] baseline: 13
+ BlockContainer <div.short.tall.narrow.sub> at [131.671875,214.515625] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
+ BlockContainer <div.wide> at [0,244.515625] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [0,254.515625] [0+0+0 400 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 5, rect: [0,260.8125 41.671875x16] baseline: 13
"gjpqy"
- frag 1 from BlockContainer start: 0, length: 0, rect: [61.671875,254.328125 50x30] baseline: 0
- frag 2 from BlockContainer start: 0, length: 0, rect: [131.671875,254.328125 50x30] baseline: 19.296875
+ frag 1 from BlockContainer start: 0, length: 0, rect: [61.671875,254.515625 50x30] baseline: 0
+ frag 2 from BlockContainer start: 0, length: 0, rect: [131.671875,254.515625 50x30] baseline: 19.296875
TextNode <#text> (not painted)
- BlockContainer <div.short.tall.narrow.top> at [61.671875,254.328125] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
- BlockContainer <div.short.tall.narrow.middle> at [131.671875,254.328125] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
- BlockContainer <div.wide> at [0,284.328125] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [0,294.328125] [0+0+0 400 0+0+0] [0+0+0 41 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 15, rect: [0,309.328125 125.015625x16] baseline: 13
+ BlockContainer <div.short.tall.narrow.top> at [61.671875,254.515625] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
+ BlockContainer <div.short.tall.narrow.middle> at [131.671875,254.515625] inline-block [20+0+0 50 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
+ BlockContainer <div.wide> at [0,284.515625] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [0,294.515625] [0+0+0 400 0+0+0] [0+0+0 41 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 15, rect: [0,309.515625 125.015625x16] baseline: 13
"gjpqygjpqygjpqy"
TextNode <#text> (not painted)
- InlineNode <span.raised> at [125.015625,294.328125] [0+0+0 41.671875 0+0+0] [0+0+0 16 0+0+0]
- frag 0 from TextNode start: 0, length: 5, rect: [125.015625,294.328125 41.671875x16] baseline: 13
+ InlineNode <span.raised> at [125.015625,294.515625] [0+0+0 41.671875 0+0+0] [0+0+0 16 0+0+0]
+ frag 0 from TextNode start: 0, length: 5, rect: [125.015625,294.515625 41.671875x16] baseline: 13
"gjpqy"
TextNode <#text> (not painted)
- BlockContainer <div.wide> at [0,325.328125] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [0,335.328125] [0+0+0 400 0+0+0] [0+0+0 50 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 10, rect: [0,354.328125 83.34375x16] baseline: 13
+ BlockContainer <div.wide> at [0,325.515625] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [0,335.515625] [0+0+0 400 0+0+0] [0+0+0 50 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 10, rect: [0,354.515625 83.34375x16] baseline: 13
"gjpqygjpqy"
TextNode <#text> (not painted)
- InlineNode <span.big> at [83.34375,335.328125] [0+0+0 28.90625 0+0+0] [0+0+0 40 0+0+0]
- frag 0 from TextNode start: 0, length: 1, rect: [83.34375,335.328125 28.90625x40] baseline: 32
+ InlineNode <span.big> at [83.34375,335.515625] [0+0+0 28.90625 0+0+0] [0+0+0 40 0+0+0]
+ frag 0 from TextNode start: 0, length: 1, rect: [83.34375,335.515625 28.90625x40] baseline: 32
"X"
TextNode <#text> (not painted)
- InlineNode <span.sub> at [112.25,357.328125] [0+0+0 41.671875 0+0+0] [0+0+0 16 0+0+0]
- frag 0 from TextNode start: 0, length: 5, rect: [112.25,357.328125 41.671875x16] baseline: 13
+ InlineNode <span.sub> at [112.25,357.703125] [0+0+0 41.671875 0+0+0] [0+0+0 16 0+0+0]
+ frag 0 from TextNode start: 0, length: 5, rect: [112.25,357.703125 41.671875x16] baseline: 13
"gjpqy"
TextNode <#text> (not painted)
- BlockContainer <div.wide> at [0,375.328125] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
+ BlockContainer <div.wide> at [0,375.515625] floating [0+0+0 300 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x385.328125] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x385.515625] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/form-controls-and-canvas-resized-after-first-layout.txt b/Tests/LibWeb/Layout/expected/form-controls-and-canvas-resized-after-first-layout.txt
index c49fcbec2e2..c0e2fa57b74 100644
--- a/Tests/LibWeb/Layout/expected/form-controls-and-canvas-resized-after-first-layout.txt
+++ b/Tests/LibWeb/Layout/expected/form-controls-and-canvas-resized-after-first-layout.txt
@@ -1,27 +1,27 @@
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 127 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 111 0+0+8] children: inline
- frag 0 from TextAreaBox start: 0, length: 0, rect: [11,34 239.53125x56] baseline: 62
- frag 1 from TextNode start: 0, length: 1, rect: [253.53125,80 8x16] baseline: 13
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 127.84375 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 111.84375 0+0+8] children: inline
+ frag 0 from TextAreaBox start: 0, length: 0, rect: [11,34.84375 239.53125x56] baseline: 62
+ frag 1 from TextNode start: 0, length: 1, rect: [253.53125,80.84375 8x16] baseline: 13
" "
- frag 2 from TextInputBox start: 0, length: 0, rect: [266.53125,82 207.609375x14] baseline: 14
- frag 3 from TextNode start: 0, length: 1, rect: [479.140625,80 8x16] baseline: 13
+ frag 2 from TextInputBox start: 0, length: 0, rect: [266.53125,82.84375 207.609375x14] baseline: 14
+ frag 3 from TextNode start: 0, length: 1, rect: [479.140625,80.84375 8x16] baseline: 13
" "
frag 4 from TextAreaBox start: 0, length: 0, rect: [490.140625,11 70x79.84375] baseline: 85.84375
- frag 5 from TextNode start: 0, length: 1, rect: [563.140625,80 8x16] baseline: 13
+ frag 5 from TextNode start: 0, length: 1, rect: [563.140625,80.84375 8x16] baseline: 13
" "
- frag 6 from CanvasBox start: 0, length: 0, rect: [571.140625,73 120x20] baseline: 20
- frag 7 from BlockContainer start: 0, length: 0, rect: [13,102 127.765625x14] baseline: 14
- TextAreaBox <textarea#textarea> at [11,34] inline-block [0+1+2 239.53125 2+1+0] [0+1+2 56 2+1+0] [BFC] children: not-inline
- Box <div> at [11,34] flex-container(row) [0+0+0 239.53125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [11,34] flex-item [0+0+0 239.53125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [11,34 0x14] baseline: 11
+ frag 6 from CanvasBox start: 0, length: 0, rect: [571.140625,73.84375 120x20] baseline: 20
+ frag 7 from BlockContainer start: 0, length: 0, rect: [13,102.84375 127.765625x14] baseline: 14
+ TextAreaBox <textarea#textarea> at [11,34.84375] inline-block [0+1+2 239.53125 2+1+0] [0+1+2 56 2+1+0] [BFC] children: not-inline
+ Box <div> at [11,34.84375] flex-container(row) [0+0+0 239.53125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [11,34.84375] flex-item [0+0+0 239.53125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [11,34.84375 0x14] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
- TextInputBox <input#input> at [266.53125,82] inline-block [0+2+3 207.609375 3+2+0] [0+2+1 14 1+2+0] [BFC] children: not-inline
- Box <div> at [266.53125,82] flex-container(row) [0+0+0 207.609375 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [266.53125,82] flex-item [0+0+0 207.609375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [266.53125,82 0x14] baseline: 11
+ TextInputBox <input#input> at [266.53125,82.84375] inline-block [0+2+3 207.609375 3+2+0] [0+2+1 14 1+2+0] [BFC] children: not-inline
+ Box <div> at [266.53125,82.84375] flex-container(row) [0+0+0 207.609375 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [266.53125,82.84375] flex-item [0+0+0 207.609375 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [266.53125,82.84375 0x14] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
TextAreaBox <textarea#vertical-textarea> at [490.140625,11] inline-block [0+1+2 70 2+1+0] [0+1+2 79.84375 2+1+0] [BFC] children: not-inline
@@ -30,14 +30,14 @@ 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: 0, rect: [546.140625,11 14x0] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
- CanvasBox <canvas#canvas> at [571.140625,73] [0+0+0 120 0+0+0] [0+0+0 20 0+0+0] children: not-inline
+ CanvasBox <canvas#canvas> at [571.140625,73.84375] [0+0+0 120 0+0+0] [0+0+0 20 0+0+0] children: not-inline
TextNode <#text> (not painted)
- BlockContainer <input#becomes-text> at [13,102] inline-block [0+2+3 127.765625 3+2+0] [0+2+1 14 1+2+0] [BFC] children: not-inline
- Box <div> at [13,102] flex-container(row) [0+0+0 127.765625 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [13,102] flex-item [0+0+0 127.765625 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [13,102 0x14] baseline: 11
+ BlockContainer <input#becomes-text> at [13,102.84375] inline-block [0+2+3 127.765625 3+2+0] [0+2+1 14 1+2+0] [BFC] children: not-inline
+ Box <div> at [13,102.84375] flex-container(row) [0+0+0 127.765625 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [13,102.84375] flex-item [0+0+0 127.765625 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [13,102.84375 0x14] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x127] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x127.84375] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/grid/intrinsic-sizing-uses-inline-grid-baseline.txt b/Tests/LibWeb/Layout/expected/grid/intrinsic-sizing-uses-inline-grid-baseline.txt
index 6adbf5fe1de..356ff5db463 100644
--- a/Tests/LibWeb/Layout/expected/grid/intrinsic-sizing-uses-inline-grid-baseline.txt
+++ b/Tests/LibWeb/Layout/expected/grid/intrinsic-sizing-uses-inline-grid-baseline.txt
@@ -3,12 +3,12 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 32 0+0+0] children: not-inline
Box <div.row> at [0,0] flex-container(row) [0+0+0 800 0+0+0] [0+0+0 32 0+0+0] [FFC] children: not-inline
BlockContainer <div.item> at [0,0] flex-item [0+0+0 164.9375 0+0+0] [0+0+0 32 0+0+0] [BFC] children: inline
- frag 0 from Box start: 0, length: 0, rect: [13,1 48.203125x30] baseline: 19.5
- frag 1 from TextNode start: 0, length: 14, rect: [74.203125,8 90.734375x14] baseline: 11
+ frag 0 from Box start: 0, length: 0, rect: [13,1 48.203125x30] baseline: 20
+ frag 1 from TextNode start: 0, length: 14, rect: [74.203125,9 90.734375x14] baseline: 11
" trailing text"
Box <span.button> at [13,1] [0+1+12 48.203125 12+1+0] [0+1+0 30 0+1+0] [GFC] children: not-inline
BlockContainer <(anonymous)> at [13,5.5] [0+0+0 48.203125 0+0+0] [0+0+0 21 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [13,8.5 48.203125x14] baseline: 11
+ frag 0 from TextNode start: 0, length: 7, rect: [13,9 48.203125x14] baseline: 11
"Filters"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/inline-block-baseline-vertical-writing-mode.txt b/Tests/LibWeb/Layout/expected/inline-block-baseline-vertical-writing-mode.txt
index 171d23b82cf..ea69dd26c67 100644
--- a/Tests/LibWeb/Layout/expected/inline-block-baseline-vertical-writing-mode.txt
+++ b/Tests/LibWeb/Layout/expected/inline-block-baseline-vertical-writing-mode.txt
@@ -1,15 +1,15 @@
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 112.28125 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 96.28125 0+0+8] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [8,54 60.53125x16] baseline: 13
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 111.640625 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 95.640625 0+0+8] children: inline
+ frag 0 from TextNode start: 0, length: 7, rect: [8,54.640625 60.53125x16] baseline: 13
"before "
frag 1 from BlockContainer start: 0, length: 0, rect: [68.53125,8 100x59.640625] baseline: 59.640625
- frag 2 from TextNode start: 0, length: 6, rect: [168.53125,54 48.1875x16] baseline: 13
+ frag 2 from TextNode start: 0, length: 6, rect: [168.53125,54.640625 48.1875x16] baseline: 13
" after"
- frag 3 from TextNode start: 1, length: 7, rect: [8,87 60.53125x16] baseline: 13
+ frag 3 from TextNode start: 1, length: 7, rect: [8,87.640625 60.53125x16] baseline: 13
"before "
- frag 4 from BlockContainer start: 0, length: 0, rect: [68.53125,70 100x30] baseline: 30
- frag 5 from TextNode start: 0, length: 6, rect: [168.53125,87 48.1875x16] baseline: 13
+ frag 4 from BlockContainer start: 0, length: 0, rect: [68.53125,70.640625 100x30] baseline: 30
+ frag 5 from TextNode start: 0, length: 6, rect: [168.53125,87.640625 48.1875x16] baseline: 13
" after"
TextNode <#text> (not painted)
BlockContainer <div> at [68.53125,8] inline-block [0+0+0 100 0+0+0] [0+0+0 59.640625 0+0+0] [BFC] children: inline
@@ -19,10 +19,10 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
TextNode <#text> (not painted)
BreakNode <br> (not painted)
TextNode <#text> (not painted)
- BlockContainer <div> at [68.53125,70] inline-block [0+0+0 100 0+0+0] [0+0+0 30 0+0+0] [BFC] children: inline
- frag 0 from BlockContainer start: 0, length: 0, rect: [155.53125,70 10x30] baseline: 10
- BlockContainer <span> at [155.53125,70] inline-block [0+0+0 10 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [68.53125,70.640625] inline-block [0+0+0 100 0+0+0] [0+0+0 30 0+0+0] [BFC] children: inline
+ frag 0 from BlockContainer start: 0, length: 0, rect: [155.53125,70.640625 10x30] baseline: 10
+ BlockContainer <span> at [155.53125,70.640625] inline-block [0+0+0 10 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x112.28125] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x111.640625] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/inline-button-line-height.txt b/Tests/LibWeb/Layout/expected/inline-button-line-height.txt
index 6ddef72ddc8..3202e8a77d9 100644
--- a/Tests/LibWeb/Layout/expected/inline-button-line-height.txt
+++ b/Tests/LibWeb/Layout/expected/inline-button-line-height.txt
@@ -6,25 +6,25 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
Box <div.radios--main> at [8,8] flex-container(row) flex-item [0+0+0 157 6+0+0] [0+0+0 47 16+0+0] [FFC] children: not-inline
RadioButton <input.radios--input> at [8,8] flex-item [0+0+0 1 0+0+0] [0+0+0 1 0+0+0] children: not-inline
BlockContainer <label.radios--value-button> at [27,10] flex-item [0+2+16 120 16+2+0] [0+2+0 43 0+2+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 6, rect: [27,21 120x20] baseline: 16
+ frag 0 from TextNode start: 0, length: 6, rect: [27,21.5 120x20] baseline: 16
"100 ML"
TextNode <#text> (not painted)
Box <div.radios--main> at [8,71] flex-container(row) flex-item [0+0+0 137 6+0+0] [0+0+0 47 16+0+0] [FFC] children: not-inline
RadioButton <input.radios--input> at [8,71] flex-item [0+0+0 1 0+0+0] [0+0+0 1 0+0+0] children: not-inline
BlockContainer <label.radios--value-button> at [27,73] flex-item [0+2+16 100 16+2+0] [0+2+0 43 0+2+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 5, rect: [27,84 100x20] baseline: 16
+ frag 0 from TextNode start: 0, length: 5, rect: [27,84.5 100x20] baseline: 16
"50 ML"
TextNode <#text> (not painted)
Box <div.radios--main> at [151,71] flex-container(row) flex-item [0+0+0 137 6+0+0] [0+0+0 47 16+0+0] [FFC] children: not-inline
RadioButton <input.radios--input> at [151,71] flex-item [0+0+0 1 0+0+0] [0+0+0 1 0+0+0] children: not-inline
BlockContainer <label.radios--value-button> at [170,73] flex-item [0+2+16 100 16+2+0] [0+2+0 43 0+2+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 5, rect: [170,84 100x20] baseline: 16
+ frag 0 from TextNode start: 0, length: 5, rect: [170,84.5 100x20] baseline: 16
"30 ML"
TextNode <#text> (not painted)
Box <div.radios--main> at [8,134] flex-container(row) flex-item [0+0+0 117 0+0+0] [0+0+0 47 16+0+0] [FFC] children: not-inline
RadioButton <input.radios--input> at [8,134] flex-item [0+0+0 1 0+0+0] [0+0+0 1 0+0+0] children: not-inline
BlockContainer <label.radios--value-button> at [27,136] flex-item [0+2+16 80 16+2+0] [0+2+0 43 0+2+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 4, rect: [27,147 80x20] baseline: 16
+ frag 0 from TextNode start: 0, length: 4, rect: [27,147.5 80x20] baseline: 16
"15ML"
TextNode <#text> (not painted)
BlockContainer <(anonymous)> at [8,197] [0+0+0 300 0+0+0] [0+0+0 154 0+0+0] children: inline
diff --git a/Tests/LibWeb/Layout/expected/inline-fieldset-positioning-containing-block.txt b/Tests/LibWeb/Layout/expected/inline-fieldset-positioning-containing-block.txt
index d3a75fd7eb7..fde89383420 100644
--- a/Tests/LibWeb/Layout/expected/inline-fieldset-positioning-containing-block.txt
+++ b/Tests/LibWeb/Layout/expected/inline-fieldset-positioning-containing-block.txt
@@ -1,12 +1,12 @@
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 123.1875 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 123.1875 0+0+0] children: inline
- frag 0 from FieldSetBox start: 0, length: 0, rect: [14,7 100x100] baseline: 119.59375
- FieldSetBox <fieldset> at [64,7] positioned inline-block [0+2+12 100 12+2+0] [0+2+5.59375 100 10+2+0] [BFC] children: not-inline
- BlockContainer <div> at [52,1.40625] positioned [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inline
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 122.59375 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 122.59375 0+0+0] children: inline
+ frag 0 from FieldSetBox start: 0, length: 0, rect: [14,7.59375 100x100] baseline: 119.59375
+ FieldSetBox <fieldset> at [64,7.59375] positioned inline-block [0+2+12 100 12+2+0] [0+2+5.59375 100 10+2+0] [BFC] children: not-inline
+ BlockContainer <div> at [52,2] positioned [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inline
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x123.1875] (z-index: auto)
- SC for FieldSetBox<FIELDSET> [64,7 100x100] (z-index: auto), has_transform
- SC for BlockContainer<DIV> [52,1.40625 20x20] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x122.59375] (z-index: auto)
+ SC for FieldSetBox<FIELDSET> [64,7.59375 100x100] (z-index: auto), has_transform
+ SC for BlockContainer<DIV> [52,2 20x20] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/input-placeholder-with-line-height.txt b/Tests/LibWeb/Layout/expected/input-placeholder-with-line-height.txt
index 2f61cfaf9c3..91d166d967c 100644
--- a/Tests/LibWeb/Layout/expected/input-placeholder-with-line-height.txt
+++ b/Tests/LibWeb/Layout/expected/input-placeholder-with-line-height.txt
@@ -2,15 +2,15 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 88.640625 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 72.640625 0+0+8] children: inline
frag 0 from TextInputBox start: 0, length: 0, rect: [13,11 167.6875x66.640625] baseline: 40.609375
- frag 1 from TextNode start: 0, length: 4, rect: [185.6875,35 32.140625x16] baseline: 13
+ frag 1 from TextNode start: 0, length: 4, rect: [185.6875,35.609375 32.140625x16] baseline: 13
"text"
TextInputBox <input> at [13,11] inline-block [0+2+3 167.6875 3+2+0] [0+2+1 66.640625 1+2+0] [BFC] children: not-inline
Box <div> at [13,11] flex-container(row) [0+0+0 167.6875 0+0+0] [0+0+0 66.640625 0+0+0] [FFC] children: not-inline
BlockContainer <div> at [13,11] flex-item [0+0+0 167.6875 0+0+0] [0+0+0 66.640625 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [13,37 0x14] baseline: 11
+ frag 0 from TextNode start: 0, length: 0, rect: [13,37.3125 0x14] baseline: 11
TextNode <#text> (not painted)
BlockContainer <div> at [13,11] flex-item [-167.6875+0+0 167.6875 0+0+0] [0+0+0 66.640625 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 11, rect: [13,37 74.90625x14] baseline: 11
+ frag 0 from TextNode start: 0, length: 11, rect: [13,37.3125 74.90625x14] baseline: 11
"placeholder"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/pdf-viewer.txt b/Tests/LibWeb/Layout/expected/pdf-viewer.txt
index d14a907b868..1dc9a1d4445 100644
--- a/Tests/LibWeb/Layout/expected/pdf-viewer.txt
+++ b/Tests/LibWeb/Layout/expected/pdf-viewer.txt
@@ -202,7 +202,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
CanvasBox <canvas> at [233.5,42] positioned [0+0+0 333 0+0+0] [0+0+0 133 0+0+0] children: not-inline
BlockContainer <div.textLayer.selectionRendering> at [233.5,42] positioned [0+0+0 333 0+0+0] [0+0+0 133 0+0+0] [BFC] children: inline
BlockContainer <span> at [316.75,64.9375] positioned [0+0+0 121.046875 0+0+0] [0+0+0 23.328125 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 9, rect: [316.75,63.9375 121.046875x24] baseline: 19
+ frag 0 from TextNode start: 0, length: 9, rect: [316.75,64.609375 121.046875x24] baseline: 19
"Hello PDF"
TextNode <#text> (not painted)
BlockContainer <div.endOfContent> at [233.5,175] positioned [0+0+0 333 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/select-baseline-from-label-text.txt b/Tests/LibWeb/Layout/expected/select-baseline-from-label-text.txt
index 57c821e7906..e7054c440ca 100644
--- a/Tests/LibWeb/Layout/expected/select-baseline-from-label-text.txt
+++ b/Tests/LibWeb/Layout/expected/select-baseline-from-label-text.txt
@@ -1,29 +1,29 @@
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 56 0+0+0] [BFC] children: not-inline
- BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 40 0+0+8] children: not-inline
- BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 20 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 3, rect: [8,9 29.265625x16] baseline: 13
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 56.296875 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 40.296875 0+0+8] children: not-inline
+ BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 20.296875 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 3, rect: [8,9.296875 29.265625x16] baseline: 13
"Xx "
- frag 1 from BlockContainer start: 0, length: 0, rect: [46.265625,11 67.03125x14] baseline: 14
- frag 2 from TextNode start: 0, length: 1, rect: [122.296875,9 8x16] baseline: 13
+ frag 1 from BlockContainer start: 0, length: 0, rect: [46.265625,11.296875 67.03125x14] baseline: 14
+ frag 2 from TextNode start: 0, length: 1, rect: [122.296875,9.296875 8x16] baseline: 13
" "
frag 3 from BlockContainer start: 0, length: 0, rect: [139.296875,11 19.65625x14] baseline: 14.296875
TextNode <#text> (not painted)
- BlockContainer <select> at [46.265625,11] inline-block [0+1+8 67.03125 8+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [46.265625,11] positioned flex-container(row) [0+0+0 67.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [46.265625,11] flex-item [0+0+0 47.03125 0+0+20] [0+0+0 14 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [46.265625,11] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [46.265625,11 47.03125x14] baseline: 11
+ BlockContainer <select> at [46.265625,11.296875] inline-block [0+1+8 67.03125 8+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
+ Box <div> at [46.265625,11.296875] positioned flex-container(row) [0+0+0 67.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [46.265625,11.296875] flex-item [0+0+0 47.03125 0+0+20] [0+0+0 14 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [46.265625,11.296875] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 7, rect: [46.265625,11.296875 47.03125x14] baseline: 11
"English"
TextNode <#text> (not painted)
- BlockContainer <div> at [46.265625,25] floating [0+0+0 47.03125 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [46.265625,25] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [46.265625,25 47.03125x14] baseline: 11
+ BlockContainer <div> at [46.265625,25.296875] floating [0+0+0 47.03125 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [46.265625,25.296875] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 7, rect: [46.265625,25.296875 47.03125x14] baseline: 11
"English"
TextNode <#text> (not painted)
- BlockContainer <div> at [97.296875,10] positioned [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: inline
- frag 0 from SVGSVGBox start: 0, length: 0, rect: [97.296875,10 16x16] baseline: 16
- SVGSVGBox <svg> at [97.296875,10] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] viewport-transform=[0.6666667 0 0 0.6666667 0 0] [SVG] children: not-inline
+ BlockContainer <div> at [97.296875,10.296875] positioned [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] [BFC] children: inline
+ frag 0 from SVGSVGBox start: 0, length: 0, rect: [97.296875,10.296875 16x16] baseline: 16
+ SVGSVGBox <svg> at [97.296875,10.296875] [0+0+0 16 0+0+0] [0+0+0 16 0+0+0] viewport-transform=[0.6666667 0 0 0.6666667 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
TextNode <#text> (not painted)
BlockContainer <input> at [139.296875,11] inline-block [0+2+7 19.65625 7+2+0] [0+2+1 14 1+2+0] [BFC] children: not-inline
@@ -34,23 +34,23 @@ 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: 2, rect: [139.296875,11 19.65625x14] baseline: 11
"Go"
TextNode <#text> (not painted)
- BlockContainer <div> at [8,28] [0+0+0 784 0+0+0] [0+0+0 20 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 3, rect: [8,29 29.265625x16] baseline: 13
+ BlockContainer <div> at [8,28.296875] [0+0+0 784 0+0+0] [0+0+0 20 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 3, rect: [8,29.296875 29.265625x16] baseline: 13
"Xx "
- frag 1 from BlockContainer start: 0, length: 0, rect: [46.265625,31 47.03125x14] baseline: 14
+ frag 1 from BlockContainer start: 0, length: 0, rect: [46.265625,31.296875 47.03125x14] baseline: 14
TextNode <#text> (not painted)
- BlockContainer <select> at [46.265625,31] inline-block [0+1+8 47.03125 8+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
- Box <div> at [46.265625,31] positioned flex-container(row) [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [46.265625,31] flex-item [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [46.265625,31] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [46.265625,31 47.03125x14] baseline: 11
+ BlockContainer <select> at [46.265625,31.296875] inline-block [0+1+8 47.03125 8+1+0] [0+1+2 14 2+1+0] [BFC] children: not-inline
+ Box <div> at [46.265625,31.296875] positioned flex-container(row) [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [46.265625,31.296875] flex-item [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [46.265625,31.296875] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 7, rect: [46.265625,31.296875 47.03125x14] baseline: 11
"English"
TextNode <#text> (not painted)
- BlockContainer <div> at [46.265625,45] floating [0+0+0 47.03125 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
- BlockContainer <div> at [46.265625,45] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 7, rect: [46.265625,45 47.03125x14] baseline: 11
+ BlockContainer <div> at [46.265625,45.296875] floating [0+0+0 47.03125 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
+ BlockContainer <div> at [46.265625,45.296875] [0+0+0 47.03125 0+0+0] [0+0+0 14 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 7, rect: [46.265625,45.296875 47.03125x14] baseline: 11
"English"
TextNode <#text> (not painted)
SC for Viewport<#document> [0,0 800x600] (z-index: auto)
- SC for BlockContainer<HTML> [0,0 800x56] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x56.296875] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/expected/tab-size-half-ch-threshold.txt b/Tests/LibWeb/Layout/expected/tab-size-half-ch-threshold.txt
index 14c087f5b07..ded49d3f4fb 100644
--- a/Tests/LibWeb/Layout/expected/tab-size-half-ch-threshold.txt
+++ b/Tests/LibWeb/Layout/expected/tab-size-half-ch-threshold.txt
@@ -3,7 +3,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 60 0+0+0] children: not-inline
BlockContainer <div> at [0,0] [0+0+0 800 0+0+0] [0+0+0 20 0+0+0] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [0,0 17.3125x10] baseline: 0
- frag 1 from TextNode start: 0, length: 1, rect: [17.3125,5 22.6875x9] baseline: 7
+ frag 1 from TextNode start: 0, length: 1, rect: [17.3125,5.5 22.6875x9] baseline: 7
" "
frag 2 from BlockContainer start: 0, length: 0, rect: [40,0 10x10] baseline: 0
BlockContainer <span> at [0,0] inline-block [0+0+0 17.3125 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
@@ -11,7 +11,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <span.after> at [40,0] inline-block [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
BlockContainer <div> at [0,20] [0+0+0 800 0+0+0] [0+0+0 20 0+0+0] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [0,20 17x10] baseline: 0
- frag 1 from TextNode start: 0, length: 1, rect: [17,25 3x9] baseline: 7
+ frag 1 from TextNode start: 0, length: 1, rect: [17,25.5 3x9] baseline: 7
" "
frag 2 from BlockContainer start: 0, length: 0, rect: [20,20 10x10] baseline: 0
BlockContainer <span> at [0,20] inline-block [0+0+0 17 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
@@ -19,7 +19,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <span.after> at [20,20] inline-block [0+0+0 10 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
BlockContainer <div> at [0,40] [0+0+0 800 0+0+0] [0+0+0 20 0+0+0] children: inline
frag 0 from BlockContainer start: 0, length: 0, rect: [0,40 18x10] baseline: 0
- frag 1 from TextNode start: 0, length: 1, rect: [18,45 22x9] baseline: 7
+ frag 1 from TextNode start: 0, length: 1, rect: [18,45.5 22x9] baseline: 7
" "
frag 2 from BlockContainer start: 0, length: 0, rect: [40,40 10x10] baseline: 0
BlockContainer <span> at [0,40] inline-block [0+0+0 18 0+0+0] [0+0+0 10 0+0+0] [BFC] children: not-inline
diff --git a/Tests/LibWeb/Layout/expected/table/percentage-row-height-does-not-shrink-other-rows.txt b/Tests/LibWeb/Layout/expected/table/percentage-row-height-does-not-shrink-other-rows.txt
index 0b21352bafe..ed71afd8e37 100644
--- a/Tests/LibWeb/Layout/expected/table/percentage-row-height-does-not-shrink-other-rows.txt
+++ b/Tests/LibWeb/Layout/expected/table/percentage-row-height-does-not-shrink-other-rows.txt
@@ -8,7 +8,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <div.first> at [8,8] [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] children: not-inline
Box <div.row> at [8,208] table-row [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] children: not-inline
BlockContainer <(anonymous)> at [8,208] table-cell [0+0+0 300 0+0+0] [0+0+0 200 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 4, rect: [8,210 46.984375x20] baseline: 16
+ frag 0 from TextNode start: 0, length: 4, rect: [8,210.5 46.984375x20] baseline: 16
"Text"
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/textarea-box-writing-modes.txt b/Tests/LibWeb/Layout/expected/textarea-box-writing-modes.txt
index 1cc5719c615..15985e43f4d 100644
--- a/Tests/LibWeb/Layout/expected/textarea-box-writing-modes.txt
+++ b/Tests/LibWeb/Layout/expected/textarea-box-writing-modes.txt
@@ -1,20 +1,20 @@
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 184.6875 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 168.6875 0+0+8] children: inline
- frag 0 from TextAreaBox start: 0, length: 0, rect: [11,142 159.6875x28] baseline: 34
- frag 1 from TextNode start: 0, length: 1, rect: [173.6875,160 8x16] baseline: 13
+ frag 0 from TextAreaBox start: 0, length: 0, rect: [11,142.6875 159.6875x28] baseline: 34
+ frag 1 from TextNode start: 0, length: 1, rect: [173.6875,160.6875 8x16] baseline: 13
" "
frag 2 from TextAreaBox start: 0, length: 0, rect: [184.6875,11 280x159.6875] baseline: 165.6875
- frag 3 from TextNode start: 0, length: 1, rect: [467.6875,160 8x16] baseline: 13
+ frag 3 from TextNode start: 0, length: 1, rect: [467.6875,160.6875 8x16] baseline: 13
" "
- frag 4 from TextAreaBox start: 0, length: 0, rect: [478.6875,142 39.921875x28] baseline: 34
- frag 5 from TextNode start: 0, length: 1, rect: [521.609375,160 8x16] baseline: 13
+ frag 4 from TextAreaBox start: 0, length: 0, rect: [478.6875,142.6875 39.921875x28] baseline: 34
+ frag 5 from TextNode start: 0, length: 1, rect: [521.609375,160.6875 8x16] baseline: 13
" "
- frag 6 from TextAreaBox start: 0, length: 0, rect: [532.609375,130 28x39.921875] baseline: 45.921875
- TextAreaBox <textarea> at [11,142] inline-block [0+1+2 159.6875 2+1+0] [0+1+2 28 2+1+0] [BFC] children: not-inline
- Box <div> at [11,142] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [11,142] 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: 0, rect: [11,142 0x14] baseline: 11
+ frag 6 from TextAreaBox start: 0, length: 0, rect: [532.609375,130.765625 28x39.921875] baseline: 45.921875
+ TextAreaBox <textarea> at [11,142.6875] inline-block [0+1+2 159.6875 2+1+0] [0+1+2 28 2+1+0] [BFC] children: not-inline
+ Box <div> at [11,142.6875] flex-container(row) [0+0+0 159.6875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [11,142.6875] 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: 0, rect: [11,142.6875 0x14] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
TextAreaBox <textarea> at [184.6875,11] inline-block [0+1+2 280 2+1+0] [0+1+2 159.6875 2+1+0] [BFC] children: not-inline
@@ -23,16 +23,16 @@ 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: 0, rect: [450.6875,11 14x0] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
- TextAreaBox <textarea> at [478.6875,142] inline-block [0+1+2 39.921875 2+1+0] [0+1+2 28 2+1+0] [BFC] children: not-inline
- Box <div> at [478.6875,142] flex-container(row) [0+0+0 39.921875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [478.6875,142] flex-item [0+0+0 39.921875 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [478.6875,142 0x14] baseline: 11
+ TextAreaBox <textarea> at [478.6875,142.6875] inline-block [0+1+2 39.921875 2+1+0] [0+1+2 28 2+1+0] [BFC] children: not-inline
+ Box <div> at [478.6875,142.6875] flex-container(row) [0+0+0 39.921875 0+0+0] [0+0+0 14 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [478.6875,142.6875] flex-item [0+0+0 39.921875 0+0+0] [0+0+0 14 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [478.6875,142.6875 0x14] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
- TextAreaBox <textarea> at [532.609375,130] inline-block [0+1+2 28 2+1+0] [0+1+2 39.921875 2+1+0] [BFC] children: not-inline
- Box <div> at [546.609375,130] flex-container(row) [0+0+0 14 0+0+0] [0+0+0 39.921875 0+0+0] [FFC] children: not-inline
- BlockContainer <div> at [546.609375,130] flex-item [0+0+0 14 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline
- frag 0 from TextNode start: 0, length: 0, rect: [546.609375,130 14x0] baseline: 11
+ TextAreaBox <textarea> at [532.609375,130.765625] inline-block [0+1+2 28 2+1+0] [0+1+2 39.921875 2+1+0] [BFC] children: not-inline
+ Box <div> at [546.609375,130.765625] flex-container(row) [0+0+0 14 0+0+0] [0+0+0 39.921875 0+0+0] [FFC] children: not-inline
+ BlockContainer <div> at [546.609375,130.765625] flex-item [0+0+0 14 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline
+ frag 0 from TextNode start: 0, length: 0, rect: [546.609375,130.765625 14x0] baseline: 11
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/tree-builder/fieldset-display-variants.txt b/Tests/LibWeb/Layout/expected/tree-builder/fieldset-display-variants.txt
index acdc5636508..3d6bde055e0 100644
--- a/Tests/LibWeb/Layout/expected/tree-builder/fieldset-display-variants.txt
+++ b/Tests/LibWeb/Layout/expected/tree-builder/fieldset-display-variants.txt
@@ -2,15 +2,15 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 436.75 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 420.75 0+0+8] children: not-inline
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 49.59375 0+0+0] children: inline
- frag 0 from FieldSetBox start: 0, length: 0, rect: [24,15 45.296875x30] baseline: 34.59375
- FieldSetBox <fieldset> at [24,15] inline-block [2+2+12 45.296875 12+2+2] [0+2+5.59375 30 10+2+0] [BFC] children: not-inline
- LegendBox <legend> at [26,7.40625] [0+0+2 41.296875 2+0+0] [0+0+0 16 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 6, rect: [26,7.40625 41.296875x16] baseline: 13
+ frag 0 from FieldSetBox start: 0, length: 0, rect: [24,15.59375 45.296875x30] baseline: 34.59375
+ FieldSetBox <fieldset> at [24,15.59375] inline-block [2+2+12 45.296875 12+2+2] [0+2+5.59375 30 10+2+0] [BFC] children: not-inline
+ LegendBox <legend> at [26,8] [0+0+2 41.296875 2+0+0] [0+0+0 16 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 6, rect: [26,8 41.296875x16] baseline: 13
"inline"
TextNode <#text> (not painted)
- BlockContainer <(anonymous)> at [24,29] [0+0+0 45.296875 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
- BlockContainer <(anonymous)> at [24,29] [0+0+0 45.296875 0+0+0] [0+0+0 16 0+0+0] children: inline
- frag 0 from TextNode start: 0, length: 4, rect: [24,29 32.140625x16] baseline: 13
+ BlockContainer <(anonymous)> at [24,29.59375] [0+0+0 45.296875 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
+ BlockContainer <(anonymous)> at [24,29.59375] [0+0+0 45.296875 0+0+0] [0+0+0 16 0+0+0] children: inline
+ frag 0 from TextNode start: 0, length: 4, rect: [24,29.59375 32.140625x16] baseline: 13
"text"
TextNode <#text> (not painted)
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/vertical-align-middle.txt b/Tests/LibWeb/Layout/expected/vertical-align-middle.txt
index c4621fa8629..84f32c32ab0 100644
--- a/Tests/LibWeb/Layout/expected/vertical-align-middle.txt
+++ b/Tests/LibWeb/Layout/expected/vertical-align-middle.txt
@@ -1,8 +1,8 @@
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 66 0+0+0] [BFC] children: not-inline
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 50 0+0+8] children: inline
- InlineNode <a> at [8,24] [0+0+0 91.296875 0+0+0] [0+0+0 16 0+0+0]
- frag 0 from TextNode start: 0, length: 6, rect: [8,24 41.296875x16] baseline: 13
+ InlineNode <a> at [8,24.296875] [0+0+0 91.296875 0+0+0] [0+0+0 16 0+0+0]
+ frag 0 from TextNode start: 0, length: 6, rect: [8,24.296875 41.296875x16] baseline: 13
"inline"
frag 1 from BlockContainer start: 0, length: 0, rect: [49.296875,8 50x50] baseline: 29.296875
TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-grid/subgrid/grid-gap-007-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-grid/subgrid/grid-gap-007-ref.html
index 7a341c02910..66774d3edab 100644
--- a/Tests/LibWeb/Ref/expected/wpt-import/css/css-grid/subgrid/grid-gap-007-ref.html
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-grid/subgrid/grid-gap-007-ref.html
@@ -32,7 +32,7 @@ span { background:grey; }
<span style="grid-area:1/1; background:lightgrey; width:60px; height:160px"></span>
<span style="grid-area:1/1">a</span>
<span style="grid-row:2; background:cyan">b</span>
- <span style="grid-area:2/2" class="vrl">ccc</span>
+ <span style="grid-area:2/2; background:cyan" class="vrl">ccc</span>
</div>
</body>
diff --git a/Tests/LibWeb/Screenshot/expected/css-filter.png b/Tests/LibWeb/Screenshot/expected/css-filter.png
index 96d221805fa..ddc1ff6800c 100644
Binary files a/Tests/LibWeb/Screenshot/expected/css-filter.png and b/Tests/LibWeb/Screenshot/expected/css-filter.png differ
diff --git a/Tests/LibWeb/Screenshot/input/color-scheme.html b/Tests/LibWeb/Screenshot/input/color-scheme.html
index 4e9d1d6edb0..6ee47eecbbc 100644
--- a/Tests/LibWeb/Screenshot/input/color-scheme.html
+++ b/Tests/LibWeb/Screenshot/input/color-scheme.html
@@ -1,9 +1,13 @@
<!DOCTYPE html>
+<meta name="fuzzy" content="maxDifference=0-2;totalPixels=0-1500">
<style>
body>div>div {
padding: 1em;
background-color: Canvas;
}
+ div:has(> progress) {
+ display: flex;
+ }
</style>
<div style="display: flex">
<div style="color-scheme: light">
diff --git a/Tests/LibWeb/Text/expected/css/text-bottom-icon-half-leading.txt b/Tests/LibWeb/Text/expected/css/text-bottom-icon-half-leading.txt
new file mode 100644
index 00000000000..28b1544fff9
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/css/text-bottom-icon-half-leading.txt
@@ -0,0 +1,2 @@
+Label top: 0.5, height: 20
+Icon top: 4.5
diff --git a/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt b/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt
index ffc7d226480..1a206cb800a 100644
--- a/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt
+++ b/Tests/LibWeb/Text/expected/intrinsic-inline-content-sizing.txt
@@ -20,7 +20,7 @@ nested atomic: 220x20, 50x80, 220x20, 120x60
nested blocks: 160x40, 50x80, 160x40, 120x60
block interruption: 110x60, 110x60, 110x60, 110x60
atomic constraints: 156x78, 96x98, 156x78, 120x98
-atomic percentages: 160x82.75, 50x67, 160x82.75, 120x77.5625
+atomic percentages: 160x82.375, 50x67, 160x82.375, 120x76.78125
negative margins: 112x20, 42x60, 112x20, 112x20
saturated advances: 80x20, 50x40, 80x20, 80x20
floats: 200x20, 50x80, 200x20, 120x40
diff --git a/Tests/LibWeb/Text/expected/vertical-align-super-and-sub-in-line-box.txt b/Tests/LibWeb/Text/expected/vertical-align-super-and-sub-in-line-box.txt
index 9b7bc9ad7a5..0a4de5d6082 100644
--- a/Tests/LibWeb/Text/expected/vertical-align-super-and-sub-in-line-box.txt
+++ b/Tests/LibWeb/Text/expected/vertical-align-super-and-sub-in-line-box.txt
@@ -3,7 +3,7 @@
3: 0+60 0+50 45+10
4: 0+60 45+10 0+50
5: 0+65 0+50 50+10
-6: 0+52 0+50 36+10
+6: 0+52 0+50 37+10
7: 0+60 0+50
-8: 0+35 14+10 0+30
+8: 0+35 15+10 0+30
9: 0+35 23+10 0+30
diff --git a/Tests/LibWeb/Text/input/css/text-bottom-icon-half-leading.html b/Tests/LibWeb/Text/input/css/text-bottom-icon-half-leading.html
new file mode 100644
index 00000000000..e133e61af70
--- /dev/null
+++ b/Tests/LibWeb/Text/input/css/text-bottom-icon-half-leading.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../include.js"></script>
+<style>
+ @font-face {
+ font-family: TestAhem;
+ src: url("../../../Ref/data/fonts/Ahem.ttf");
+ }
+ #line { font: 20px/21px TestAhem; }
+ svg { vertical-align: text-bottom; }
+</style>
+<div id="line"><span>Text</span><svg width="16" height="16"></svg></div>
+<script>
+ promiseTest(async () => {
+ await document.fonts.load("20px TestAhem");
+ const line = document.getElementById("line");
+ const [label, icon] = Array.from(line.children, child => child.getBoundingClientRect());
+ const top = line.getBoundingClientRect().top;
+ println(`Label top: ${label.top - top}, height: ${label.height}`);
+ println(`Icon top: ${icon.top - top}`);
+ });
+</script>