Truly independent web browser
LibWeb: Lay out subgrid tracks from the lines of the parent grid
Andreas Klingd6d43a899451
diff --git a/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rsindex 50206164d92..0de51672942 100644--- a/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs@@ -3473,13 +3473,13 @@ impl<'pass> GridFormattingContext<'pass> {item.is_column_only_subgrid}- fn apply_subgrid_edge_extra_margins(&self, item: &mut GridItem, axis: Axis) {+ /// The extra margin a subgrid gives the items at its start and end edges in a subgridded axis, in the order its+ /// tracks run.+ fn subgrid_edge_extra_margins(&self, axis: Axis) -> Option<(CssPixels, CssPixels)> {if !self.container_is_subgridded(axis) {- return;+ return None;}- let Some(container_as_parent_grid_item) = self.parent_grid_placement() else {- return;- };+ let parent = self.parent_grid_placement()?;// https://drafts.csswg.org/css-grid-2/#subgrid-margins// In this process, the sum of the subgrid's margin, padding, scrollbar// gutter, and border at each edge are applied as an extra layer of@@ -3488,61 +3488,47 @@ impl<'pass> GridFormattingContext<'pass> {// subgrids.//// NB: The cells of a box do not hold its scrollbar gutters yet.- let position = item.position(axis);- let span = item.span(axis);- let track_count = self.axis_tracks(axis).len() as i32;let used = &self.container_cells;let (left_or_top, right_or_bottom) = if axis.is_column() {(- used.margin_left() + used.border_left() + used.padding_left(),- used.padding_right() + used.border_right() + used.margin_right(),+ used.margin_left() + used.border_left() + used.padding_left() + parent.extra_margin_left,+ used.padding_right() + used.border_right() + used.margin_right() + parent.extra_margin_right,)} else {(- used.margin_top() + used.border_top() + used.padding_top(),- used.padding_bottom() + used.border_bottom() + used.margin_bottom(),+ used.margin_top() + used.border_top() + used.padding_top() + parent.extra_margin_top,+ used.padding_bottom() + used.border_bottom() + used.margin_bottom() + parent.extra_margin_bottom,)};- let parent = container_as_parent_grid_item;- let (item_left_or_top, item_right_or_bottom, parent_left_or_top, parent_right_or_bottom) = if axis.is_column() {- (- &mut item.extra_margin_left,- &mut item.extra_margin_right,- parent.extra_margin_left,- parent.extra_margin_right,- )+ Some(if self.tracks_are_reversed(axis) {+ (right_or_bottom, left_or_top)} else {- (- &mut item.extra_margin_top,- &mut item.extra_margin_bottom,- parent.extra_margin_top,- parent.extra_margin_bottom,- )+ (left_or_top, right_or_bottom)+ })+ }++ fn apply_subgrid_edge_extra_margins(&self, item: &mut GridItem, axis: Axis) {+ let Some((start, end)) = self.subgrid_edge_extra_margins(axis) else {+ return;};- let (start, end, item_start, item_end, parent_start, parent_end) = if self.tracks_are_reversed(axis) {- (- right_or_bottom,- left_or_top,- item_right_or_bottom,- item_left_or_top,- parent_right_or_bottom,- parent_left_or_top,- )+ let position = item.position(axis);+ let span = item.span(axis);+ let track_count = self.axis_tracks(axis).len() as i32;+ let (item_left_or_top, item_right_or_bottom) = if axis.is_column() {+ (&mut item.extra_margin_left, &mut item.extra_margin_right)} else {- (- left_or_top,- right_or_bottom,- item_left_or_top,- item_right_or_bottom,- parent_left_or_top,- parent_right_or_bottom,- )+ (&mut item.extra_margin_top, &mut item.extra_margin_bottom)+ };+ let (item_start, item_end) = if self.tracks_are_reversed(axis) {+ (item_right_or_bottom, item_left_or_top)+ } else {+ (item_left_or_top, item_right_or_bottom)};if position == 0 {- *item_start += start + parent_start;+ *item_start += start;}if position + span as i32 == track_count {- *item_end += end + parent_end;+ *item_end += end;}}@@ -4190,8 +4176,8 @@ impl<'pass> GridFormattingContext<'pass> {containing_for_wrapper,margin_box_start,margin_box_end,- base_margin_start + item.extra_margin_left,- base_margin_end + item.extra_margin_right,+ base_margin_start,+ base_margin_end,wrapper_style.margin_left().is_auto(),wrapper_style.margin_right().is_auto(),Self::aligned_position(@@ -4446,18 +4432,20 @@ impl<'pass> GridFormattingContext<'pass> {)};+ // NB: The used margins are the item's own. Its extra margin as an item at the edge of a subgrid is not part of+ // them, but of the margin box edges that item_margin_box_start() and item_margin_box_end() give.let cells = self.cells_of(item);let (used_margin_start, used_margin_end, start_auto, end_auto) = if axis.is_column() {(- cells.margin_left + item.extra_margin_left,- cells.margin_right + item.extra_margin_right,+ cells.margin_left,+ cells.margin_right,style.margin_left().is_auto(),style.margin_right().is_auto(),)} else {(- cells.margin_top + item.extra_margin_top,- cells.margin_bottom + item.extra_margin_bottom,+ cells.margin_top,+ cells.margin_bottom,style.margin_top().is_auto(),style.margin_bottom().is_auto(),)@@ -4574,9 +4562,20 @@ impl<'pass> GridFormattingContext<'pass> {.fold(CssPixels::default(), |sum, track| sum + track.base_size)}+ /// The offset from the content edge the tracks in the given axis start at.+ fn axis_track_origin(&self, axis: Axis) -> CssPixels {+ // NB: A subgrid's lines are those of its parent grid, so in a subgridded axis its tracks start at the parent+ // line its margin box starts at. That line lies before its content edge by the extra margin it gives the+ // items at that edge.+ match self.subgrid_edge_extra_margins(axis) {+ Some((start, _)) => -start,+ None => self.content_start_offset(axis, self.grid_container_alignment_size(axis)),+ }+ }+fn axis_track_offsets(&self, axis: Axis) -> AxisTrackOffsets {let sum_of_tracks_and_gaps = self.track_sum(axis);- let mut offset = self.content_start_offset(axis, self.grid_container_alignment_size(axis));+ let mut offset = self.axis_track_origin(axis);let mut aligned_offset_after_interleaved_entries =Vec::with_capacity(self.axis_tracks(axis).len().saturating_mul(2).saturating_add(1));aligned_offset_after_interleaved_entries.push(offset);@@ -5389,7 +5388,7 @@ impl<'pass> GridFormattingContext<'pass> {fn used_tracks(&self, grid_style: &GridValues) -> OwnedUsedGridTracks {// getComputedStyle() needs to return the resolved values of grid-template-columns and grid-template-rows// so they need to be saved in the state, and then assigned to paintables by the Rust commit walk.- let start = |axis: Axis| self.content_start_offset(axis, self.grid_container_alignment_size(axis));+ let start = |axis: Axis| self.axis_track_origin(axis);let column_axis = self.select_grid_axis(Axis::Column, Axis::Column, Axis::Row);OwnedUsedGridTracks {columns: self.used_track_list_data(column_axis, self.is_subgridded(column_axis, grid_style)),@@ -5413,7 +5412,7 @@ impl<'pass> GridFormattingContext<'pass> {let lines = self.axis_lines(axis);let explicit_start = axis.select(self.explicit_column_start, self.explicit_row_start);let explicit_count = self.explicit_line_count(axis);- let mut start = self.content_start_offset(axis, self.grid_container_alignment_size(axis));+ let mut start = self.axis_track_origin(axis);let mut name_storage = Vec::with_capacity(lines.len());for line in lines {name_storage.push(@@ -5550,6 +5549,12 @@ impl<'pass> GridFormattingContext<'pass> {// NB: Gap tracks must be initialized after collapsing auto-fit tracks, since gutters next to collapsed tracks// collapse as well.self.initialize_tracks(grid_style, &columns, &rows);+ let mut items = std::mem::take(&mut self.items);+ for item in &mut items {+ self.apply_subgrid_edge_extra_margins(item, Axis::Column);+ self.apply_subgrid_edge_extra_margins(item, Axis::Row);+ }+ self.items = items;if let Some(lanes) = self.lanes {self.run_grid_lanes_track_sizing_and_placement(lanes);diff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns-rtl.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns-rtl.txtindex 110637c06a1..899db2f147b 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns-rtl.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns-rtl.txt@@ -7,16 +7,16 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children"Before"TextNode <#text> (not painted)Box <div.subgrid> at [97.390625,0] [7+4+30 154.484375 40+3+5] [0+0+0 20 0+0+0] [GFC] children: not-inline- BlockContainer <div> at [151.1875,0] [0+0+0 100.6875 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ BlockContainer <div> at [199.1875,0] [0+0+0 52.6875 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 5, rect: [199.1875,0 52.6875x20] baseline: 16"First"TextNode <#text> (not painted)- BlockContainer <div> at [94.921875,0] [0+0+0 56.265625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 6, rect: [94.921875,0 56.265625x20] baseline: 16+ BlockContainer <div> at [142.921875,0] [0+0+0 56.265625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [142.921875,0 56.265625x20] baseline: 16"Middle"TextNode <#text> (not painted)- BlockContainer <div> at [8.390625,0] [0+0+0 86.53125 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 4, rect: [49.390625,0 45.53125x20] baseline: 16+ BlockContainer <div> at [97.390625,0] [0+0+0 45.53125 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [97.390625,0 45.53125x20] baseline: 16"Last"TextNode <#text> (not painted)BlockContainer <div> at [0,0] [0+0+0 56.390625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinediff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns.txtindex 7ebd878346b..a9f451f7733 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-columns.txt@@ -7,16 +7,16 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children"Before"TextNode <#text> (not painted)Box <div.subgrid> at [113.53125,0] [5+3+40 154.484375 30+4+7] [0+0+0 20 0+0+0] [GFC] children: not-inline- BlockContainer <div> at [113.53125,0] [0+0+0 100.6875 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ BlockContainer <div> at [113.53125,0] [0+0+0 52.6875 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 5, rect: [113.53125,0 52.6875x20] baseline: 16"First"TextNode <#text> (not painted)- BlockContainer <div> at [214.21875,0] [0+0+0 56.265625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 6, rect: [214.21875,0 56.265625x20] baseline: 16+ BlockContainer <div> at [166.21875,0] [0+0+0 56.265625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [166.21875,0 56.265625x20] baseline: 16"Middle"TextNode <#text> (not painted)- BlockContainer <div> at [270.484375,0] [0+0+0 86.53125 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 4, rect: [270.484375,0 45.53125x20] baseline: 16+ BlockContainer <div> at [222.484375,0] [0+0+0 45.53125 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [222.484375,0 45.53125x20] baseline: 16"Last"TextNode <#text> (not painted)BlockContainer <div> at [309.015625,0] [0+0+0 56.390625 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinediff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-narrow-wrapped-text.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-narrow-wrapped-text.txtindex 974c974e63a..511602d53b0 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-narrow-wrapped-text.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-narrow-wrapped-text.txt@@ -3,14 +3,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenBlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 60 0+0+0] children: not-inlineBox <div.parent> at [0,0] [0+0+0 800 0+0+0] [0+0+0 60 0+0+0] [GFC] children: not-inlineBox <div.subgrid> at [70,0] [0+0+70 170 0+0+0] [0+0+0 40 0+0+0] [GFC] children: not-inline- BlockContainer <div> at [70,0] [0+0+0 120 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline+ BlockContainer <div> at [70,0] [0+0+0 50 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 4, rect: [70,0 71.3125x20] baseline: 16"AAAA"frag 1 from TextNode start: 5, length: 4, rect: [70,20 71.3125x20] baseline: 16"AAAA"TextNode <#text> (not painted)- BlockContainer <div> at [190,0] [0+0+0 120 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 9, rect: [190,0 103.5x20] baseline: 16+ BlockContainer <div> at [120,0] [0+0+0 120 0+0+0] [0+0+0 40 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 9, rect: [120,0 103.5x20] baseline: 16"BBBB BBBB"TextNode <#text> (not painted)BlockContainer <div> at [0,40] [0+0+0 120 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinediff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-nested.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-nested.txtindex 3ac9ff7c15d..7b69ef2d057 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-nested.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-nested.txt@@ -3,21 +3,21 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenBlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 180 0+0+0] children: not-inlineBox <div.parent> at [0,0] [0+0+0 200 0+0+600] [0+0+0 180 0+0+0] [GFC] children: not-inlineBox <div.outer> at [0,10] [0+0+0 200 0+0+0] [0+0+10 150 20+0+0] [GFC] children: not-inline- BlockContainer <div> at [0,10] [0+0+0 200 0+0+0] [0+0+0 30 0+0+0] [BFC] children: inline+ BlockContainer <div> at [0,10] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 11, rect: [0,10 112.125x20] baseline: 16"Outer first"TextNode <#text> (not painted)- Box <div.inner> at [0,80] [0+0+0 200 0+0+0] [0+0+40 80 30+0+0] [GFC] children: not-inline- BlockContainer <div> at [0,80] [0+0+0 200 0+0+0] [0+0+0 60 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 11, rect: [0,80 106.765625x20] baseline: 16+ Box <div.inner> at [0,70] [0+0+0 200 0+0+0] [0+0+40 60 30+0+0] [GFC] children: not-inline+ BlockContainer <div> at [0,70] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 11, rect: [0,70 106.765625x20] baseline: 16"Inner first"TextNode <#text> (not painted)- BlockContainer <div> at [0,140] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 12, rect: [0,140 118.53125x20] baseline: 16+ BlockContainer <div> at [0,90] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 12, rect: [0,90 118.53125x20] baseline: 16"Inner middle"TextNode <#text> (not painted)- BlockContainer <div> at [0,160] [0+0+0 200 0+0+0] [0+0+0 70 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 10, rect: [0,160 98.96875x20] baseline: 16+ BlockContainer <div> at [0,110] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 10, rect: [0,110 98.96875x20] baseline: 16"Inner last"TextNode <#text> (not painted)diff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-rows.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-rows.txtindex 4e75d2ac595..d29b0acf16d 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-rows.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-rows.txt@@ -7,16 +7,16 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children"Before"TextNode <#text> (not painted)Box <div.subgrid> at [0,68] [0+0+0 200 0+0+0] [5+3+40 60 30+4+7] [GFC] children: not-inline- BlockContainer <div> at [0,68] [0+0+0 200 0+0+0] [0+0+0 68 0+0+0] [BFC] children: inline+ BlockContainer <div> at [0,68] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 5, rect: [0,68 52.6875x20] baseline: 16"First"TextNode <#text> (not painted)- BlockContainer <div> at [0,136] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 6, rect: [0,136 56.265625x20] baseline: 16+ BlockContainer <div> at [0,88] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 6, rect: [0,88 56.265625x20] baseline: 16"Middle"TextNode <#text> (not painted)- BlockContainer <div> at [0,156] [0+0+0 200 0+0+0] [0+0+0 61 0+0+0] [BFC] children: inline- frag 0 from TextNode start: 0, length: 4, rect: [0,156 45.53125x20] baseline: 16+ BlockContainer <div> at [0,108] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inline+ frag 0 from TextNode start: 0, length: 4, rect: [0,108 45.53125x20] baseline: 16"Last"TextNode <#text> (not painted)BlockContainer <div> at [0,169] [0+0+0 200 0+0+0] [0+0+0 20 0+0+0] [BFC] children: inlinediff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-with-item-alignment.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-with-item-alignment.txtindex 8738223f47f..cf113e514c7 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-with-item-alignment.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-edge-extra-margins-with-item-alignment.txt@@ -3,11 +3,11 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenBlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 120 0+0+0] children: not-inlineBox <div.parent> at [0,0] [0+0+0 800 0+0+0] [0+0+0 120 0+0+0] [GFC] children: not-inlineBox <div.subgrid> at [25,10] [0+0+25 255 20+0+0] [0+0+10 95 15+0+0] [GFC] children: not-inline- BlockContainer <div.item> at [95,50] [70+0+0 30 0+0+0] [40+0+0 20 0+0+0] [BFC] children: not-inline- BlockContainer <div.item> at [260,30] [35+0+0 30 0+0+35] [20+0+0 20 0+0+20] [BFC] children: not-inline- BlockContainer <div.item> at [60,90] [35+0+0 30 0+0+35] [20+0+0 20 0+0+20] [BFC] children: not-inline- BlockContainer <div.item> at [230,72] [5+0+0 30 0+0+65] [2+0+0 20 0+0+38] [BFC] children: not-inline- BlockContainer <div> at [126,71] [1+0+0 98 0+0+1] [1+0+0 58 0+0+1] [BFC] children: not-inline+ BlockContainer <div.item> at [70,40] [45+0+0 30 0+0+0] [30+0+0 20 0+0+0] [BFC] children: not-inline+ BlockContainer <div.item> at [225,25] [25+0+0 30 0+0+25] [15+0+0 20 0+0+15] [BFC] children: not-inline+ BlockContainer <div.item> at [47.5,72.5] [22.5+0+0 30 0+0+22.5] [12.5+0+0 20 0+0+12.5] [BFC] children: not-inline+ BlockContainer <div.item> at [205,62] [5+0+0 30 0+0+45] [2+0+0 20 0+0+23] [BFC] children: not-inline+ BlockContainer <div> at [101,61] [1+0+0 98 0+0+1] [1+0+0 43 0+0+1] [BFC] children: not-inlineSC for Viewport<#document> [0,0 800x600] (z-index: auto)SC for BlockContainer<HTML> [0,0 800x120] (z-index: auto)diff --git a/Tests/LibWeb/Layout/expected/grid/subgrid-row-contribution-uses-resolved-fr-column-width.txt b/Tests/LibWeb/Layout/expected/grid/subgrid-row-contribution-uses-resolved-fr-column-width.txtindex daa43d764b7..f623cad7659 100644--- a/Tests/LibWeb/Layout/expected/grid/subgrid-row-contribution-uses-resolved-fr-column-width.txt+++ b/Tests/LibWeb/Layout/expected/grid/subgrid-row-contribution-uses-resolved-fr-column-width.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] childrenBlockContainer <body> at [2,2] [0+1+0 796 0+1+0] [0+1+0 61 0+1+0] children: not-inlineBox <div.outer> at [3,3] [0+1+0 766 0+1+28] [0+1+0 59 0+1+0] [GFC] children: not-inlineBox <div.card> at [4,4] [0+1+0 245.328125 0+1+0] [0+1+0 57 0+1+0] [GFC] children: not-inline- BlockContainer <p> at [5,5] [0+1+0 243.328125 0+1+0] [0+1+0 33 0+1+0] [BFC] children: inline+ BlockContainer <p> at [5,5] [0+1+0 243.328125 0+1+0] [0+1+0 32 0+1+0] [BFC] children: inlinefrag 0 from TextNode start: 0, length: 26, rect: [5,5 222.375x16] baseline: 13"Some long text that should"frag 1 from TextNode start: 27, length: 26, rect: [5,21 219.03125x16] baseline: 13diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/subgrid/subgrid-baseline-006.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/subgrid/subgrid-baseline-006.txtindex 6b903a927d2..cc4891cef51 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/subgrid/subgrid-baseline-006.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/subgrid/subgrid-baseline-006.txt@@ -2,14 +2,14 @@ Harness status: OKFound 12 tests-1 Pass-11 Fail+6 Pass+6 FailPass .item 1-Fail .item 2-Fail .item 3-Fail .item 4-Fail .item 5-Fail .item 6+Pass .item 2+Pass .item 3+Pass .item 4+Pass .item 5+Pass .item 6Fail .item 7Fail .item 8Fail .item 9