diff --git a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs index e7cf2fb4c8b47..eda113a5009e5 100644 --- a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs +++ b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs @@ -195,6 +195,7 @@ pub(crate) struct BlockFormattingContext<'pass> { lowest_right_margin_edge: Cell, lowest_floating_descendant_bottom_margin_edge: Cell>, derived_baselines_of_root_box: Cell, + trailing_collapsed_margin: Cell>, } impl<'pass> BlockFormattingContext<'pass> { @@ -213,6 +214,7 @@ impl<'pass> BlockFormattingContext<'pass> { lowest_right_margin_edge: Cell::new(CssPixels::default()), lowest_floating_descendant_bottom_margin_edge: Cell::new(None), derived_baselines_of_root_box: Cell::new(DerivedBaselines::default()), + trailing_collapsed_margin: Cell::new(None), } } @@ -1518,6 +1520,7 @@ impl<'pass> BlockFormattingContext<'pass> { block_container: Node, bottom_of_lowest_margin_box: &mut CssPixels, input: LayoutInput, + containing_line_box_fragment: Option, ) { let available_space = input.available_space; let facts = self.facts(node); @@ -1864,7 +1867,22 @@ impl<'pass> BlockFormattingContext<'pass> { ); } + let block_container_used = self.used(block_container); + self.compute_inset( + run, + node, + LogicalSize { + inline_size: block_container_used.content_inline_size.get(), + block_size: block_container_used.content_block_size.get(), + }, + ); + if let Some(position) = pending_position { + if let Some(coordinate) = containing_line_box_fragment { + let used = self.used_mut(node); + used.has_containing_line_box_fragment.set(true); + used.containing_line_box_fragment.set(coordinate); + } self.place_child(node, position); } @@ -1887,15 +1905,6 @@ impl<'pass> BlockFormattingContext<'pass> { .add_margin(self.used(node).margin_bottom.get()); self.margin_state.borrow_mut().update_open_top_margin_group(); - let block_container_used = self.used(block_container); - self.compute_inset( - run, - node, - LogicalSize { - inline_size: block_container_used.content_inline_size.get(), - block_size: block_container_used.content_block_size.get(), - }, - ); let used = self.used(node); *bottom_of_lowest_margin_box = (*bottom_of_lowest_margin_box) .max(used.content_offset.get().y + used.content_block_size.get() + used.margin_box_bottom(false)); @@ -1926,6 +1935,7 @@ impl<'pass> BlockFormattingContext<'pass> { block_container, &mut bottom_of_lowest_margin_box, child_input, + None, ); } self.block_offset_of_current_block_container.set(saved); @@ -1962,7 +1972,7 @@ impl<'pass> BlockFormattingContext<'pass> { } else { caption_input }; - self.layout_block_level_box(run, child, wrapper, &mut bottom_of_lowest_margin_box, child_input); + self.layout_block_level_box(run, child, wrapper, &mut bottom_of_lowest_margin_box, child_input, None); } self.block_offset_of_current_block_container.set(saved); self.finish_block_level_children_layout(wrapper, input, available_space_for_children, bottom_of_lowest_margin_box); @@ -2026,7 +2036,7 @@ impl<'pass> BlockFormattingContext<'pass> { .block_offset_of_current_block_container .replace(Some(CssPixels::default())); let mut dummy_bottom = CssPixels::default(); - self.layout_block_level_box(run, legend, fieldset, &mut dummy_bottom, child_input); + self.layout_block_level_box(run, legend, fieldset, &mut dummy_bottom, child_input, None); self.block_offset_of_current_block_container.set(saved); } @@ -2058,7 +2068,7 @@ impl<'pass> BlockFormattingContext<'pass> { let saved = self.block_offset_of_current_block_container.replace(Some(extra_top)); for child in self.children(fieldset) { if child != legend { - self.layout_block_level_box(run, child, fieldset, &mut bottom_of_lowest_margin_box, child_input); + self.layout_block_level_box(run, child, fieldset, &mut bottom_of_lowest_margin_box, child_input, None); } } self.block_offset_of_current_block_container.set(saved); @@ -2196,7 +2206,10 @@ impl<'pass> BlockFormattingContext<'pass> { return; } - // Assign collapsed margin left after children layout of formatting context to the last child box + // The run's trailing collapsed margin hangs below the last real in-flow child, but it + // aggregates margins of trailing collapse-through siblings laid out after that child was + // placed. It is run output, not a property of that child: the child keeps its own placed + // margin_bottom, and only the root's automatic block size consumes the aggregate. let collapsed_margin = self.margin_state.borrow().current_collapsed_margin(); if collapsed_margin != CssPixels::default() { let flow_children_bottom_up = if root_facts.is_table_wrapper() { @@ -2212,12 +2225,9 @@ impl<'pass> BlockFormattingContext<'pass> { if self.margins_collapse_through(child) { continue; } - self.used_mut(child).margin_bottom.set(collapsed_margin); + self.trailing_collapsed_margin.set(Some((child, collapsed_margin))); break; } - // The margin reassignment above changed a child's margin box, which the root's baselines may - // have been derived from (a scroll container child exports its bottom margin edge), so re-derive them. - self.compute_and_store_baselines(self.root); } if root_facts.is_list_item_box() { @@ -2268,12 +2278,23 @@ impl<'pass> BlockFormattingContext<'pass> { input: LayoutInput, line_builder: &mut LineBuilder<'_, '_, '_>, ) { + let line_index = line_builder.line_index_for_block_level_box(); let current_block_offset = line_builder.current_block_offset(); let saved = self .block_offset_of_current_block_container .replace(Some(current_block_offset)); let mut dummy_bottom = CssPixels::default(); - self.layout_block_level_box(run, node, containing_block, &mut dummy_bottom, input); + self.layout_block_level_box( + run, + node, + containing_block, + &mut dummy_bottom, + input, + Some(LineBoxFragmentCoordinate { + line_box_index: line_index, + fragment_index: 0, + }), + ); // SAFETY: The builder remains live and no reference escaped. let block_bottom = self .block_offset_of_current_block_container @@ -2282,6 +2303,7 @@ impl<'pass> BlockFormattingContext<'pass> { self.block_offset_of_current_block_container.set(saved); line_builder.append_block_level_box( node, + line_index, block_bottom, self.margin_state.borrow().current_collapsed_margin(), ); @@ -2822,6 +2844,7 @@ impl<'pass> BlockFormattingContext<'pass> { self.callbacks, self.root, self.lowest_floating_descendant_bottom_margin_edge.get(), + self.trailing_collapsed_margin.get(), ) } } @@ -2870,6 +2893,7 @@ pub(crate) fn automatic_block_size_for_bfc_root( callbacks: FfiLayoutFcCallbacks, root: Node, lowest_floating_descendant_bottom_margin_edge: Option, + trailing_collapsed_margin: Option<(Node, CssPixels)>, ) -> CssPixels { let facts = state.node_facts(&callbacks, root); // https://drafts.csswg.org/css-contain-2/#containment-size @@ -2918,9 +2942,17 @@ pub(crate) fn automatic_block_size_for_bfc_root( let child_used = state.try_used_values(&callbacks, child); // Children that have not been laid out yet contribute nothing to the automatic block size. if let Some(child_used) = child_used { + // Margins cannot collapse out of a BFC root: below the last real in-flow + // child, the run's trailing collapsed margin (which folds in any trailing + // collapse-through siblings) replaces that child's own bottom margin. + let margin_bottom = match trailing_collapsed_margin { + Some((last_real_child, aggregate)) if last_real_child == child => aggregate, + _ => child_used.margin_bottom.get(), + }; let child_bottom = child_used.content_offset.get().y + child_used.content_block_size.get() - + child_used.margin_box_bottom(false); + + child_used.border_box_bottom(false) + + margin_bottom; bottom = Some(bottom.map_or(child_bottom, |value: CssPixels| value.max(child_bottom))); } } diff --git a/Libraries/LibWeb/Rust/src/layout/formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/formatting_context.rs index 9b3938e765460..9650ad18f3321 100644 --- a/Libraries/LibWeb/Rust/src/layout/formatting_context.rs +++ b/Libraries/LibWeb/Rust/src/layout/formatting_context.rs @@ -402,6 +402,7 @@ pub(crate) fn place_child( assert!(!used.has_content_offset.get()); used.has_content_offset.set(true); used.content_offset.set(offset); + used.seal_committed_box_metrics(); } pub(crate) fn register_contained_abspos_child( diff --git a/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs index 6dbd18ddeecfe..7a4f83fe45f27 100644 --- a/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs +++ b/Libraries/LibWeb/Rust/src/layout/grid_formatting_context.rs @@ -3448,7 +3448,8 @@ impl<'pass> GridFormattingContext<'pass> { x: area.offset.inline_offset + self.item_margin_box_start(item, Axis::Column), y: area.offset.block_offset + self.item_margin_box_start(item, Axis::Row), }; - crate::layout::place_child(self.state, &self.callbacks, item.box_, offset); + // Resolve relative-position insets before placement seals the + // item's committed metrics. crate::layout::compute_inset_native( self.state, self.callbacks, @@ -3458,6 +3459,7 @@ impl<'pass> GridFormattingContext<'pass> { self.grid_container, run.treat_block_axis_percentage_insets_as_auto_beyond_root, ); + crate::layout::place_child(self.state, &self.callbacks, item.box_, offset); } self.derived_baselines_of_root_box = crate::layout::derive_baselines(self.state, &self.callbacks, self.grid_container, false); diff --git a/Libraries/LibWeb/Rust/src/layout/layout_state.rs b/Libraries/LibWeb/Rust/src/layout/layout_state.rs index 6805a021ad6be..6a25fba763d9e 100644 --- a/Libraries/LibWeb/Rust/src/layout/layout_state.rs +++ b/Libraries/LibWeb/Rust/src/layout/layout_state.rs @@ -1079,7 +1079,6 @@ impl LayoutState { used.set_content_block_size(geometry.content_block_size); used.has_definite_inline_size.set(true); used.has_definite_block_size.set(true); - used.has_content_offset.set(true); used.content_offset.set(geometry.content_offset); used.margin_left.set(geometry.margin_left); used.margin_right.set(geometry.margin_right); @@ -1101,6 +1100,11 @@ impl LayoutState { self.used_values_rare_data_mut(slot_index).svg_viewport_size = Some(geometry.svg_viewport_size); } + // Materialization is this box's placement: the previous paintable's + // committed geometry is final from the moment it is adopted. + used.has_content_offset.set(true); + used.seal_committed_box_metrics(); + let used = self.used_values.allocate(slot_index, used); self.register_anchor_candidate_if_carries_anchor_names(callbacks, node); Some(used) diff --git a/Libraries/LibWeb/Rust/src/layout/line_builder.rs b/Libraries/LibWeb/Rust/src/layout/line_builder.rs index 3ce36b510f8b6..b6a617d4c025e 100644 --- a/Libraries/LibWeb/Rust/src/layout/line_builder.rs +++ b/Libraries/LibWeb/Rust/src/layout/line_builder.rs @@ -339,7 +339,19 @@ impl<'builder, 'context, 'pass> LineBuilder<'builder, 'context, 'pass> { self.begin_new_line(true, true, ForcedBreak::No); } - pub(crate) fn append_block_level_box(&mut self, node: Node, block_end: CssPixels, block_end_margin: CssPixels) { + pub(crate) fn line_index_for_block_level_box(&mut self) -> usize { + let line_index = self.ensure_last_line_index(); + assert!(self.line(line_index).fragments.is_empty()); + line_index + } + + pub(crate) fn append_block_level_box( + &mut self, + node: Node, + line_index: usize, + block_end: CssPixels, + block_end_margin: CssPixels, + ) { let used = self.context().used(node); assert!(used.has_content_offset.get()); let (inline_offset, block_offset) = to_logical( @@ -359,7 +371,8 @@ impl<'builder, 'context, 'pass> LineBuilder<'builder, 'context, 'pass> { used.margin_box_block_size(false), ) .0; - let line_index = self.ensure_last_line_index(); + let ensured_line_index = self.ensure_last_line_index(); + assert_eq!(line_index, ensured_line_index); assert!(self.line(line_index).fragments.is_empty()); let fragment = LineBoxFragmentData::new( node, @@ -391,12 +404,6 @@ impl<'builder, 'context, 'pass> LineBuilder<'builder, 'context, 'pass> { marker.block_offset += current_block_offset; } } - let used = self.context().used_mut(node); - used.has_containing_line_box_fragment.set(true); - used.containing_line_box_fragment.set(LineBoxFragmentCoordinate { - line_box_index: line_index, - fragment_index: 0, - }); self.pending_margin_follows_block_level_box = true; self.current_block_offset = block_end; self.max_block_size_on_current_line = CssPixels::default(); diff --git a/Libraries/LibWeb/Rust/src/layout/used_values.rs b/Libraries/LibWeb/Rust/src/layout/used_values.rs index 5d4cbf7f641de..209761c7815b3 100644 --- a/Libraries/LibWeb/Rust/src/layout/used_values.rs +++ b/Libraries/LibWeb/Rust/src/layout/used_values.rs @@ -43,33 +43,72 @@ pub(crate) struct LineBoxFragmentCoordinate { pub fragment_index: usize, } +pub(crate) struct SealableCell { + value: Cell, + sealed: Cell, +} + +impl std::fmt::Debug for SealableCell { + fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.value.get().fmt(formatter) + } +} + +impl SealableCell { + pub(crate) fn new(value: T) -> Self { + Self { + value: Cell::new(value), + sealed: Cell::new(false), + } + } + + #[inline] + pub(crate) fn get(&self) -> T { + self.value.get() + } + + #[track_caller] + #[inline] + pub(crate) fn set(&self, value: T) { + assert!( + !self.sealed.get(), + "write to a sealed committed box metric after placement" + ); + self.value.set(value); + } + + pub(crate) fn seal(&self) { + self.sealed.set(true); + } +} + /// The per-box geometry stored in a Rust-owned layout pass. #[derive(Debug)] pub(crate) struct UsedValues { pub node: crate::layout::node_data::NodeSlotId, - pub content_inline_size: Cell, - pub content_block_size: Cell, + pub content_inline_size: SealableCell, + pub content_block_size: SealableCell, - pub margin_left: Cell, - pub margin_right: Cell, - pub margin_top: Cell, - pub margin_bottom: Cell, + pub margin_left: SealableCell, + pub margin_right: SealableCell, + pub margin_top: SealableCell, + pub margin_bottom: SealableCell, - pub border_left: Cell, - pub border_right: Cell, - pub border_top: Cell, - pub border_bottom: Cell, + pub border_left: SealableCell, + pub border_right: SealableCell, + pub border_top: SealableCell, + pub border_bottom: SealableCell, - pub padding_left: Cell, - pub padding_right: Cell, - pub padding_top: Cell, - pub padding_bottom: Cell, + pub padding_left: SealableCell, + pub padding_right: SealableCell, + pub padding_top: SealableCell, + pub padding_bottom: SealableCell, - pub inset_left: Cell, - pub inset_right: Cell, - pub inset_top: Cell, - pub inset_bottom: Cell, + pub inset_left: SealableCell, + pub inset_right: SealableCell, + pub inset_top: SealableCell, + pub inset_bottom: SealableCell, pub has_definite_inline_size: Cell, pub has_definite_block_size: Cell, @@ -81,8 +120,8 @@ pub(crate) struct UsedValues { // Keep these as separate cells: content_offset is read by placement code // even where has_content_offset is false. - pub has_content_offset: Cell, - pub content_offset: Cell, + pub has_content_offset: SealableCell, + pub content_offset: SealableCell, // Keep baseline payloads separate so resetting the presence bits does not // perturb the payloads observed by the existing derivation flow. @@ -93,8 +132,8 @@ pub(crate) struct UsedValues { // Commit copies the coordinate payload even when the presence bit is // false, so this cannot be represented as Cell>. - pub has_containing_line_box_fragment: Cell, - pub containing_line_box_fragment: Cell, + pub has_containing_line_box_fragment: SealableCell, + pub containing_line_box_fragment: SealableCell, } impl Default for UsedValues { @@ -102,42 +141,72 @@ impl Default for UsedValues { let zero = CssPixels::from_raw(0); Self { node: crate::layout::node_data::NodeSlotId::INVALID, - content_inline_size: Cell::new(zero), - content_block_size: Cell::new(zero), - margin_left: Cell::new(zero), - margin_right: Cell::new(zero), - margin_top: Cell::new(zero), - margin_bottom: Cell::new(zero), - border_left: Cell::new(zero), - border_right: Cell::new(zero), - border_top: Cell::new(zero), - border_bottom: Cell::new(zero), - padding_left: Cell::new(zero), - padding_right: Cell::new(zero), - padding_top: Cell::new(zero), - padding_bottom: Cell::new(zero), - inset_left: Cell::new(zero), - inset_right: Cell::new(zero), - inset_top: Cell::new(zero), - inset_bottom: Cell::new(zero), + content_inline_size: SealableCell::new(zero), + content_block_size: SealableCell::new(zero), + margin_left: SealableCell::new(zero), + margin_right: SealableCell::new(zero), + margin_top: SealableCell::new(zero), + margin_bottom: SealableCell::new(zero), + border_left: SealableCell::new(zero), + border_right: SealableCell::new(zero), + border_top: SealableCell::new(zero), + border_bottom: SealableCell::new(zero), + padding_left: SealableCell::new(zero), + padding_right: SealableCell::new(zero), + padding_top: SealableCell::new(zero), + padding_bottom: SealableCell::new(zero), + inset_left: SealableCell::new(zero), + inset_right: SealableCell::new(zero), + inset_top: SealableCell::new(zero), + inset_bottom: SealableCell::new(zero), has_definite_inline_size: Cell::new(false), has_definite_block_size: Cell::new(false), materialized_from_paintable: Cell::new(false), uses_collapsing_borders_model: Cell::new(false), inline_size_constraint: Cell::new(SizeConstraint::None), block_size_constraint: Cell::new(SizeConstraint::None), - has_content_offset: Cell::new(false), - content_offset: Cell::new(FfiCssPixelPoint::default()), + has_content_offset: SealableCell::new(false), + content_offset: SealableCell::new(FfiCssPixelPoint::default()), has_first_baseline: Cell::new(false), first_baseline: Cell::new(zero), has_last_baseline: Cell::new(false), last_baseline: Cell::new(zero), - has_containing_line_box_fragment: Cell::new(false), - containing_line_box_fragment: Cell::new(LineBoxFragmentCoordinate::default()), + has_containing_line_box_fragment: SealableCell::new(false), + containing_line_box_fragment: SealableCell::new(LineBoxFragmentCoordinate::default()), } } } +impl UsedValues { + /// Seals every field that commit emits as part of FfiCommittedBoxMetrics. + /// Called when the box is placed: after placement, none of these may + /// change again. + pub(crate) fn seal_committed_box_metrics(&self) { + self.content_inline_size.seal(); + self.content_block_size.seal(); + self.margin_left.seal(); + self.margin_right.seal(); + self.margin_top.seal(); + self.margin_bottom.seal(); + self.border_left.seal(); + self.border_right.seal(); + self.border_top.seal(); + self.border_bottom.seal(); + self.padding_left.seal(); + self.padding_right.seal(); + self.padding_top.seal(); + self.padding_bottom.seal(); + self.inset_left.seal(); + self.inset_right.seal(); + self.inset_top.seal(); + self.inset_bottom.seal(); + self.has_content_offset.seal(); + self.content_offset.seal(); + self.has_containing_line_box_fragment.seal(); + self.containing_line_box_fragment.seal(); + } +} + impl UsedValues { pub(crate) fn mirror_box_metrics_and_size_constraints_into(&self, scratch: &UsedValues) { scratch.margin_left.set(self.margin_left.get()); diff --git a/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-first-last-line-rule.txt b/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-first-last-line-rule.txt index 665ce5a916ce4..9425614414ec5 100644 --- a/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-first-last-line-rule.txt +++ b/Tests/LibWeb/Layout/expected/abspos-inline-containing-block-first-last-line-rule.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 at [0,0] [0+0+0 800 0+0+0] [0+0+0 409 0+0+0] [BFC] children: not-inline - BlockContainer at [0,8] [0+0+0 800 0+0+0] [0+0+0 393 0+0+8] children: not-inline + BlockContainer at [0,8] [0+0+0 800 0+0+0] [0+0+0 393 0+0+0] children: not-inline BlockContainer at [8,8] [8+0+0 130 0+0+662] [8+0+0 60 0+0+8] children: inline TextNode <#text> (not painted) InlineNode at [8,10] [0+0+0 126.28125 0+0+0] [0+0+0 56 0+0+0] diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/box-with-clearance-and-margin-top.txt b/Tests/LibWeb/Layout/expected/block-and-inline/box-with-clearance-and-margin-top.txt index 9c8987ac6c52f..a9d3fe33aac80 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/box-with-clearance-and-margin-top.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/box-with-clearance-and-margin-top.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 at [0,0] [0+0+0 800 0+0+0] [0+0+0 267 0+0+0] [BFC] children: not-inline - BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 110 0+0+100] children: not-inline + BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 110 0+0+8] children: not-inline BlockContainer
at [8,8] [0+0+0 784 0+0+0] [0+0+0 110 0+0+0] children: not-inline BlockContainer at [8,8] floating [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline BlockContainer at [8,108] [0+0+0 10 0+0+774] [9999+0+0 10 0+0+100] children: not-inline diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/float-clear-by-line-break-followed-by-block.txt b/Tests/LibWeb/Layout/expected/block-and-inline/float-clear-by-line-break-followed-by-block.txt index 398d94f3987a9..3f154cdf50d3f 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/float-clear-by-line-break-followed-by-block.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/float-clear-by-line-break-followed-by-block.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 at [0,0] [0+0+0 800 0+0+0] [0+0+0 156 0+0+0] [BFC] children: not-inline - BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 132 0+0+16] children: not-inline + BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 132 0+0+8] children: not-inline BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 100 0+0+0] children: inline BlockContainer at [8,8] floating [0+0+0 100 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline TextNode <#text> (not painted) diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/float-vertical-offset-by-preceding-float.txt b/Tests/LibWeb/Layout/expected/block-and-inline/float-vertical-offset-by-preceding-float.txt index 4ece20b6af5f7..201b930f2d3af 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/float-vertical-offset-by-preceding-float.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/float-vertical-offset-by-preceding-float.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 at [0,0] [0+0+0 800 0+0+0] [0+0+0 130 0+0+0] [BFC] children: not-inline - BlockContainer at [8,16] [8+0+0 784 0+0+8] [8+0+0 48 0+0+16] children: not-inline + BlockContainer at [8,16] [8+0+0 784 0+0+8] [8+0+0 48 0+0+8] children: not-inline BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline BlockContainer
at [8,16] floating [0+0+0 50 0+0+0] [0+0+0 50 0+0+0] [BFC] children: not-inline TextNode <#text> (not painted) diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/forced-break-stops-non-whitespace-sequence.txt b/Tests/LibWeb/Layout/expected/block-and-inline/forced-break-stops-non-whitespace-sequence.txt index 06a12518b002d..391ffc6bd4869 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/forced-break-stops-non-whitespace-sequence.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/forced-break-stops-non-whitespace-sequence.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 at [0,0] [0+0+0 800 0+0+0] [0+0+0 41 0+0+0] [BFC] children: not-inline - BlockContainer at [8,13] [8+0+0 784 0+0+8] [8+0+0 15 0+0+13] children: not-inline + BlockContainer at [8,13] [8+0+0 784 0+0+8] [8+0+0 15 0+0+8] children: not-inline BlockContainer
 at [9,14] [0+1+0 782 0+1+0] [13+1+0 13 0+1+13] children: inline
         InlineNode  at [9,14] [0+0+0 6.5 0+0+0] [0+0+0 13 0+0+0]
           frag 0 from TextNode start: 0, length: 1, rect: [9,14 6.5x13] baseline: 10.390625
diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/intrinsic-sizing-stress-test.txt b/Tests/LibWeb/Layout/expected/block-and-inline/intrinsic-sizing-stress-test.txt
index 8bba9ca663bec..8da5efaf072ef 100644
--- a/Tests/LibWeb/Layout/expected/block-and-inline/intrinsic-sizing-stress-test.txt
+++ b/Tests/LibWeb/Layout/expected/block-and-inline/intrinsic-sizing-stress-test.txt
@@ -2,7 +2,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children
   BlockContainer  at [0,0] [0+0+0 800 0+0+0] [0+0+0 1760.375 0+0+0] [BFC] children: not-inline
     BlockContainer <(anonymous)> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] children: inline
       TextNode <#text> (not painted)
-    BlockContainer  at [0,10] [0+0+0 831.75 0+0+-31.75] [0+0+0 1740.375 0+0+10] children: not-inline
+    BlockContainer  at [0,10] [0+0+0 831.75 0+0+-31.75] [0+0+0 1740.375 0+0+0] children: not-inline
       BlockContainer <(anonymous)> at [0,10] [0+0+0 831.75 0+0+0] [0+0+0 0 0+0+0] children: inline
         TextNode <#text> (not painted)
         TextNode <#text> (not painted)
diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt b/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt
index b55bcce4980e4..9722aa2f6edb1 100644
--- a/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.txt
+++ b/Tests/LibWeb/Layout/expected/block-and-inline/list-markers-intruded-by-float.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  at [0,0] [0+0+0 800 0+0+0] [0+0+0 136 0+0+0] [BFC] children: not-inline
-    BlockContainer  at [8,16] [8+0+0 784 0+0+8] [8+0+0 96 0+0+16] children: not-inline
+    BlockContainer  at [8,16] [8+0+0 784 0+0+8] [8+0+0 96 0+0+8] children: not-inline
       BlockContainer  at [18,26] floating [0+10+0 200 0+10+100] [0+10+0 100 0+10+0] [BFC] children: not-inline
       BlockContainer