Truly independent web browser
LibWeb: Keep clean children when rebuilding a child list
Aliaksandr Kalenik71a794cdefc0
diff --git a/Libraries/LibWeb/Rust/src/css/style/inputs.rs b/Libraries/LibWeb/Rust/src/css/style/inputs.rsindex 0d78c1f040d..698db6e0b91 100644--- a/Libraries/LibWeb/Rust/src/css/style/inputs.rs+++ b/Libraries/LibWeb/Rust/src/css/style/inputs.rs@@ -105,6 +105,7 @@ pub struct PublishedContentFacts {pub counters_are_none: bool,pub content_is_keyword: bool,pub content_is_strings_only: bool,+ pub opens_or_closes_quotes: bool,}unsafe extern "C" {@@ -815,6 +816,7 @@ impl RetainedState {counters_are_none: view.counter_properties_are_none(),content_is_keyword: view.content_is_keyword(),content_is_strings_only: view.content_is_strings_only(),+ opens_or_closes_quotes: view.content_opens_or_closes_quotes(),})}diff --git a/Libraries/LibWeb/Rust/src/layout/tree_builder.rs b/Libraries/LibWeb/Rust/src/layout/tree_builder.rsindex 65ebb6af658..5ac6d0c3c8d 100644--- a/Libraries/LibWeb/Rust/src/layout/tree_builder.rs+++ b/Libraries/LibWeb/Rust/src/layout/tree_builder.rs@@ -528,11 +528,15 @@ struct ChildListInsertionReuse<'a, 'host> {pub(crate) struct LayoutNodeReuse {pub insert_children: bool,pub update_pseudo_elements: bool,+ /// The box stays, and its child list is built again around the boxes its clean children keep.+ pub rebuild_child_list: bool,}/// Settles which of the narrower rebuilds the node's marks asked for the build can actually take./// Neither is available unless every mark the node collected permits it, because a rebuild that-/// only updates the pseudo-elements leaves the child list alone, and the other way round.+/// only updates the pseudo-elements leaves the child list alone, and the other way round. When+/// children were inserted and neither is available, the build can still keep the box and build+/// its child list again, which also regenerates its pseudo-elements.fn resolve_layout_node_reuse(host: &TreeBuilderHost<'_>,kind: PrincipalNodeKind,@@ -553,9 +557,21 @@ fn resolve_layout_node_reuse(});let may_reuse = (reasons & layout_tree_update_reuse_reason::PSEUDO_ELEMENT_CHANGE == 0 || update_pseudo_elements)&& (reasons & layout_tree_update_reuse_reason::CHILD_LIST_INSERTION == 0 || insert_children);+ if may_reuse {+ return LayoutNodeReuse {+ insert_children,+ update_pseudo_elements,+ rebuild_child_list: false,+ };+ }+ let rebuild_child_list = reasons & layout_tree_update_reuse_reason::CHILD_LIST_INSERTION != 0+ && host+ .arena()+ .with_style_store(|engine| may_rebuild_child_list(host, engine, kind, element));LayoutNodeReuse {- insert_children: may_reuse && insert_children,- update_pseudo_elements: may_reuse && update_pseudo_elements,+ insert_children: false,+ update_pseudo_elements: false,+ rebuild_child_list,}}@@ -734,6 +750,57 @@ fn may_reuse_layout_node_for_child_list_insertion(test.run()}+/// Whether `node` is an anonymous block that only wraps a run of inline-level children, which a build makes again+/// whenever it places such a run.+fn is_anonymous_inline_run_wrapper(host: &TreeBuilderHost<'_>, node: LayoutNode) -> bool {+ let data = host.data(node);+ data.kind.get() == NodeKind::BlockContainer+ && node_facts::has_flag(data, NodeFlag::Anonymous)+ && node_facts::has_flag(data, NodeFlag::ChildrenAreInline)+ && !node_is_generated_for_pseudo_element(data)+}++/// Whether the build can keep the element's box and build its child list again: free its anonymous wrappers and+/// generated boxes, place the boxes of its clean children again in DOM order, and build boxes for the others. The+/// box has to be a block, list item, flex or grid container whose child list holds nothing but those three kinds of+/// boxes, and no generated content may depend on what the rebuild leaves alone.+fn may_rebuild_child_list(+ layout: &TreeBuilderHost<'_>,+ engine: &RetainedState,+ kind: PrincipalNodeKind,+ element: StyleNodeID,+) -> bool {+ let arena = layout.arena();+ let layout_node = arena.bound_row(element);+ if !kind.is_element()+ || layout_node.is_invalid()+ || layout.parent(layout_node).is_invalid()+ || engine.tree().shadow_root_of(element).is_some()+ || engine.element_is_slot(element)+ || engine.element_counter_reset_has_reversed_counter(element)+ || engine.element_box_kind(element) != ElementBoxKind::FromDisplay+ || engine.element_adjustment_facts(element)+ & (element_adjustment_fact::RENDERED_IN_TOP_LAYER+ | element_adjustment_fact::IS_SVG_ELEMENT+ | element_adjustment_fact::IS_SVG_CONTAINER+ | element_adjustment_fact::REQUIRES_SVG_CONTAINER+ | element_adjustment_fact::IS_SVG_FOREIGN_OBJECT_ELEMENT)+ != 0+ || first_letter_owner_covers_subtree(layout, engine, element, layout_node)+ {+ return false;+ }+ let test = ChildListInsertionReuse {+ layout,+ engine,+ element,+ layout_node,+ has_first_letter_owner: false,+ trailing_inline_wrapper: NodeSlotId::INVALID,+ };+ test.child_list_can_be_rebuilt()+}+impl ChildListInsertionReuse<'_, '_> {fn arena(&self) -> &LayoutNodeArena {self.layout.arena()@@ -968,6 +1035,172 @@ impl ChildListInsertionReuse<'_, '_> {})}+ /// Whether `node`, a box in the parent's child list, is one that a rebuild of that list keeps: the box of a DOM+ /// node, or the table wrapper around one, which it places again; or one of the parent's own generated boxes,+ /// which it regenerates.+ fn is_box_a_child_list_rebuild_keeps(&self, node: LayoutNode) -> bool {+ let data = self.layout.data(node);+ if node_is_generated_for_pseudo_element(data) {+ let generated_for = data.generated_for.get();+ return matches!(+ generated_for,+ GENERATED_FOR_BEFORE | GENERATED_FOR_AFTER | GENERATED_FOR_MARKER+ ) && self.arena().bound_pseudo_element_row(self.element, generated_for) == node;+ }+ if data.kind.get() == NodeKind::TableWrapper {+ let mut wrapped = self.layout.first_child(node);+ while !wrapped.is_invalid() {+ if self.is_bound_box_of_dom_node(wrapped) {+ return true;+ }+ wrapped = self.layout.next_sibling(wrapped);+ }+ return false;+ }+ self.is_bound_box_of_dom_node(node)+ }++ /// Whether `node` is the one box its DOM node is bound to. A `::first-letter` or a writing suggestion splits a+ /// text node's box, and the other slices are not bound.+ fn is_bound_box_of_dom_node(&self, node: LayoutNode) -> bool {+ let arena = self.arena();+ arena+ .dom_node_style_node(node)+ .is_some_and(|dom_node| arena.bound_row(dom_node) == node)+ && !(self.layout.data(node).kind.get() == NodeKind::TextNode && arena.text_has_source_range(node))+ }++ /// See [`may_rebuild_child_list`].+ fn child_list_can_be_rebuilt(&self) -> bool {+ let data = self.layout.data(self.layout_node);+ let display = self.layout.display(self.layout_node);+ let lays_out_flow = display.is_flow_inside() || display.is_flow_root_inside();+ let lays_out_flex_or_grid = display.is_flex_inside() || display.is_grid_inside();+ let is_ordinary_container = match data.kind.get() {+ NodeKind::BlockContainer | NodeKind::ListItemBox => lays_out_flow || lays_out_flex_or_grid,+ NodeKind::Box => lays_out_flex_or_grid,+ _ => false,+ };+ if !is_ordinary_container+ || node_facts::has_flag(data, NodeFlag::IsReplacedElement)+ || node_facts::has_flag(data, NodeFlag::UsesButtonLayout)+ {+ return false;+ }+ // An inline box keeps its in-flow block children in its own child list, and table fixup wraps the boxes of a+ // table-internal display in anonymous table boxes.+ let display_before_box_type_transformation =+ self.layout.display_before_box_type_transformation(self.layout_node);+ let parent_of_layout_node = self.layout.parent(self.layout_node);+ if (display.is_inline_outside() && display.is_flow_inside())+ || display_before_box_type_transformation.is_internal_table()+ || display_before_box_type_transformation.is_table_inside()+ || display_before_box_type_transformation.is_table_caption()+ || (node_facts::has_flag(self.layout.data(parent_of_layout_node), NodeFlag::Anonymous)+ && !is_anonymous_inline_run_wrapper(self.layout, parent_of_layout_node))+ {+ return false;+ }+ if self+ .engine+ .element_published_box_facts(self.element)+ .is_none_or(|facts| facts.content_visibility != content_visibility::VISIBLE)+ || self+ .arena()+ .writing_suggestion()+ .is_some_and(|suggestion| self.engine.tree().text_parent(suggestion.text) == Some(self.element))+ {+ return false;+ }+ // The rebuild regenerates these after the walk, which leaves the quote depth of the boxes it keeps out.+ for generated_for in [GENERATED_FOR_BEFORE, GENERATED_FOR_AFTER, GENERATED_FOR_MARKER] {+ if self+ .engine+ .pseudo_published_content_facts(self.element, pseudo_kind_of(generated_for))+ .is_some_and(|content| content.opens_or_closes_quotes)+ {+ return false;+ }+ }++ let mut kept_dom_node_box_count = 0usize;+ let mut child = self.layout.first_child(self.layout_node);+ while !child.is_invalid() {+ let mut kept_box = child;+ let mut end_of_run = NodeSlotId::INVALID;+ if is_anonymous_inline_run_wrapper(self.layout, child) {+ kept_box = self.layout.first_child(child);+ } else {+ end_of_run = self.layout.next_sibling(child);+ }+ while kept_box != end_of_run {+ if !self.is_box_a_child_list_rebuild_keeps(kept_box) {+ return false;+ }+ if !node_is_generated_for_pseudo_element(self.layout.data(kept_box)) {+ kept_dom_node_box_count += 1;+ }+ kept_box = self.layout.next_sibling(kept_box);+ }+ child = self.layout.next_sibling(child);+ }++ // Every DOM child with a box has to own one of the boxes counted above.+ let mut boxed_dom_child_count = 0usize;+ let mut first_inserted_child_touching_counters = None;+ let mut inserted_subtree_increments_or_sets_counters = false;+ for child in self.dom_children() {+ let is_element = child.element_index().is_some();+ if is_element {+ if self+ .published_display(child)+ .is_some_and(|display| display.is_contents())+ {+ return false;+ }+ // A top-layer box is a child of the viewport.+ if self.engine.element_adjustment_facts(child) & element_adjustment_fact::RENDERED_IN_TOP_LAYER != 0 {+ continue;+ }+ }+ if !self.box_of(child).is_invalid() {+ // A counter that an inserted subtree touches is read by the boxes after it, which the rebuild keeps.+ if first_inserted_child_touching_counters.is_some() {+ return false;+ }+ boxed_dom_child_count += 1;+ continue;+ }+ if !self.needs_layout_tree_update(child) {+ // A full build may give such a text node a box again.+ if !is_element {+ return false;+ }+ continue;+ }+ if !is_element || self.published_display(child).is_none_or(|display| display.is_none()) {+ continue;+ }+ let generated_content_effects = self.engine.subtree_generated_content_effects(child);+ if generated_content_effects.opens_or_closes_quotes {+ return false;+ }+ if (generated_content_effects.resets_counters || generated_content_effects.increments_or_sets_counters)+ && first_inserted_child_touching_counters.is_none()+ {+ first_inserted_child_touching_counters = Some(child);+ }+ inserted_subtree_increments_or_sets_counters |= generated_content_effects.increments_or_sets_counters;+ }+ if let Some(first_inserted_child_touching_counters) = first_inserted_child_touching_counters+ && inserted_subtree_increments_or_sets_counters+ && self.earlier_child_counts_a_counter_down(first_inserted_child_touching_counters)+ {+ return false;+ }+ boxed_dom_child_count == kept_dom_node_box_count+ }+fn run(&self) -> bool {if self.pending_children_can_preserve_parent() {// An empty set means every insertion was canceled before layout. Moves are marked dirty@@ -1237,7 +1470,10 @@ pub(crate) fn principal_node_entry_decision(context: &TreeBuilderContext,) -> PrincipalNodeEntryDecision {let should_create_layout_node = facts.must_create_subtree- || (facts.needs_layout_tree_update && !reuse.insert_children && !reuse.update_pseudo_elements)+ || (facts.needs_layout_tree_update+ && !reuse.insert_children+ && !reuse.update_pseudo_elements+ && !reuse.rebuild_child_list)|| context.document_needs_full_layout_tree_update|| (kind.is_document() && !facts.has_layout_node);@@ -2062,6 +2298,7 @@ struct PrincipalDescendantUpdate {element_type_facts: u32,should_create_layout_node: bool,update_pseudo_elements_in_place: bool,+ rebuild_child_list: bool,must_create_subtree: bool,insertion_mode: FfiInsertionMode,}@@ -2096,8 +2333,11 @@ fn update_principal_node_descendants()};let prior_quote_nesting_level = state.quote_nesting_level;+ let kept_child_boxes = update+ .rebuild_child_list+ .then(|| detach_child_list_for_rebuild(host, update.mirror_identity, layout_node));- if should_create_layout_node || update.update_pseudo_elements_in_place {+ if should_create_layout_node || update.update_pseudo_elements_in_place || update.rebuild_child_list {// Resolve counters now that we exist in the layout tree.if should_create_layout_node && update.kind.is_element() {resolve_counters(host, update.mirror_identity, FfiPseudoElement::None);@@ -2131,6 +2371,7 @@ fn update_principal_node_descendants(}if (should_create_layout_node+ || update.rebuild_child_list|| host.arena().child_needs_layout_tree_update(Some(update.mirror_identity)))@@ -2166,6 +2407,8 @@ fn update_principal_node_descendants(context,should_create_layout_node,);+ } else if let Some(kept_child_boxes) = &kept_child_boxes {+ rebuild_child_list_from_dom_children(host, state, update.mirror_identity, context, kept_child_boxes);} else {update_layout_tree_for_dom_children(host,@@ -2286,26 +2529,7 @@ fn update_principal_node_descendants(&& !content_visibility_hidden&& !context.has_svg_root{- state.ancestor_stack.push(layout_node);- if host.data(layout_node).kind.get() == NodeKind::ListItemBox {- let placed = create_pseudo_element(- host,- state,- update.mirror_identity,- FfiPseudoElement::Marker,- Some(FfiInsertionMode::Prepend),- );- assert!(placed.is_none());- }- let placed = create_pseudo_element(- host,- state,- update.mirror_identity,- FfiPseudoElement::After,- Some(FfiInsertionMode::Append),- );- assert!(placed.is_none());- assert!(state.ancestor_stack.pop().is_some());+ create_marker_and_after_boxes(host, state, update.mirror_identity, layout_node);if node_facts::kind_is_block_container(host.data(layout_node).kind.get())&& host.has_first_letter_style(layout_node)@@ -2321,6 +2545,18 @@ fn update_principal_node_descendants(wrap_button_contents_if_needed(host, layout_node);}+ if let Some(kept_child_boxes) = kept_child_boxes {+ create_marker_and_after_boxes(host, state, update.mirror_identity, layout_node);+ // A kept box that the walk did not place again belongs to no DOM child any more.+ for kept_box in kept_child_boxes {+ if host.arena().slot_is_live(kept_box) && host.parent(kept_box).is_invalid() {+ let host_calls = host.host_calls();+ super::layout_node_arena::prepare_subtree_for_detach(host_calls, host.arena_mut(), kept_box);+ host.free_subtree(kept_box);+ }+ }+ }+if update.update_pseudo_elements_in_place && !should_create_layout_node {state.ancestor_stack.push(layout_node);let placed = create_pseudo_element(@@ -2348,6 +2584,124 @@ fn update_principal_node_descendants(.clear_layout_tree_update_marks(Some(update.mirror_identity));}+/// Adds the `::marker` of a list item box and the `::after` of an element's box, once its children are in place.+fn create_marker_and_after_boxes(+ host: &mut TreeBuilderHost<'_>,+ state: &mut TreeBuilderState,+ element: StyleNodeID,+ layout_node: LayoutNode,+) {+ state.ancestor_stack.push(layout_node);+ if host.data(layout_node).kind.get() == NodeKind::ListItemBox {+ let placed = create_pseudo_element(+ host,+ state,+ element,+ FfiPseudoElement::Marker,+ Some(FfiInsertionMode::Prepend),+ );+ assert!(placed.is_none());+ }+ let placed = create_pseudo_element(+ host,+ state,+ element,+ FfiPseudoElement::After,+ Some(FfiInsertionMode::Append),+ );+ assert!(placed.is_none());+ assert!(state.ancestor_stack.pop().is_some());+}++/// Empties the child list of a box that keeps its place while its children are placed again: frees the element's+/// `::before`, `::after` and `::marker` boxes and the anonymous wrappers around inline runs, and detaches every other+/// box, which [`may_rebuild_child_list`] made sure belongs to a DOM child. Those boxes keep their subtrees, and+/// detaching a box leaves its own subtree's layout state alone. Answers the boxes it detached.+fn detach_child_list_for_rebuild(+ host: &mut TreeBuilderHost<'_>,+ element: StyleNodeID,+ layout_node: LayoutNode,+) -> HashSet<LayoutNode> {+ let host_calls = host.host_calls();+ for generated_for in [GENERATED_FOR_BEFORE, GENERATED_FOR_AFTER, GENERATED_FOR_MARKER] {+ free_pseudo_element_box(host_calls, host.arena_mut(), element, generated_for);+ }+ let mut kept_child_boxes = HashSet::default();+ loop {+ let child = host.first_child(layout_node);+ if child.is_invalid() {+ break;+ }+ host.arena_mut().detach_child(layout_node, child);+ if !is_anonymous_inline_run_wrapper(host, child) {+ kept_child_boxes.insert(child);+ continue;+ }+ loop {+ let wrapped = host.first_child(child);+ if wrapped.is_invalid() {+ break;+ }+ host.arena_mut().detach_child(child, wrapped);+ kept_child_boxes.insert(wrapped);+ }+ super::layout_node_arena::prepare_subtree_for_detach(host_calls, host.arena_mut(), child);+ host.free_subtree(child);+ }+ host.set_children_are_inline(layout_node, false);+ kept_child_boxes+}++/// Places the children of a box whose child list [`detach_child_list_for_rebuild`] emptied again, in DOM order, as a+/// full build would. A child that keeps its box is placed again as a whole, so the anonymous wrappers it needs are+/// made again around it; a child whose box goes is built again, as are the children that had none.+fn rebuild_child_list_from_dom_children(+ host: &mut TreeBuilderHost<'_>,+ state: &mut TreeBuilderState,+ parent: StyleNodeID,+ context: &mut TreeBuilderContext,+ kept_child_boxes: &HashSet<LayoutNode>,+) {+ let mut node = host.first_dom_child(parent);+ while let Some(child) = node {+ // A table's box is kept inside its table wrapper.+ let mut kept_box = host.arena().bound_row(child);+ while !kept_box.is_invalid() && !kept_child_boxes.contains(&kept_box) {+ kept_box = host.parent(kept_box);+ }+ if kept_box.is_invalid() {+ update_layout_tree(host, state, child, context, false, FfiInsertionMode::Append);+ } else if host.arena().needs_layout_tree_update(child)+ && (host.arena().layout_tree_update_reuse_reasons(child) == 0+ || host.data(kept_box).kind.get() == NodeKind::TableWrapper)+ {+ // The child's box is built again from its new style, so the box it had goes. A table's box may be built+ // again too, and table fixup moves its outer properties to the wrapper only when it makes the wrapper.+ let host_calls = host.host_calls();+ super::layout_node_arena::prepare_subtree_for_detach(host_calls, host.arena_mut(), kept_box);+ host.free_subtree(kept_box);+ update_layout_tree(host, state, child, context, true, FfiInsertionMode::Append);+ } else {+ let is_inline_outside = node_is_inline_outside(host, kept_box);+ let kept_box = host.created(kept_box);+ let parent_layout_node = state.current_parent();+ insert_node_into_inline_or_block_ancestor(+ host,+ state,+ parent_layout_node,+ kept_box,+ is_inline_outside,+ FfiInsertionMode::Append,+ Some(child),+ );+ if !keeps_its_box_as_it_is(host, child, context, false) {+ update_layout_tree(host, state, child, context, false, FfiInsertionMode::Append);+ }+ }+ node = host.next_dom_sibling(child);+ }+}+struct PrincipalNodeUpdate<'host, 'callbacks, 'state, 'context> {kind: PrincipalNodeKind,reuse: LayoutNodeReuse,@@ -2437,9 +2791,10 @@ fn construct_principal_layout_node(if should_create_layout_node {// The box is built again from scratch, so every pseudo-element box it holds goes.clear_synthetic_pseudo_element_boxes(host.host_calls(), host.arena, element);- } else if host.arena().layout_tree_update_reuse_reasons(element)- & layout_tree_update_reuse_reason::PSEUDO_ELEMENT_CHANGE- != 0+ } else if !update.reuse.rebuild_child_list+ && host.arena().layout_tree_update_reuse_reasons(element)+ & layout_tree_update_reuse_reason::PSEUDO_ELEMENT_CHANGE+ != 0{// The box stays and only its generated content is regenerated, which is the ::before// and ::after boxes and nothing else.@@ -2681,8 +3036,15 @@ fn update_principal_node_after_entry(let placement =principal_box_placement_decision(placement_facts, layout_node_is_svg_box, prior_layout_top_layer);+ // A box whose child list is built again is a rebuild root as a replaced box is: every box the rebuild places+ // is inside it.+ let rebuilds_child_list = entry_facts.needs_layout_tree_update+ && update.reuse.rebuild_child_list+ && !entry_decision.should_create_layout_node;+ let starts_rebuild_root =+ placement.start_rebuild_root || (rebuilds_child_list && update.state.current_rebuild_root.is_invalid());let mut prior_rebuild_root = NodeSlotId::INVALID;- if placement.start_rebuild_root {+ if starts_rebuild_root {prior_rebuild_root = update.state.current_rebuild_root;update.state.current_rebuild_root = layout_node;update.state.rebuilt_subtree_roots.push(layout_node);@@ -2795,6 +3157,7 @@ fn update_principal_node_after_entry(should_create_layout_node: entry_decision.should_create_layout_node,update_pseudo_elements_in_place: update.reuse.update_pseudo_elements&& !entry_decision.should_create_layout_node,+ rebuild_child_list: rebuilds_child_list,must_create_subtree: update.must_create_subtree,insertion_mode: if update.reuse.insert_children {FfiInsertionMode::InDomOrder@@ -2807,7 +3170,7 @@ fn update_principal_node_after_entry(if placement.clear_layout_top_layer_for_descendants {context.layout_top_layer = prior_layout_top_layer;}- if placement.start_rebuild_root {+ if starts_rebuild_root {update.state.current_rebuild_root = prior_rebuild_root;}if starts_new_subtree {@@ -6008,6 +6371,28 @@ mod tests {assert_eq!(decision.top_layer, TopLayerEntryDecision::Continue);assert_eq!(decision.svg, SvgEntryDecision::Continue);+ facts.needs_layout_tree_update = true;+ let decision = principal_node_entry_decision(+ facts,+ LayoutNodeReuse::default(),+ PrincipalNodeKind::Element,+ element_type_facts,+ &context,+ );+ assert!(decision.should_create_layout_node);+ let decision = principal_node_entry_decision(+ facts,+ LayoutNodeReuse {+ rebuild_child_list: true,+ ..LayoutNodeReuse::default()+ },+ PrincipalNodeKind::Element,+ element_type_facts,+ &context,+ );+ assert!(!decision.should_create_layout_node);+ facts.needs_layout_tree_update = false;+facts.layout_node_is_attached = false;element_type_facts = element_adjustment_fact::RENDERED_IN_TOP_LAYER;let decision = principal_node_entry_decision(diff --git a/Tests/LibWeb/Text/expected/layout-tree-update/append-after-anonymous-inline-wrapper.txt b/Tests/LibWeb/Text/expected/layout-tree-update/append-after-anonymous-inline-wrapper.txtindex 31cf09d6bf1..9176a435f77 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/append-after-anonymous-inline-wrapper.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/append-after-anonymous-inline-wrapper.txt@@ -7,24 +7,24 @@ trailing run, float: boxes preserved=true, tree matches=true, geometry matches=ttrailing run, inline block pair: boxes preserved=true, tree matches=true, geometry matches=truetrailing run, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=truetrailing run, float pair: boxes preserved=true, tree matches=true, geometry matches=true-middle run, in-flow block: boxes preserved=false, tree matches=true, geometry matches=true-middle run, inline block: boxes preserved=false, tree matches=true, geometry matches=true-middle run, inline: boxes preserved=false, tree matches=true, geometry matches=true-middle run, absolute block: boxes preserved=false, tree matches=true, geometry matches=true-middle run, fixed block: boxes preserved=false, tree matches=true, geometry matches=true-middle run, float: boxes preserved=false, tree matches=true, geometry matches=true-middle run, inline block pair: boxes preserved=false, tree matches=true, geometry matches=true-middle run, absolute block pair: boxes preserved=false, tree matches=true, geometry matches=true-middle run, float pair: boxes preserved=false, tree matches=true, geometry matches=true-prepend, in-flow block: boxes preserved=false, tree matches=true, geometry matches=true-prepend, inline block: boxes preserved=false, tree matches=true, geometry matches=true-prepend, inline: boxes preserved=false, tree matches=true, geometry matches=true-prepend, absolute block: boxes preserved=false, tree matches=true, geometry matches=true-prepend, fixed block: boxes preserved=false, tree matches=true, geometry matches=true-prepend, float: boxes preserved=false, tree matches=true, geometry matches=true-prepend, inline block pair: boxes preserved=false, tree matches=true, geometry matches=true-prepend, absolute block pair: boxes preserved=false, tree matches=true, geometry matches=true-prepend, float pair: boxes preserved=false, tree matches=true, geometry matches=true+middle run, in-flow block: boxes preserved=true, tree matches=true, geometry matches=true+middle run, inline block: boxes preserved=true, tree matches=true, geometry matches=true+middle run, inline: boxes preserved=true, tree matches=true, geometry matches=true+middle run, absolute block: boxes preserved=true, tree matches=true, geometry matches=true+middle run, fixed block: boxes preserved=true, tree matches=true, geometry matches=true+middle run, float: boxes preserved=true, tree matches=true, geometry matches=true+middle run, inline block pair: boxes preserved=true, tree matches=true, geometry matches=true+middle run, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=true+middle run, float pair: boxes preserved=true, tree matches=true, geometry matches=true+prepend, in-flow block: boxes preserved=true, tree matches=true, geometry matches=true+prepend, inline block: boxes preserved=true, tree matches=true, geometry matches=true+prepend, inline: boxes preserved=true, tree matches=true, geometry matches=true+prepend, absolute block: boxes preserved=true, tree matches=true, geometry matches=true+prepend, fixed block: boxes preserved=true, tree matches=true, geometry matches=true+prepend, float: boxes preserved=true, tree matches=true, geometry matches=true+prepend, inline block pair: boxes preserved=true, tree matches=true, geometry matches=true+prepend, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=true+prepend, float pair: boxes preserved=true, tree matches=true, geometry matches=trueempty trailing run, in-flow block: boxes preserved=true, tree matches=true, geometry matches=trueempty trailing run, inline block: boxes preserved=true, tree matches=true, geometry matches=trueempty trailing run, inline: boxes preserved=true, tree matches=true, geometry matches=true@@ -43,24 +43,24 @@ trailing whitespace, float: boxes preserved=true, tree matches=true, geometry matrailing whitespace, inline block pair: boxes preserved=true, tree matches=true, geometry matches=truetrailing whitespace, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=truetrailing whitespace, float pair: boxes preserved=true, tree matches=true, geometry matches=true-after-inline, in-flow block: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, inline block: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, inline: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, absolute block: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, fixed block: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, float: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, inline block pair: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, absolute block pair: boxes preserved=false, tree matches=true, geometry matches=true-after-inline, float pair: boxes preserved=false, tree matches=true, geometry matches=true+after-inline, in-flow block: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, inline block: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, inline: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, absolute block: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, fixed block: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, float: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, inline block pair: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=true+after-inline, float pair: boxes preserved=true, tree matches=true, geometry matches=trueafter-block, in-flow block: boxes preserved=true, tree matches=true, geometry matches=true-after-block, inline block: boxes preserved=false, tree matches=true, geometry matches=true-after-block, inline: boxes preserved=false, tree matches=true, geometry matches=true-after-block, absolute block: boxes preserved=false, tree matches=true, geometry matches=true-after-block, fixed block: boxes preserved=false, tree matches=true, geometry matches=true-after-block, float: boxes preserved=false, tree matches=true, geometry matches=true-after-block, inline block pair: boxes preserved=false, tree matches=true, geometry matches=true-after-block, absolute block pair: boxes preserved=false, tree matches=true, geometry matches=true-after-block, float pair: boxes preserved=false, tree matches=true, geometry matches=true+after-block, inline block: boxes preserved=true, tree matches=true, geometry matches=true+after-block, inline: boxes preserved=true, tree matches=true, geometry matches=true+after-block, absolute block: boxes preserved=true, tree matches=true, geometry matches=true+after-block, fixed block: boxes preserved=true, tree matches=true, geometry matches=true+after-block, float: boxes preserved=true, tree matches=true, geometry matches=true+after-block, inline block pair: boxes preserved=true, tree matches=true, geometry matches=true+after-block, absolute block pair: boxes preserved=true, tree matches=true, geometry matches=true+after-block, float pair: boxes preserved=true, tree matches=true, geometry matches=truetwo inline runs, in-flow block: boxes preserved=true, tree matches=true, geometry matches=truetwo inline runs, inline block: boxes preserved=true, tree matches=true, geometry matches=truetwo inline runs, inline: boxes preserved=true, tree matches=true, geometry matches=truediff --git a/Tests/LibWeb/Text/expected/layout-tree-update/direct-child-list-preservation.txt b/Tests/LibWeb/Text/expected/layout-tree-update/direct-child-list-preservation.txtindex 34d2f62c288..228b175ac18 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/direct-child-list-preservation.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/direct-child-list-preservation.txt@@ -6,9 +6,9 @@ PASS: append block child before wrapped after pseudo-element | preserve parentPASS: append block child before wrapped after pseudo-element | preserve beforePASS: append block child before wrapped after pseudo-element | layout tree builds=1PASS: append block child before wrapped after pseudo-element | incremental tree matches full rebuild-PASS: fall back when block insertion splits generated inline wrapper | rebuild parent-PASS: fall back when block insertion splits generated inline wrapper | layout tree builds=1-PASS: fall back when block insertion splits generated inline wrapper | incremental tree matches full rebuild+PASS: rebuild child list when block insertion splits generated inline wrapper | preserve parent+PASS: rebuild child list when block insertion splits generated inline wrapper | layout tree builds=1+PASS: rebuild child list when block insertion splits generated inline wrapper | incremental tree matches full rebuildPASS: prepend block child in block flow | preserve parentPASS: prepend block child in block flow | preserve afterPASS: prepend block child in block flow | layout tree builds=1@@ -117,12 +117,16 @@ PASS: boxless insertion beside anonymous inline run | preserve parentPASS: boxless insertion beside anonymous inline run | preserve beforePASS: boxless insertion beside anonymous inline run | layout tree builds=1PASS: boxless insertion beside anonymous inline run | incremental tree matches full rebuild-PASS: fall back for inline child among block children | rebuild parent-PASS: fall back for inline child among block children | layout tree builds=1-PASS: fall back for inline child among block children | incremental tree matches full rebuild-PASS: fall back for block child among inline children | rebuild parent-PASS: fall back for block child among inline children | layout tree builds=1-PASS: fall back for block child among inline children | incremental tree matches full rebuild+PASS: rebuild child list for inline child among block children | preserve parent+PASS: rebuild child list for inline child among block children | preserve before+PASS: rebuild child list for inline child among block children | preserve after+PASS: rebuild child list for inline child among block children | layout tree builds=1+PASS: rebuild child list for inline child among block children | incremental tree matches full rebuild+PASS: rebuild child list for block child among inline children | preserve parent+PASS: rebuild child list for block child among inline children | preserve before+PASS: rebuild child list for block child among inline children | preserve after+PASS: rebuild child list for block child among inline children | layout tree builds=1+PASS: rebuild child list for block child among inline children | incremental tree matches full rebuildPASS: append block child after anonymous inline run | preserve parentPASS: append block child after anonymous inline run | preserve beforePASS: append block child after anonymous inline run | layout tree builds=1@@ -169,9 +173,11 @@ PASS: append absolute block child after whitespace and anonymous inline run | prPASS: append absolute block child after whitespace and anonymous inline run | preserve inlinePASS: append absolute block child after whitespace and anonymous inline run | layout tree builds=1PASS: append absolute block child after whitespace and anonymous inline run | incremental tree matches full rebuild-PASS: fall back for absolute block child after whitespace before existing child | rebuild parent-PASS: fall back for absolute block child after whitespace before existing child | layout tree builds=1-PASS: fall back for absolute block child after whitespace before existing child | incremental tree matches full rebuild+PASS: rebuild child list for absolute block child after whitespace before existing child | preserve parent+PASS: rebuild child list for absolute block child after whitespace before existing child | preserve before+PASS: rebuild child list for absolute block child after whitespace before existing child | preserve after+PASS: rebuild child list for absolute block child after whitespace before existing child | layout tree builds=1+PASS: rebuild child list for absolute block child after whitespace before existing child | incremental tree matches full rebuildPASS: append ordered list subtree | preserve parentPASS: append ordered list subtree | preserve beforePASS: append ordered list subtree | layout tree builds=1@@ -196,9 +202,10 @@ PASS: append counter increment before a sibling of the parent | preserve parentPASS: append counter increment before a sibling of the parent | preserve beforePASS: append counter increment before a sibling of the parent | layout tree builds=1PASS: append counter increment before a sibling of the parent | incremental tree matches full rebuild-PASS: fall back when appended counter subtree is followed by generated content | rebuild parent-PASS: fall back when appended counter subtree is followed by generated content | layout tree builds=1-PASS: fall back when appended counter subtree is followed by generated content | incremental tree matches full rebuild+PASS: rebuild child list when appended counter subtree is followed by generated content | preserve parent+PASS: rebuild child list when appended counter subtree is followed by generated content | preserve before+PASS: rebuild child list when appended counter subtree is followed by generated content | layout tree builds=1+PASS: rebuild child list when appended counter subtree is followed by generated content | incremental tree matches full rebuildPASS: fall back when appending a list-item increment after a reversed list | rebuild parentPASS: fall back when appending a list-item increment after a reversed list | layout tree builds=1PASS: fall back when appending a list-item increment after a reversed list | incremental tree matches full rebuild@@ -218,15 +225,75 @@ PASS: append text and inline child after block child | preserve parentPASS: append text and inline child after block child | preserve beforePASS: append text and inline child after block child | layout tree builds=1PASS: append text and inline child after block child | incremental tree matches full rebuild-PASS: fall back for text before existing block child | rebuild parent-PASS: fall back for text before existing block child | layout tree builds=1-PASS: fall back for text before existing block child | incremental tree matches full rebuild-PASS: fall back for text before appended block child | rebuild parent-PASS: fall back for text before appended block child | layout tree builds=1-PASS: fall back for text before appended block child | incremental tree matches full rebuild-PASS: fall back for block child before anonymous inline run | rebuild parent-PASS: fall back for block child before anonymous inline run | layout tree builds=1-PASS: fall back for block child before anonymous inline run | incremental tree matches full rebuild+PASS: rebuild child list for text before existing block child | preserve parent+PASS: rebuild child list for text before existing block child | preserve before+PASS: rebuild child list for text before existing block child | preserve after+PASS: rebuild child list for text before existing block child | layout tree builds=1+PASS: rebuild child list for text before existing block child | incremental tree matches full rebuild+PASS: rebuild child list for text before appended block child | preserve parent+PASS: rebuild child list for text before appended block child | preserve before+PASS: rebuild child list for text before appended block child | layout tree builds=1+PASS: rebuild child list for text before appended block child | incremental tree matches full rebuild+PASS: rebuild child list for block child before anonymous inline run | preserve parent+PASS: rebuild child list for block child before anonymous inline run | preserve before+PASS: rebuild child list for block child before anonymous inline run | preserve inline+PASS: rebuild child list for block child before anonymous inline run | layout tree builds=1+PASS: rebuild child list for block child before anonymous inline run | incremental tree matches full rebuild+PASS: rebuild child list around a table child | preserve parent+PASS: rebuild child list around a table child | preserve before+PASS: rebuild child list around a table child | preserve after+PASS: rebuild child list around a table child | layout tree builds=1+PASS: rebuild child list around a table child | incremental tree matches full rebuild+PASS: rebuild child list around an absolute inline table child | preserve parent+PASS: rebuild child list around an absolute inline table child | preserve before+PASS: rebuild child list around an absolute inline table child | preserve after+PASS: rebuild child list around an absolute inline table child | layout tree builds=1+PASS: rebuild child list around an absolute inline table child | incremental tree matches full rebuild+PASS: rebuild child list around an svg child | preserve parent+PASS: rebuild child list around an svg child | preserve before+PASS: rebuild child list around an svg child | preserve after+PASS: rebuild child list around an svg child | layout tree builds=1+PASS: rebuild child list around an svg child | incremental tree matches full rebuild+PASS: rebuild child list around inline generated content | preserve parent+PASS: rebuild child list around inline generated content | preserve before+PASS: rebuild child list around inline generated content | preserve after+PASS: rebuild child list around inline generated content | layout tree builds=1+PASS: rebuild child list around inline generated content | incremental tree matches full rebuild+PASS: rebuild child list of a list item | preserve parent+PASS: rebuild child list of a list item | preserve before+PASS: rebuild child list of a list item | preserve after+PASS: rebuild child list of a list item | layout tree builds=1+PASS: rebuild child list of a list item | incremental tree matches full rebuild+PASS: rebuild child list of an inside list item | preserve parent+PASS: rebuild child list of an inside list item | preserve before+PASS: rebuild child list of an inside list item | preserve after+PASS: rebuild child list of an inside list item | layout tree builds=1+PASS: rebuild child list of an inside list item | incremental tree matches full rebuild+PASS: rebuild child list for absolute child after whitespace in flex | preserve parent+PASS: rebuild child list for absolute child after whitespace in flex | preserve before+PASS: rebuild child list for absolute child after whitespace in flex | preserve after+PASS: rebuild child list for absolute child after whitespace in flex | layout tree builds=1+PASS: rebuild child list for absolute child after whitespace in flex | incremental tree matches full rebuild+PASS: rebuild child list around a float in an inline run | preserve parent+PASS: rebuild child list around a float in an inline run | preserve before+PASS: rebuild child list around a float in an inline run | preserve inline+PASS: rebuild child list around a float in an inline run | layout tree builds=1+PASS: rebuild child list around a float in an inline run | incremental tree matches full rebuild+PASS: rebuild child list while a kept child gains children | preserve parent+PASS: rebuild child list while a kept child gains children | preserve before+PASS: rebuild child list while a kept child gains children | preserve after+PASS: rebuild child list while a kept child gains children | layout tree builds=1+PASS: rebuild child list while a kept child gains children | incremental tree matches full rebuild+PASS: rebuild nested child lists | preserve parent+PASS: rebuild nested child lists | preserve before+PASS: rebuild nested child lists | preserve after+PASS: rebuild nested child lists | preserve inner+PASS: rebuild nested child lists | layout tree builds=1+PASS: rebuild nested child lists | incremental tree matches full rebuild+PASS: rebuild child list while a kept child is restyled | preserve parent+PASS: rebuild child list while a kept child is restyled | preserve after+PASS: rebuild child list while a kept child is restyled | layout tree builds=1+PASS: rebuild child list while a kept child is restyled | incremental tree matches full rebuildPASS: append floated block child after anonymous inline run | preserve parentPASS: append floated block child after anonymous inline run | preserve beforePASS: append floated block child after anonymous inline run | preserve inlinediff --git a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-1.txt b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-1.txtindex 4afe556ca38..f2fbdca3617 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-1.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-1.txt@@ -10,16 +10,16 @@ RECREATED: display none -> contents in block | following siblingRECREATED: display none -> contents in block | following sibling descendantSTATS: display none -> contents in block | rebuilt subtree roots=1, escaped=falsePASS: display none -> contents in block | incremental tree matches full rebuild-RECREATED: display none -> flex in inline-flex | fixture ancestor-RECREATED: display none -> flex in inline-flex | distant sibling-RECREATED: display none -> flex in inline-flex | distant sibling descendant-RECREATED: display none -> flex in inline-flex | DOM parent-RECREATED: display none -> flex in inline-flex | preceding sibling-RECREATED: display none -> flex in inline-flex | preceding sibling descendant+PRESERVED: display none -> flex in inline-flex | fixture ancestor+PRESERVED: display none -> flex in inline-flex | distant sibling+PRESERVED: display none -> flex in inline-flex | distant sibling descendant+PRESERVED: display none -> flex in inline-flex | DOM parent+PRESERVED: display none -> flex in inline-flex | preceding sibling+PRESERVED: display none -> flex in inline-flex | preceding sibling descendantCREATED: display none -> flex in inline-flex | targetCREATED: display none -> flex in inline-flex | target descendant-RECREATED: display none -> flex in inline-flex | following sibling-RECREATED: display none -> flex in inline-flex | following sibling descendant+PRESERVED: display none -> flex in inline-flex | following sibling+PRESERVED: display none -> flex in inline-flex | following sibling descendantSTATS: display none -> flex in inline-flex | rebuilt subtree roots=1, escaped=falsePASS: display none -> flex in inline-flex | incremental tree matches full rebuildRECREATED: display none -> -webkit-inline-box in table-row-group | fixture ancestordiff --git a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-3.txt b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-3.txtindex 4063e678f1e..8e0869e06d1 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-3.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-3.txt@@ -10,16 +10,16 @@ RECREATED: display none -> inline in flow-root | following siblingRECREATED: display none -> inline in flow-root | following sibling descendantSTATS: display none -> inline in flow-root | rebuilt subtree roots=1, escaped=falsePASS: display none -> inline in flow-root | incremental tree matches full rebuild-RECREATED: display none -> grid in inline-grid | fixture ancestor-RECREATED: display none -> grid in inline-grid | distant sibling-RECREATED: display none -> grid in inline-grid | distant sibling descendant-RECREATED: display none -> grid in inline-grid | DOM parent-RECREATED: display none -> grid in inline-grid | preceding sibling-RECREATED: display none -> grid in inline-grid | preceding sibling descendant+PRESERVED: display none -> grid in inline-grid | fixture ancestor+PRESERVED: display none -> grid in inline-grid | distant sibling+PRESERVED: display none -> grid in inline-grid | distant sibling descendant+PRESERVED: display none -> grid in inline-grid | DOM parent+PRESERVED: display none -> grid in inline-grid | preceding sibling+PRESERVED: display none -> grid in inline-grid | preceding sibling descendantCREATED: display none -> grid in inline-grid | targetCREATED: display none -> grid in inline-grid | target descendant-RECREATED: display none -> grid in inline-grid | following sibling-RECREATED: display none -> grid in inline-grid | following sibling descendant+PRESERVED: display none -> grid in inline-grid | following sibling+PRESERVED: display none -> grid in inline-grid | following sibling descendantSTATS: display none -> grid in inline-grid | rebuilt subtree roots=1, escaped=falsePASS: display none -> grid in inline-grid | incremental tree matches full rebuildRECREATED: display none -> table-header-group in table-footer-group | fixture ancestordiff --git a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-6.txt b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-6.txtindex 9115610a3cb..5a7f69b95a2 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-6.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-6.txt@@ -34,16 +34,16 @@ ABSENT: display none -> table-cell in table-column-group | following siblingABSENT: display none -> table-cell in table-column-group | following sibling descendantSTATS: display none -> table-cell in table-column-group | rebuilt subtree roots=1, escaped=falsePASS: display none -> table-cell in table-column-group | incremental tree matches full rebuild-RECREATED: display none -> block flex in inline flex | fixture ancestor-RECREATED: display none -> block flex in inline flex | distant sibling-RECREATED: display none -> block flex in inline flex | distant sibling descendant-RECREATED: display none -> block flex in inline flex | DOM parent-RECREATED: display none -> block flex in inline flex | preceding sibling-RECREATED: display none -> block flex in inline flex | preceding sibling descendant+PRESERVED: display none -> block flex in inline flex | fixture ancestor+PRESERVED: display none -> block flex in inline flex | distant sibling+PRESERVED: display none -> block flex in inline flex | distant sibling descendant+PRESERVED: display none -> block flex in inline flex | DOM parent+PRESERVED: display none -> block flex in inline flex | preceding sibling+PRESERVED: display none -> block flex in inline flex | preceding sibling descendantCREATED: display none -> block flex in inline flex | targetCREATED: display none -> block flex in inline flex | target descendant-RECREATED: display none -> block flex in inline flex | following sibling-RECREATED: display none -> block flex in inline flex | following sibling descendant+PRESERVED: display none -> block flex in inline flex | following sibling+PRESERVED: display none -> block flex in inline flex | following sibling descendantSTATS: display none -> block flex in inline flex | rebuilt subtree roots=1, escaped=falsePASS: display none -> block flex in inline flex | incremental tree matches full rebuildPRESERVED: display contents -> none in block | fixture ancestordiff --git a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-8.txt b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-8.txtindex 99dbaa945f1..75581067c62 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-8.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/style-invalidation-scope-display-8.txt@@ -10,16 +10,16 @@ PRESERVED: display none -> inline list-item in flex | following siblingPRESERVED: display none -> inline list-item in flex | following sibling descendantSTATS: display none -> inline list-item in flex | rebuilt subtree roots=1, escaped=falsePASS: display none -> inline list-item in flex | incremental tree matches full rebuild-RECREATED: display none -> -webkit-box in -webkit-inline-box | fixture ancestor-RECREATED: display none -> -webkit-box in -webkit-inline-box | distant sibling-RECREATED: display none -> -webkit-box in -webkit-inline-box | distant sibling descendant-RECREATED: display none -> -webkit-box in -webkit-inline-box | DOM parent-RECREATED: display none -> -webkit-box in -webkit-inline-box | preceding sibling-RECREATED: display none -> -webkit-box in -webkit-inline-box | preceding sibling descendant+PRESERVED: display none -> -webkit-box in -webkit-inline-box | fixture ancestor+PRESERVED: display none -> -webkit-box in -webkit-inline-box | distant sibling+PRESERVED: display none -> -webkit-box in -webkit-inline-box | distant sibling descendant+PRESERVED: display none -> -webkit-box in -webkit-inline-box | DOM parent+PRESERVED: display none -> -webkit-box in -webkit-inline-box | preceding sibling+PRESERVED: display none -> -webkit-box in -webkit-inline-box | preceding sibling descendantCREATED: display none -> -webkit-box in -webkit-inline-box | targetCREATED: display none -> -webkit-box in -webkit-inline-box | target descendant-RECREATED: display none -> -webkit-box in -webkit-inline-box | following sibling-RECREATED: display none -> -webkit-box in -webkit-inline-box | following sibling descendant+PRESERVED: display none -> -webkit-box in -webkit-inline-box | following sibling+PRESERVED: display none -> -webkit-box in -webkit-inline-box | following sibling descendantSTATS: display none -> -webkit-box in -webkit-inline-box | rebuilt subtree roots=1, escaped=falsePASS: display none -> -webkit-box in -webkit-inline-box | incremental tree matches full rebuildRECREATED: display none -> table-column in table-caption | fixture ancestor@@ -34,16 +34,16 @@ RECREATED: display none -> table-column in table-caption | following siblingRECREATED: display none -> table-column in table-caption | following sibling descendantSTATS: display none -> table-column in table-caption | rebuilt subtree roots=1, escaped=falsePASS: display none -> table-column in table-caption | incremental tree matches full rebuild-RECREATED: display none -> block grid in inline grid | fixture ancestor-RECREATED: display none -> block grid in inline grid | distant sibling-RECREATED: display none -> block grid in inline grid | distant sibling descendant-RECREATED: display none -> block grid in inline grid | DOM parent-RECREATED: display none -> block grid in inline grid | preceding sibling-RECREATED: display none -> block grid in inline grid | preceding sibling descendant+PRESERVED: display none -> block grid in inline grid | fixture ancestor+PRESERVED: display none -> block grid in inline grid | distant sibling+PRESERVED: display none -> block grid in inline grid | distant sibling descendant+PRESERVED: display none -> block grid in inline grid | DOM parent+PRESERVED: display none -> block grid in inline grid | preceding sibling+PRESERVED: display none -> block grid in inline grid | preceding sibling descendantCREATED: display none -> block grid in inline grid | targetCREATED: display none -> block grid in inline grid | target descendant-RECREATED: display none -> block grid in inline grid | following sibling-RECREATED: display none -> block grid in inline grid | following sibling descendant+PRESERVED: display none -> block grid in inline grid | following sibling+PRESERVED: display none -> block grid in inline grid | following sibling descendantSTATS: display none -> block grid in inline grid | rebuilt subtree roots=1, escaped=falsePASS: display none -> block grid in inline grid | incremental tree matches full rebuildRECREATED: display contents -> inline in inline-block | fixture ancestordiff --git a/Tests/LibWeb/Text/expected/layout-tree-update/svg-child-insertion-preservation.txt b/Tests/LibWeb/Text/expected/layout-tree-update/svg-child-insertion-preservation.txtindex 07d05af05b4..be6e2a39e06 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/svg-child-insertion-preservation.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/svg-child-insertion-preservation.txt@@ -2,38 +2,38 @@ block mixed, append, display: block: boxes preserved=true, tree matches=true, geblock mixed, append, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueblock mixed, append, position: absolute: boxes preserved=true, tree matches=true, geometry matches=trueblock mixed, append, float: left: boxes preserved=true, tree matches=true, geometry matches=true-block mixed, middle, display: block: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, middle, display: inline: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, middle, position: absolute: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, middle, float: left: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, prepend, display: block: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, prepend, display: inline: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, prepend, position: absolute: boxes preserved=false, tree matches=true, geometry matches=true-block mixed, prepend, float: left: boxes preserved=false, tree matches=true, geometry matches=true-block inline, append, display: block: boxes preserved=false, tree matches=true, geometry matches=true+block mixed, middle, display: block: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, middle, display: inline: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, middle, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, middle, float: left: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, prepend, display: block: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, prepend, display: inline: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, prepend, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true+block mixed, prepend, float: left: boxes preserved=true, tree matches=true, geometry matches=true+block inline, append, display: block: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, append, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, append, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-block inline, append, float: left: boxes preserved=false, tree matches=true, geometry matches=true-block inline, middle, display: block: boxes preserved=false, tree matches=true, geometry matches=true+block inline, append, float: left: boxes preserved=true, tree matches=true, geometry matches=true+block inline, middle, display: block: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, middle, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, middle, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-block inline, middle, float: left: boxes preserved=false, tree matches=true, geometry matches=true-block inline, prepend, display: block: boxes preserved=false, tree matches=true, geometry matches=true+block inline, middle, float: left: boxes preserved=true, tree matches=true, geometry matches=true+block inline, prepend, display: block: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, prepend, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueblock inline, prepend, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-block inline, prepend, float: left: boxes preserved=false, tree matches=true, geometry matches=true-inline-block inline, append, display: block: boxes preserved=false, tree matches=true, geometry matches=true+block inline, prepend, float: left: boxes preserved=true, tree matches=true, geometry matches=true+inline-block inline, append, display: block: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, append, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, append, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-inline-block inline, append, float: left: boxes preserved=false, tree matches=true, geometry matches=true-inline-block inline, middle, display: block: boxes preserved=false, tree matches=true, geometry matches=true+inline-block inline, append, float: left: boxes preserved=true, tree matches=true, geometry matches=true+inline-block inline, middle, display: block: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, middle, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, middle, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-inline-block inline, middle, float: left: boxes preserved=false, tree matches=true, geometry matches=true-inline-block inline, prepend, display: block: boxes preserved=false, tree matches=true, geometry matches=true+inline-block inline, middle, float: left: boxes preserved=true, tree matches=true, geometry matches=true+inline-block inline, prepend, display: block: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, prepend, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueinline-block inline, prepend, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true-inline-block inline, prepend, float: left: boxes preserved=false, tree matches=true, geometry matches=true+inline-block inline, prepend, float: left: boxes preserved=true, tree matches=true, geometry matches=trueflex mixed, append, display: block: boxes preserved=true, tree matches=true, geometry matches=trueflex mixed, append, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueflex mixed, append, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true@@ -42,10 +42,10 @@ flex mixed, middle, display: block: boxes preserved=true, tree matches=true, geoflex mixed, middle, display: inline: boxes preserved=true, tree matches=true, geometry matches=trueflex mixed, middle, position: absolute: boxes preserved=true, tree matches=true, geometry matches=trueflex mixed, middle, float: left: boxes preserved=true, tree matches=true, geometry matches=true-flex mixed, prepend, display: block: boxes preserved=false, tree matches=true, geometry matches=true-flex mixed, prepend, display: inline: boxes preserved=false, tree matches=true, geometry matches=true-flex mixed, prepend, position: absolute: boxes preserved=false, tree matches=true, geometry matches=true-flex mixed, prepend, float: left: boxes preserved=false, tree matches=true, geometry matches=true+flex mixed, prepend, display: block: boxes preserved=true, tree matches=true, geometry matches=true+flex mixed, prepend, display: inline: boxes preserved=true, tree matches=true, geometry matches=true+flex mixed, prepend, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true+flex mixed, prepend, float: left: boxes preserved=true, tree matches=true, geometry matches=truegrid mixed, append, display: block: boxes preserved=true, tree matches=true, geometry matches=truegrid mixed, append, display: inline: boxes preserved=true, tree matches=true, geometry matches=truegrid mixed, append, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true@@ -54,7 +54,7 @@ grid mixed, middle, display: block: boxes preserved=true, tree matches=true, geogrid mixed, middle, display: inline: boxes preserved=true, tree matches=true, geometry matches=truegrid mixed, middle, position: absolute: boxes preserved=true, tree matches=true, geometry matches=truegrid mixed, middle, float: left: boxes preserved=true, tree matches=true, geometry matches=true-grid mixed, prepend, display: block: boxes preserved=false, tree matches=true, geometry matches=true-grid mixed, prepend, display: inline: boxes preserved=false, tree matches=true, geometry matches=true-grid mixed, prepend, position: absolute: boxes preserved=false, tree matches=true, geometry matches=true-grid mixed, prepend, float: left: boxes preserved=false, tree matches=true, geometry matches=true+grid mixed, prepend, display: block: boxes preserved=true, tree matches=true, geometry matches=true+grid mixed, prepend, display: inline: boxes preserved=true, tree matches=true, geometry matches=true+grid mixed, prepend, position: absolute: boxes preserved=true, tree matches=true, geometry matches=true+grid mixed, prepend, float: left: boxes preserved=true, tree matches=true, geometry matches=truediff --git a/Tests/LibWeb/Text/expected/layout-tree-update/whitespace-child-insertion-preservation.txt b/Tests/LibWeb/Text/expected/layout-tree-update/whitespace-child-insertion-preservation.txtindex 6a9f93d95de..23a14eaee5a 100644--- a/Tests/LibWeb/Text/expected/layout-tree-update/whitespace-child-insertion-preservation.txt+++ b/Tests/LibWeb/Text/expected/layout-tree-update/whitespace-child-insertion-preservation.txt@@ -37,7 +37,7 @@ PASS: insert around block children | insert whitespace between blocks | incremenPASS: insert around block children | append whitespace | preservePASS: insert around block children | append whitespace | layout tree builds=1PASS: insert around block children | append whitespace | incremental tree matches full rebuild-PASS: insert around block children | rebuild before blocks with trailing run | rebuild+PASS: insert around block children | rebuild before blocks with trailing run | preservePASS: insert around block children | rebuild before blocks with trailing run | layout tree builds=1PASS: insert around block children | rebuild before blocks with trailing run | incremental tree matches full rebuildPASS: insert around flex items | prepend whitespace | preserve@@ -49,7 +49,7 @@ PASS: insert around flex items | insert whitespace between items | incremental tPASS: insert around flex items | append whitespace | preservePASS: insert around flex items | append whitespace | layout tree builds=1PASS: insert around flex items | append whitespace | incremental tree matches full rebuild-PASS: insert around flex items | rebuild before items with trailing text item | rebuild+PASS: insert around flex items | rebuild before items with trailing text item | preservePASS: insert around flex items | rebuild before items with trailing text item | layout tree builds=1PASS: insert around flex items | rebuild before items with trailing text item | incremental tree matches full rebuildPASS: insert around grid items | prepend whitespace | preserve@@ -61,7 +61,7 @@ PASS: insert around grid items | insert whitespace between items | incremental tPASS: insert around grid items | append whitespace | preservePASS: insert around grid items | append whitespace | layout tree builds=1PASS: insert around grid items | append whitespace | incremental tree matches full rebuild-PASS: insert around grid items | rebuild between items with trailing text item | rebuild+PASS: insert around grid items | rebuild between items with trailing text item | preservePASS: insert around grid items | rebuild between items with trailing text item | layout tree builds=1PASS: insert around grid items | rebuild between items with trailing text item | incremental tree matches full rebuildPASS: insert whitespace with hidden siblings | insert whitespace and display-none element | preserve@@ -79,25 +79,25 @@ PASS: insert flex item with surrounding whitespace | append mixed fragment | incPASS: insert grid item with surrounding whitespace | prepend mixed fragment | preservePASS: insert grid item with surrounding whitespace | prepend mixed fragment | layout tree builds=1PASS: insert grid item with surrounding whitespace | prepend mixed fragment | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between blocks | rebuild for adjacent spaces | rebuild+PASS: insert adjacent whitespace nodes between blocks | rebuild for adjacent spaces | preservePASS: insert adjacent whitespace nodes between blocks | rebuild for adjacent spaces | layout tree builds=1PASS: insert adjacent whitespace nodes between blocks | rebuild for adjacent spaces | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between blocks | rebuild when extending the anonymous run | rebuild+PASS: insert adjacent whitespace nodes between blocks | rebuild when extending the anonymous run | preservePASS: insert adjacent whitespace nodes between blocks | rebuild when extending the anonymous run | layout tree builds=1PASS: insert adjacent whitespace nodes between blocks | rebuild when extending the anonymous run | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between flex items | rebuild for adjacent spaces | rebuild+PASS: insert adjacent whitespace nodes between flex items | rebuild for adjacent spaces | preservePASS: insert adjacent whitespace nodes between flex items | rebuild for adjacent spaces | layout tree builds=1PASS: insert adjacent whitespace nodes between flex items | rebuild for adjacent spaces | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between flex items | rebuild when extending the anonymous item | rebuild+PASS: insert adjacent whitespace nodes between flex items | rebuild when extending the anonymous item | preservePASS: insert adjacent whitespace nodes between flex items | rebuild when extending the anonymous item | layout tree builds=1PASS: insert adjacent whitespace nodes between flex items | rebuild when extending the anonymous item | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between grid items | rebuild for adjacent spaces | rebuild+PASS: insert adjacent whitespace nodes between grid items | rebuild for adjacent spaces | preservePASS: insert adjacent whitespace nodes between grid items | rebuild for adjacent spaces | layout tree builds=1PASS: insert adjacent whitespace nodes between grid items | rebuild for adjacent spaces | incremental tree matches full rebuild-PASS: insert adjacent whitespace nodes between grid items | rebuild when extending the anonymous item | rebuild+PASS: insert adjacent whitespace nodes between grid items | rebuild when extending the anonymous item | preservePASS: insert adjacent whitespace nodes between grid items | rebuild when extending the anonymous item | layout tree builds=1PASS: insert adjacent whitespace nodes between grid items | rebuild when extending the anonymous item | incremental tree matches full rebuild-PASS: insert whitespace interleaved with hidden nodes | rebuild for interleaved batch | rebuild+PASS: insert whitespace interleaved with hidden nodes | rebuild for interleaved batch | preservePASS: insert whitespace interleaved with hidden nodes | rebuild for interleaved batch | layout tree builds=1PASS: insert whitespace interleaved with hidden nodes | rebuild for interleaved batch | incremental tree matches full rebuildPASS: append whitespace runs separated by boxless siblings | append whitespace, hidden element and whitespace | preserve@@ -115,34 +115,34 @@ PASS: append whitespace runs separated by boxless siblings to flex items | appenPASS: trailing inline run changes block insertion | create trailing run | preservePASS: trailing inline run changes block insertion | create trailing run | layout tree builds=1PASS: trailing inline run changes block insertion | create trailing run | incremental tree matches full rebuild-PASS: trailing inline run changes block insertion | rebuild for earlier new run | rebuild+PASS: trailing inline run changes block insertion | rebuild for earlier new run | preservePASS: trailing inline run changes block insertion | rebuild for earlier new run | layout tree builds=1PASS: trailing inline run changes block insertion | rebuild for earlier new run | incremental tree matches full rebuild-PASS: trailing inline run changes block insertion | rebuild beside non-trailing middle run | rebuild+PASS: trailing inline run changes block insertion | rebuild beside non-trailing middle run | preservePASS: trailing inline run changes block insertion | rebuild beside non-trailing middle run | layout tree builds=1PASS: trailing inline run changes block insertion | rebuild beside non-trailing middle run | incremental tree matches full rebuildPASS: trailing text item changes flex insertion | create trailing text item | preservePASS: trailing text item changes flex insertion | create trailing text item | layout tree builds=1PASS: trailing text item changes flex insertion | create trailing text item | incremental tree matches full rebuild-PASS: trailing text item changes flex insertion | rebuild for earlier text item | rebuild+PASS: trailing text item changes flex insertion | rebuild for earlier text item | preservePASS: trailing text item changes flex insertion | rebuild for earlier text item | layout tree builds=1PASS: trailing text item changes flex insertion | rebuild for earlier text item | incremental tree matches full rebuild-PASS: trailing text item changes flex insertion | rebuild beside non-trailing middle item | rebuild+PASS: trailing text item changes flex insertion | rebuild beside non-trailing middle item | preservePASS: trailing text item changes flex insertion | rebuild beside non-trailing middle item | layout tree builds=1PASS: trailing text item changes flex insertion | rebuild beside non-trailing middle item | incremental tree matches full rebuildPASS: trailing text item changes grid insertion | create trailing text item | preservePASS: trailing text item changes grid insertion | create trailing text item | layout tree builds=1PASS: trailing text item changes grid insertion | create trailing text item | incremental tree matches full rebuild-PASS: trailing text item changes grid insertion | rebuild for earlier text item | rebuild+PASS: trailing text item changes grid insertion | rebuild for earlier text item | preservePASS: trailing text item changes grid insertion | rebuild for earlier text item | layout tree builds=1PASS: trailing text item changes grid insertion | rebuild for earlier text item | incremental tree matches full rebuild-PASS: trailing text item changes grid insertion | rebuild beside non-trailing middle item | rebuild+PASS: trailing text item changes grid insertion | rebuild beside non-trailing middle item | preservePASS: trailing text item changes grid insertion | rebuild beside non-trailing middle item | layout tree builds=1PASS: trailing text item changes grid insertion | rebuild beside non-trailing middle item | incremental tree matches full rebuild-PASS: absolute before block progression | insert before absolute | rebuild+PASS: absolute before block progression | insert before absolute | preservePASS: absolute before block progression | insert before absolute | layout tree builds=1PASS: absolute before block progression | insert before absolute | incremental tree matches full rebuild-PASS: absolute before block progression | insert between absolute and block | rebuild+PASS: absolute before block progression | insert between absolute and block | preservePASS: absolute before block progression | insert between absolute and block | layout tree builds=1PASS: absolute before block progression | insert between absolute and block | incremental tree matches full rebuildPASS: absolute before block progression | preserve after block | preserve@@ -151,16 +151,16 @@ PASS: absolute before block progression | preserve after block | incremental trePASS: absolute after block progression | insert after absolute | preservePASS: absolute after block progression | insert after absolute | layout tree builds=1PASS: absolute after block progression | insert after absolute | incremental tree matches full rebuild-PASS: absolute after block progression | insert before absolute | rebuild+PASS: absolute after block progression | insert before absolute | preservePASS: absolute after block progression | insert before absolute | layout tree builds=1PASS: absolute after block progression | insert before absolute | incremental tree matches full rebuild-PASS: absolute after block progression | insert before block | rebuild+PASS: absolute after block progression | insert before block | preservePASS: absolute after block progression | insert before block | layout tree builds=1PASS: absolute after block progression | insert before block | incremental tree matches full rebuild-PASS: float before block progression | insert before float | rebuild+PASS: float before block progression | insert before float | preservePASS: float before block progression | insert before float | layout tree builds=1PASS: float before block progression | insert before float | incremental tree matches full rebuild-PASS: float before block progression | insert between float and block | rebuild+PASS: float before block progression | insert between float and block | preservePASS: float before block progression | insert between float and block | layout tree builds=1PASS: float before block progression | insert between float and block | incremental tree matches full rebuildPASS: float before block progression | preserve after block | preserve@@ -169,13 +169,13 @@ PASS: float before block progression | preserve after block | incremental tree mPASS: float after block progression | insert after float | preservePASS: float after block progression | insert after float | layout tree builds=1PASS: float after block progression | insert after float | incremental tree matches full rebuild-PASS: float after block progression | insert before float | rebuild+PASS: float after block progression | insert before float | preservePASS: float after block progression | insert before float | layout tree builds=1PASS: float after block progression | insert before float | incremental tree matches full rebuild-PASS: float after block progression | insert before block | rebuild+PASS: float after block progression | insert before block | preservePASS: float after block progression | insert before block | layout tree builds=1PASS: float after block progression | insert before block | incremental tree matches full rebuild-PASS: absolute before flex item progression | rebuild before absolute | rebuild+PASS: absolute before flex item progression | rebuild before absolute | preservePASS: absolute before flex item progression | rebuild before absolute | layout tree builds=1PASS: absolute before flex item progression | rebuild before absolute | incremental tree matches full rebuildPASS: absolute before flex item progression | preserve after absolute | preserve@@ -187,13 +187,13 @@ PASS: absolute before flex item progression | preserve after final item | incremPASS: absolute after flex item progression | insert after absolute | preservePASS: absolute after flex item progression | insert after absolute | layout tree builds=1PASS: absolute after flex item progression | insert after absolute | incremental tree matches full rebuild-PASS: absolute after flex item progression | rebuild before absolute | rebuild+PASS: absolute after flex item progression | rebuild before absolute | preservePASS: absolute after flex item progression | rebuild before absolute | layout tree builds=1PASS: absolute after flex item progression | rebuild before absolute | incremental tree matches full rebuild-PASS: absolute after flex item progression | rebuild before item | rebuild+PASS: absolute after flex item progression | rebuild before item | preservePASS: absolute after flex item progression | rebuild before item | layout tree builds=1PASS: absolute after flex item progression | rebuild before item | incremental tree matches full rebuild-PASS: generated before inline progression | rebuild between before and block | rebuild+PASS: generated before inline progression | rebuild between before and block | preservePASS: generated before inline progression | rebuild between before and block | layout tree builds=1PASS: generated before inline progression | rebuild between before and block | incremental tree matches full rebuildPASS: generated before inline progression | preserve after block | preserve@@ -202,25 +202,25 @@ PASS: generated before inline progression | preserve after block | incremental tPASS: generated before inline progression | preserve in trailing inline run | preservePASS: generated before inline progression | preserve in trailing inline run | layout tree builds=1PASS: generated before inline progression | preserve in trailing inline run | incremental tree matches full rebuild-PASS: generated before inline progression | rebuild beside before again | rebuild+PASS: generated before inline progression | rebuild beside before again | preservePASS: generated before inline progression | rebuild beside before again | layout tree builds=1PASS: generated before inline progression | rebuild beside before again | incremental tree matches full rebuild-PASS: generated after inline progression | rebuild before block with trailing after run | rebuild+PASS: generated after inline progression | rebuild before block with trailing after run | preservePASS: generated after inline progression | rebuild before block with trailing after run | layout tree builds=1PASS: generated after inline progression | rebuild before block with trailing after run | incremental tree matches full rebuild-PASS: generated after inline progression | rebuild before trailing after run | rebuild+PASS: generated after inline progression | rebuild before trailing after run | preservePASS: generated after inline progression | rebuild before trailing after run | layout tree builds=1PASS: generated after inline progression | rebuild before trailing after run | incremental tree matches full rebuild-PASS: generated after inline progression | rebuild beside trailing after run | rebuild+PASS: generated after inline progression | rebuild beside trailing after run | preservePASS: generated after inline progression | rebuild beside trailing after run | layout tree builds=1PASS: generated after inline progression | rebuild beside trailing after run | incremental tree matches full rebuild-PASS: generated before and after inline progression | rebuild beside before | rebuild+PASS: generated before and after inline progression | rebuild beside before | preservePASS: generated before and after inline progression | rebuild beside before | layout tree builds=1PASS: generated before and after inline progression | rebuild beside before | incremental tree matches full rebuild-PASS: generated before and after inline progression | rebuild before trailing after run | rebuild+PASS: generated before and after inline progression | rebuild before trailing after run | preservePASS: generated before and after inline progression | rebuild before trailing after run | layout tree builds=1PASS: generated before and after inline progression | rebuild before trailing after run | incremental tree matches full rebuild-PASS: generated before and after inline progression | rebuild beside before again | rebuild+PASS: generated before and after inline progression | rebuild beside before again | preservePASS: generated before and after inline progression | rebuild beside before again | layout tree builds=1PASS: generated before and after inline progression | rebuild beside before again | incremental tree matches full rebuildPASS: generated inline in all-inline flow | insert after before | preserve@@ -232,10 +232,10 @@ PASS: generated inline in all-inline flow | insert before after | incremental trPASS: generated inline in all-inline flow | insert beside DOM inline | preservePASS: generated inline in all-inline flow | insert beside DOM inline | layout tree builds=1PASS: generated inline in all-inline flow | insert beside DOM inline | incremental tree matches full rebuild-PASS: generated before inline-block | rebuild between before and block | rebuild+PASS: generated before inline-block | rebuild between before and block | preservePASS: generated before inline-block | rebuild between before and block | layout tree builds=1PASS: generated before inline-block | rebuild between before and block | incremental tree matches full rebuild-PASS: generated before display contents | rebuild between before and block | rebuild+PASS: generated before display contents | rebuild between before and block | preservePASS: generated before display contents | rebuild between before and block | layout tree builds=1PASS: generated before display contents | rebuild between before and block | incremental tree matches full rebuildPASS: generated before display contents | preserve after block | preserve@@ -250,10 +250,10 @@ PASS: generated before block progression | preserve after DOM block | incrementaPASS: generated after block progression | preserve before DOM block | preservePASS: generated after block progression | preserve before DOM block | layout tree builds=1PASS: generated after block progression | preserve before DOM block | incremental tree matches full rebuild-PASS: generated after block progression | rebuild before generated block | rebuild+PASS: generated after block progression | rebuild before generated block | preservePASS: generated after block progression | rebuild before generated block | layout tree builds=1PASS: generated after block progression | rebuild before generated block | incremental tree matches full rebuild-PASS: generated before absolute progression | rebuild after generated absolute | rebuild+PASS: generated before absolute progression | rebuild after generated absolute | preservePASS: generated before absolute progression | rebuild after generated absolute | layout tree builds=1PASS: generated before absolute progression | rebuild after generated absolute | incremental tree matches full rebuildPASS: generated before absolute progression | preserve after DOM block | preserve@@ -262,10 +262,10 @@ PASS: generated before absolute progression | preserve after DOM block | incremePASS: generated after absolute progression | preserve before DOM block | preservePASS: generated after absolute progression | preserve before DOM block | layout tree builds=1PASS: generated after absolute progression | preserve before DOM block | incremental tree matches full rebuild-PASS: generated after absolute progression | rebuild before generated absolute | rebuild+PASS: generated after absolute progression | rebuild before generated absolute | preservePASS: generated after absolute progression | rebuild before generated absolute | layout tree builds=1PASS: generated after absolute progression | rebuild before generated absolute | incremental tree matches full rebuild-PASS: generated before float progression | rebuild after generated float | rebuild+PASS: generated before float progression | rebuild after generated float | preservePASS: generated before float progression | rebuild after generated float | layout tree builds=1PASS: generated before float progression | rebuild after generated float | incremental tree matches full rebuildPASS: generated before float progression | preserve after DOM block | preserve@@ -274,7 +274,7 @@ PASS: generated before float progression | preserve after DOM block | incrementaPASS: generated after float progression | preserve before DOM block | preservePASS: generated after float progression | preserve before DOM block | layout tree builds=1PASS: generated after float progression | preserve before DOM block | incremental tree matches full rebuild-PASS: generated after float progression | rebuild before generated float | rebuild+PASS: generated after float progression | rebuild before generated float | preservePASS: generated after float progression | rebuild before generated float | layout tree builds=1PASS: generated after float progression | rebuild before generated float | incremental tree matches full rebuildPASS: list marker progression | prepend after marker | preserve@@ -298,22 +298,22 @@ PASS: generated before inline in grid | preserve after final item | incrementalPASS: generated after content in flex | preserve before item | preservePASS: generated after content in flex | preserve before item | layout tree builds=1PASS: generated after content in flex | preserve before item | incremental tree matches full rebuild-PASS: generated after content in flex | rebuild before trailing after item | rebuild+PASS: generated after content in flex | rebuild before trailing after item | preservePASS: generated after content in flex | rebuild before trailing after item | layout tree builds=1PASS: generated after content in flex | rebuild before trailing after item | incremental tree matches full rebuildPASS: generated after block in grid | preserve before DOM item | preservePASS: generated after block in grid | preserve before DOM item | layout tree builds=1PASS: generated after block in grid | preserve before DOM item | incremental tree matches full rebuild-PASS: generated after block in grid | rebuild before generated item | rebuild+PASS: generated after block in grid | rebuild before generated item | preservePASS: generated after block in grid | rebuild before generated item | layout tree builds=1PASS: generated after block in grid | rebuild before generated item | incremental tree matches full rebuild-PASS: generated before inline with hidden insertion | rebuild for whitespace beside before | rebuild+PASS: generated before inline with hidden insertion | rebuild for whitespace beside before | preservePASS: generated before inline with hidden insertion | rebuild for whitespace beside before | layout tree builds=1PASS: generated before inline with hidden insertion | rebuild for whitespace beside before | incremental tree matches full rebuild-PASS: generated before inline with batched positions | rebuild all positions for unsafe leading whitespace | rebuild+PASS: generated before inline with batched positions | rebuild all positions for unsafe leading whitespace | preservePASS: generated before inline with batched positions | rebuild all positions for unsafe leading whitespace | layout tree builds=1PASS: generated before inline with batched positions | rebuild all positions for unsafe leading whitespace | incremental tree matches full rebuild-PASS: mixed block and inline progression | rebuild before block after inline run | rebuild+PASS: mixed block and inline progression | rebuild before block after inline run | preservePASS: mixed block and inline progression | rebuild before block after inline run | layout tree builds=1PASS: mixed block and inline progression | rebuild before block after inline run | incremental tree matches full rebuildPASS: mixed block and inline progression | preserve after final block | preserve@@ -322,25 +322,25 @@ PASS: mixed block and inline progression | preserve after final block | incremenPASS: mixed block and inline progression | preserve in new trailing inline run | preservePASS: mixed block and inline progression | preserve in new trailing inline run | layout tree builds=1PASS: mixed block and inline progression | preserve in new trailing inline run | incremental tree matches full rebuild-PASS: mixed block and inline progression | rebuild beside non-trailing inline run | rebuild+PASS: mixed block and inline progression | rebuild beside non-trailing inline run | preservePASS: mixed block and inline progression | rebuild beside non-trailing inline run | layout tree builds=1PASS: mixed block and inline progression | rebuild beside non-trailing inline run | incremental tree matches full rebuild-PASS: rebuild before block after inline run | insert whitespace | rebuild+PASS: rebuild before block after inline run | insert whitespace | preservePASS: rebuild before block after inline run | insert whitespace | layout tree builds=1PASS: rebuild before block after inline run | insert whitespace | incremental tree matches full rebuild-PASS: rebuild beside non-trailing inline run | insert whitespace after preceding block | rebuild+PASS: rebuild beside non-trailing inline run | insert whitespace after preceding block | preservePASS: rebuild beside non-trailing inline run | insert whitespace after preceding block | layout tree builds=1PASS: rebuild beside non-trailing inline run | insert whitespace after preceding block | incremental tree matches full rebuild-PASS: flow-root mixed-content progression | rebuild before block after inline run | rebuild+PASS: flow-root mixed-content progression | rebuild before block after inline run | preservePASS: flow-root mixed-content progression | rebuild before block after inline run | layout tree builds=1PASS: flow-root mixed-content progression | rebuild before block after inline run | incremental tree matches full rebuildPASS: flow-root mixed-content progression | preserve after final block | preservePASS: flow-root mixed-content progression | preserve after final block | layout tree builds=1PASS: flow-root mixed-content progression | preserve after final block | incremental tree matches full rebuild-PASS: rebuild all positions when one needs an earlier inline run | insert safe and unsafe whitespace | rebuild+PASS: rebuild all positions when one needs an earlier inline run | insert safe and unsafe whitespace | preservePASS: rebuild all positions when one needs an earlier inline run | insert safe and unsafe whitespace | layout tree builds=1PASS: rebuild all positions when one needs an earlier inline run | insert safe and unsafe whitespace | incremental tree matches full rebuild-PASS: flex raw-text progression | rebuild after raw text before item | rebuild+PASS: flex raw-text progression | rebuild after raw text before item | preservePASS: flex raw-text progression | rebuild after raw text before item | layout tree builds=1PASS: flex raw-text progression | rebuild after raw text before item | incremental tree matches full rebuildPASS: flex raw-text progression | preserve after final item | preserve@@ -349,7 +349,7 @@ PASS: flex raw-text progression | preserve after final item | incremental tree mPASS: flex raw-text progression | preserve in trailing text item | preservePASS: flex raw-text progression | preserve in trailing text item | layout tree builds=1PASS: flex raw-text progression | preserve in trailing text item | incremental tree matches full rebuild-PASS: rebuild before non-trailing flex raw text | insert whitespace | rebuild+PASS: rebuild before non-trailing flex raw text | insert whitespace | preservePASS: rebuild before non-trailing flex raw text | insert whitespace | layout tree builds=1PASS: rebuild before non-trailing flex raw text | insert whitespace | incremental tree matches full rebuildPASS: join trailing flex raw text | insert before raw text | preserve@@ -358,13 +358,13 @@ PASS: join trailing flex raw text | insert before raw text | incremental tree maPASS: join trailing flex raw text | append after raw text | preservePASS: join trailing flex raw text | append after raw text | layout tree builds=1PASS: join trailing flex raw text | append after raw text | incremental tree matches full rebuild-PASS: join trailing flex raw text | rebuild before item with trailing text item | rebuild+PASS: join trailing flex raw text | rebuild before item with trailing text item | preservePASS: join trailing flex raw text | rebuild before item with trailing text item | layout tree builds=1PASS: join trailing flex raw text | rebuild before item with trailing text item | incremental tree matches full rebuild-PASS: grid raw-text progression | rebuild before raw text | rebuild+PASS: grid raw-text progression | rebuild before raw text | preservePASS: grid raw-text progression | rebuild before raw text | layout tree builds=1PASS: grid raw-text progression | rebuild before raw text | incremental tree matches full rebuild-PASS: grid raw-text progression | rebuild after raw text before item | rebuild+PASS: grid raw-text progression | rebuild after raw text before item | preservePASS: grid raw-text progression | rebuild after raw text before item | layout tree builds=1PASS: grid raw-text progression | rebuild after raw text before item | incremental tree matches full rebuildPASS: grid raw-text progression | preserve after final item | preserve@@ -376,7 +376,7 @@ PASS: join trailing grid raw text | insert before raw text | incremental tree maPASS: join trailing grid raw text | append after raw text | preservePASS: join trailing grid raw text | append after raw text | layout tree builds=1PASS: join trailing grid raw text | append after raw text | incremental tree matches full rebuild-PASS: join trailing grid raw text | rebuild before item with trailing text item | rebuild+PASS: join trailing grid raw text | rebuild before item with trailing text item | preservePASS: join trailing grid raw text | rebuild before item with trailing text item | layout tree builds=1PASS: join trailing grid raw text | rebuild before item with trailing text item | incremental tree matches full rebuildPASS: rebuild beside display-contents inline run | insert whitespace | rebuilddiff --git a/Tests/LibWeb/Text/input/layout-tree-update/direct-child-list-preservation.html b/Tests/LibWeb/Text/input/layout-tree-update/direct-child-list-preservation.htmlindex 0fe048ccc17..53fbe490dd7 100644--- a/Tests/LibWeb/Text/input/layout-tree-update/direct-child-list-preservation.html+++ b/Tests/LibWeb/Text/input/layout-tree-update/direct-child-list-preservation.html@@ -45,11 +45,10 @@tracked: ["parent", "before"],},{- name: "fall back when block insertion splits generated inline wrapper",+ name: "rebuild child list when block insertion splits generated inline wrapper",markup: '<div class="parent inline-generated"></div>',mutate: parent => parent.insertAdjacentHTML("beforeend", '<section class="target child"></section>'),tracked: ["parent"],- preserve: false,},{name: "prepend block child in block flow",@@ -223,18 +222,16 @@tracked: ["parent", "before"],},{- name: "fall back for inline child among block children",+ name: "rebuild child list for inline child among block children",markup: '<div class="parent"><i class="before child"></i><i class="after child"></i></div>',mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline"><b></b></span>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before", "after"],},{- name: "fall back for block child among inline children",+ name: "rebuild child list for block child among inline children",markup: '<div class="parent"><i class="before inline-block"></i><i class="after inline-block"></i></div>',mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<section class="target child"><b></b></section>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before", "after"],},{name: "append block child after anonymous inline run",@@ -303,11 +300,10 @@tracked: ["parent", "before", "inline"],},{- name: "fall back for absolute block child after whitespace before existing child",+ name: "rebuild child list for absolute block child after whitespace before existing child",markup: '<div class="parent"><i class="before child"></i><i class="after child"></i></div>',mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '\n<section class="target child absolute"><b></b></section>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before", "after"],},{name: "append ordered list subtree",@@ -348,11 +344,10 @@tracked: ["parent", "before"],},{- name: "fall back when appended counter subtree is followed by generated content",+ name: "rebuild child list when appended counter subtree is followed by generated content",markup: '<div class="parent generated"><i class="before child"></i></div>',mutate: parent => parent.insertAdjacentHTML("beforeend", '<ol class="target"><li>one</li></ol>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before"],},{name: "fall back when appending a list-item increment after a reversed list",@@ -387,25 +382,99 @@tracked: ["parent", "before"],},{- name: "fall back for text before existing block child",+ name: "rebuild child list for text before existing block child",markup: '<div class="parent"><i class="before child"></i><i class="after child"></i></div>',mutate: parent => parent.querySelector(".after").before("text"),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before", "after"],},{- name: "fall back for text before appended block child",+ name: "rebuild child list for text before appended block child",markup: '<div class="parent"><i class="before child"></i></div>',mutate: parent => parent.insertAdjacentHTML("beforeend", 'text<section class="target child"></section>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before"],},{- name: "fall back for block child before anonymous inline run",+ name: "rebuild child list for block child before anonymous inline run",markup: '<div class="parent"><i class="before child"></i><span class="inline">inline</span></div>',mutate: parent => parent.querySelector(".inline").insertAdjacentHTML("beforebegin", '<section class="target child"><b></b></section>'),- tracked: ["parent"],- preserve: false,+ tracked: ["parent", "before", "inline"],+ },+ {+ name: "rebuild child list around a table child",+ markup: '<div class="parent"><i class="before child"></i><table class="after"><tbody><tr><td>cell</td></tr></tbody></table></div>',+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list around an absolute inline table child",+ markup: '<div class="parent"><span class="before inline">inline</span><table class="after absolute" style="display: inline-table"><tbody><tr><td>cell</td></tr></tbody></table></div>',+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<section class="target child"></section>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list around an svg child",+ markup: '<div class="parent"><svg class="before" width="10" height="10"><rect width="10" height="10"></rect></svg><i class="after child"></i></div>',+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list around inline generated content",+ markup: '<div class="parent inline-generated"><i class="before child"></i><i class="after child"></i></div>',+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list of a list item",+ markup: '<ul><li class="parent"><i class="before child"></i><i class="after child"></i></li></ul>',+ parentSelector: ".parent",+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list of an inside list item",+ markup: '<ul><li class="parent" style="list-style-position: inside"><i class="before child"></i><i class="after child"></i></li></ul>',+ parentSelector: ".parent",+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list for absolute child after whitespace in flex",+ markup: '<div class="parent flex"><i class="before child"></i><i class="after child"></i></div>',+ mutate: parent => parent.querySelector(".after").insertAdjacentHTML("beforebegin", '\n<section class="target absolute"></section>'),+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild child list around a float in an inline run",+ markup: '<div class="parent"><i class="before child"></i><span class="inline">inline</span><i class="float">float</i><span>more</span></div>',+ mutate: parent => parent.querySelector(".before").insertAdjacentHTML("beforebegin", '<section class="target child"></section>'),+ tracked: ["parent", "before", "inline"],+ },+ {+ name: "rebuild child list while a kept child gains children",+ markup: '<div class="parent"><div class="before child"><i class="child"></i></div><i class="after child"></i></div>',+ mutate(parent) {+ parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>');+ parent.querySelector(".before").insertAdjacentHTML("beforeend", '<section class="target child"></section>');+ },+ tracked: ["parent", "before", "after"],+ },+ {+ name: "rebuild nested child lists",+ markup: '<div class="parent"><div class="before child"><i class="child"></i><i class="child inner"></i></div><i class="after child"></i></div>',+ mutate(parent) {+ parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>');+ parent.querySelector(".inner").insertAdjacentHTML("beforebegin", '<span class="target inline">inner inline</span>');+ },+ tracked: ["parent", "before", "after", "inner"],+ },+ {+ name: "rebuild child list while a kept child is restyled",+ markup: '<div class="parent"><i class="before child"></i><i class="after child"></i></div>',+ mutate(parent) {+ parent.querySelector(".after").insertAdjacentHTML("beforebegin", '<span class="target inline">inline</span>');+ parent.querySelector(".before").style.display = "flex";+ },+ tracked: ["parent", "after"],},{name: "append floated block child after anonymous inline run",diff --git a/Tests/LibWeb/Text/input/layout-tree-update/whitespace-child-insertion-preservation.html b/Tests/LibWeb/Text/input/layout-tree-update/whitespace-child-insertion-preservation.htmlindex cd3e4f07f43..ada8d9b1ee9 100644--- a/Tests/LibWeb/Text/input/layout-tree-update/whitespace-child-insertion-preservation.html+++ b/Tests/LibWeb/Text/input/layout-tree-update/whitespace-child-insertion-preservation.html@@ -69,7 +69,7 @@{ name: "prepend whitespace", mutate: parent => parent.prepend(" ") },{ name: "insert whitespace between blocks", mutate: parent => parent.insertBefore(document.createTextNode(" "), parent.querySelector(".after")) },{ name: "append whitespace", mutate: parent => parent.append(" ") },- { name: "rebuild before blocks with trailing run", mutate: parent => parent.prepend("\n"), preserve: false },+ { name: "rebuild before blocks with trailing run", mutate: parent => parent.prepend("\n") },],},{@@ -79,7 +79,7 @@{ name: "prepend whitespace", mutate: parent => parent.prepend(" ") },{ name: "insert whitespace between items", mutate: parent => parent.insertBefore(document.createTextNode(" "), parent.querySelector(".after")) },{ name: "append whitespace", mutate: parent => parent.append(" ") },- { name: "rebuild before items with trailing text item", mutate: parent => parent.prepend("\n"), preserve: false },+ { name: "rebuild before items with trailing text item", mutate: parent => parent.prepend("\n") },],},{@@ -89,7 +89,7 @@{ name: "prepend whitespace", mutate: parent => parent.prepend(" ") },{ name: "insert whitespace between items", mutate: parent => parent.insertBefore(document.createTextNode(" "), parent.querySelector(".after")) },{ name: "append whitespace", mutate: parent => parent.append(" ") },- { name: "rebuild between items with trailing text item", mutate: parent => parent.querySelector(".after").before("\n"), preserve: false },+ { name: "rebuild between items with trailing text item", mutate: parent => parent.querySelector(".after").before("\n") },],},{@@ -169,12 +169,10 @@{name: "rebuild for adjacent spaces",mutate: parent => parent.querySelector(".after").before(" ", "\n", "\t"),- preserve: false,},{name: "rebuild when extending the anonymous run",mutate: parent => parent.querySelector(".after").before("\r\n", " "),- preserve: false,},],},@@ -185,12 +183,10 @@{name: "rebuild for adjacent spaces",mutate: parent => parent.querySelector(".after").before(" ", "\n", "\t"),- preserve: false,},{name: "rebuild when extending the anonymous item",mutate: parent => parent.querySelector(".after").before("\r\n", " "),- preserve: false,},],},@@ -201,12 +197,10 @@{name: "rebuild for adjacent spaces",mutate: parent => parent.querySelector(".after").before(" ", "\n", "\t"),- preserve: false,},{name: "rebuild when extending the anonymous item",mutate: parent => parent.querySelector(".after").before("\r\n", " "),- preserve: false,},],},@@ -223,7 +217,6 @@secondHidden.className = "hidden";parent.querySelector(".after").before(" ", firstHidden, "\n", secondHidden, "\t");},- preserve: false,},],},@@ -265,8 +258,8 @@markup: '<div class="parent"><div class="tracked"></div><div class="after"></div></div>',steps: [{ name: "create trailing run", mutate: parent => parent.append(" ") },- { name: "rebuild for earlier new run", mutate: parent => parent.querySelector(".after").before(" "), preserve: false },- { name: "rebuild beside non-trailing middle run", mutate: parent => parent.querySelector(".after").before("\n"), preserve: false },+ { name: "rebuild for earlier new run", mutate: parent => parent.querySelector(".after").before(" ") },+ { name: "rebuild beside non-trailing middle run", mutate: parent => parent.querySelector(".after").before("\n") },],},{@@ -274,8 +267,8 @@markup: '<div class="parent flex"><div class="tracked"></div><div class="after"></div></div>',steps: [{ name: "create trailing text item", mutate: parent => parent.append(" ") },- { name: "rebuild for earlier text item", mutate: parent => parent.querySelector(".after").before(" "), preserve: false },- { name: "rebuild beside non-trailing middle item", mutate: parent => parent.querySelector(".after").before("\n"), preserve: false },+ { name: "rebuild for earlier text item", mutate: parent => parent.querySelector(".after").before(" ") },+ { name: "rebuild beside non-trailing middle item", mutate: parent => parent.querySelector(".after").before("\n") },],},{@@ -283,16 +276,16 @@markup: '<div class="parent grid"><div class="tracked"></div><div class="after"></div></div>',steps: [{ name: "create trailing text item", mutate: parent => parent.append(" ") },- { name: "rebuild for earlier text item", mutate: parent => parent.querySelector(".after").before(" "), preserve: false },- { name: "rebuild beside non-trailing middle item", mutate: parent => parent.querySelector(".after").before("\n"), preserve: false },+ { name: "rebuild for earlier text item", mutate: parent => parent.querySelector(".after").before(" ") },+ { name: "rebuild beside non-trailing middle item", mutate: parent => parent.querySelector(".after").before("\n") },],},{name: "absolute before block progression",markup: '<div class="parent"><div class="absolute"></div><div class="tracked"></div></div>',steps: [- { name: "insert before absolute", mutate: parent => parent.prepend(" "), preserve: false },- { name: "insert between absolute and block", mutate: parent => parent.querySelector(".tracked").before(" "), preserve: false },+ { name: "insert before absolute", mutate: parent => parent.prepend(" ") },+ { name: "insert between absolute and block", mutate: parent => parent.querySelector(".tracked").before(" ") },{ name: "preserve after block", mutate: parent => parent.append(" ") },],},@@ -301,16 +294,16 @@markup: '<div class="parent"><div class="tracked"></div><div class="absolute"></div></div>',steps: [{ name: "insert after absolute", mutate: parent => parent.append(" ") },- { name: "insert before absolute", mutate: parent => parent.querySelector(".absolute").before(" "), preserve: false },- { name: "insert before block", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "insert before absolute", mutate: parent => parent.querySelector(".absolute").before(" ") },+ { name: "insert before block", mutate: parent => parent.prepend(" ") },],},{name: "float before block progression",markup: '<div class="parent"><div class="float"></div><div class="tracked"></div></div>',steps: [- { name: "insert before float", mutate: parent => parent.prepend(" "), preserve: false },- { name: "insert between float and block", mutate: parent => parent.querySelector(".tracked").before(" "), preserve: false },+ { name: "insert before float", mutate: parent => parent.prepend(" ") },+ { name: "insert between float and block", mutate: parent => parent.querySelector(".tracked").before(" ") },{ name: "preserve after block", mutate: parent => parent.append(" ") },],},@@ -319,15 +312,15 @@markup: '<div class="parent"><div class="tracked"></div><div class="float"></div></div>',steps: [{ name: "insert after float", mutate: parent => parent.append(" ") },- { name: "insert before float", mutate: parent => parent.querySelector(".float").before(" "), preserve: false },- { name: "insert before block", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "insert before float", mutate: parent => parent.querySelector(".float").before(" ") },+ { name: "insert before block", mutate: parent => parent.prepend(" ") },],},{name: "absolute before flex item progression",markup: '<div class="parent flex"><div class="absolute"></div><div class="tracked"></div></div>',steps: [- { name: "rebuild before absolute", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild before absolute", mutate: parent => parent.prepend(" ") },{ name: "preserve after absolute", mutate: parent => parent.querySelector(".tracked").before(" ") },{ name: "preserve after final item", mutate: parent => parent.append(" ") },],@@ -337,36 +330,36 @@markup: '<div class="parent flex"><div class="tracked"></div><div class="absolute"></div></div>',steps: [{ name: "insert after absolute", mutate: parent => parent.append(" ") },- { name: "rebuild before absolute", mutate: parent => parent.querySelector(".absolute").before(" "), preserve: false },- { name: "rebuild before item", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild before absolute", mutate: parent => parent.querySelector(".absolute").before(" ") },+ { name: "rebuild before item", mutate: parent => parent.prepend(" ") },],},{name: "generated before inline progression",markup: '<div class="parent before-inline"><div class="tracked"></div></div>',steps: [- { name: "rebuild between before and block", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild between before and block", mutate: parent => parent.prepend(" ") },{ name: "preserve after block", mutate: parent => parent.append(" ") },{ name: "preserve in trailing inline run", mutate: parent => parent.append("\n") },- { name: "rebuild beside before again", mutate: parent => parent.prepend("\t"), preserve: false },+ { name: "rebuild beside before again", mutate: parent => parent.prepend("\t") },],},{name: "generated after inline progression",markup: '<div class="parent after-inline"><div class="tracked"></div></div>',steps: [- { name: "rebuild before block with trailing after run", mutate: parent => parent.prepend(" "), preserve: false },- { name: "rebuild before trailing after run", mutate: parent => parent.append(" "), preserve: false },- { name: "rebuild beside trailing after run", mutate: parent => parent.append("\n"), preserve: false },+ { name: "rebuild before block with trailing after run", mutate: parent => parent.prepend(" ") },+ { name: "rebuild before trailing after run", mutate: parent => parent.append(" ") },+ { name: "rebuild beside trailing after run", mutate: parent => parent.append("\n") },],},{name: "generated before and after inline progression",markup: '<div class="parent before-and-after-inline"><div class="tracked"></div></div>',steps: [- { name: "rebuild beside before", mutate: parent => parent.prepend(" "), preserve: false },- { name: "rebuild before trailing after run", mutate: parent => parent.append(" "), preserve: false },- { name: "rebuild beside before again", mutate: parent => parent.prepend("\n"), preserve: false },+ { name: "rebuild beside before", mutate: parent => parent.prepend(" ") },+ { name: "rebuild before trailing after run", mutate: parent => parent.append(" ") },+ { name: "rebuild beside before again", mutate: parent => parent.prepend("\n") },],},{@@ -382,14 +375,14 @@name: "generated before inline-block",markup: '<div class="parent before-inline-block"><div class="tracked"></div></div>',steps: [- { name: "rebuild between before and block", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild between before and block", mutate: parent => parent.prepend(" ") },],},{name: "generated before display contents",markup: '<div class="parent before-contents"><div class="tracked"></div></div>',steps: [- { name: "rebuild between before and block", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild between before and block", mutate: parent => parent.prepend(" ") },{ name: "preserve after block", mutate: parent => parent.append(" ") },],},@@ -406,14 +399,14 @@markup: '<div class="parent after-block"><div class="tracked"></div></div>',steps: [{ name: "preserve before DOM block", mutate: parent => parent.prepend(" ") },- { name: "rebuild before generated block", mutate: parent => parent.append(" "), preserve: false },+ { name: "rebuild before generated block", mutate: parent => parent.append(" ") },],},{name: "generated before absolute progression",markup: '<div class="parent before-absolute"><div class="tracked"></div></div>',steps: [- { name: "rebuild after generated absolute", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild after generated absolute", mutate: parent => parent.prepend(" ") },{ name: "preserve after DOM block", mutate: parent => parent.append(" ") },],},@@ -422,14 +415,14 @@markup: '<div class="parent after-absolute"><div class="tracked"></div></div>',steps: [{ name: "preserve before DOM block", mutate: parent => parent.prepend(" ") },- { name: "rebuild before generated absolute", mutate: parent => parent.append(" "), preserve: false },+ { name: "rebuild before generated absolute", mutate: parent => parent.append(" ") },],},{name: "generated before float progression",markup: '<div class="parent before-float"><div class="tracked"></div></div>',steps: [- { name: "rebuild after generated float", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild after generated float", mutate: parent => parent.prepend(" ") },{ name: "preserve after DOM block", mutate: parent => parent.append(" ") },],},@@ -438,7 +431,7 @@markup: '<div class="parent after-float"><div class="tracked"></div></div>',steps: [{ name: "preserve before DOM block", mutate: parent => parent.prepend(" ") },- { name: "rebuild before generated float", mutate: parent => parent.append(" "), preserve: false },+ { name: "rebuild before generated float", mutate: parent => parent.append(" ") },],},{@@ -470,7 +463,7 @@markup: '<div class="parent flex after-inline"><div class="tracked"></div></div>',steps: [{ name: "preserve before item", mutate: parent => parent.prepend(" ") },- { name: "rebuild before trailing after item", mutate: parent => parent.append(" "), preserve: false },+ { name: "rebuild before trailing after item", mutate: parent => parent.append(" ") },],},{@@ -478,7 +471,7 @@markup: '<div class="parent grid after-block"><div class="tracked"></div></div>',steps: [{ name: "preserve before DOM item", mutate: parent => parent.prepend(" ") },- { name: "rebuild before generated item", mutate: parent => parent.append(" "), preserve: false },+ { name: "rebuild before generated item", mutate: parent => parent.append(" ") },],},{@@ -492,7 +485,6 @@hidden.className = "hidden";parent.prepend(hidden, " ");},- preserve: false,},],},@@ -506,7 +498,6 @@parent.prepend(" ");parent.append(" ");},- preserve: false,},],},@@ -514,31 +505,31 @@name: "mixed block and inline progression",markup: '<div class="parent"><div class="tracked"></div><span class="inline">inline</span><div class="after"></div></div>',steps: [- { name: "rebuild before block after inline run", mutate: parent => parent.querySelector(".after").before(" "), preserve: false },+ { name: "rebuild before block after inline run", mutate: parent => parent.querySelector(".after").before(" ") },{ name: "preserve after final block", mutate: parent => parent.append(" ") },{ name: "preserve in new trailing inline run", mutate: parent => parent.append("\n") },- { name: "rebuild beside non-trailing inline run", mutate: parent => parent.querySelector(".inline").before(" "), preserve: false },+ { name: "rebuild beside non-trailing inline run", mutate: parent => parent.querySelector(".inline").before(" ") },],},{name: "rebuild before block after inline run",markup: '<div class="parent"><span>inline</span><div class="tracked"></div></div>',steps: [- { name: "insert whitespace", mutate: parent => parent.querySelector(".tracked").before(" "), preserve: false },+ { name: "insert whitespace", mutate: parent => parent.querySelector(".tracked").before(" ") },],},{name: "rebuild beside non-trailing inline run",markup: '<div class="parent"><div class="tracked"></div><span class="inline">inline</span><div class="after"></div></div>',steps: [- { name: "insert whitespace after preceding block", mutate: parent => parent.querySelector(".inline").before(" "), preserve: false },+ { name: "insert whitespace after preceding block", mutate: parent => parent.querySelector(".inline").before(" ") },],},{name: "flow-root mixed-content progression",markup: '<div class="parent flow-root"><div class="tracked"></div><span class="inline">inline</span><div class="after"></div></div>',steps: [- { name: "rebuild before block after inline run", mutate: parent => parent.querySelector(".after").before(" "), preserve: false },+ { name: "rebuild before block after inline run", mutate: parent => parent.querySelector(".after").before(" ") },{ name: "preserve after final block", mutate: parent => parent.append(" ") },],},@@ -552,7 +543,6 @@parent.querySelector(".tracked").before(" ");parent.append(" ");},- preserve: false,},],},@@ -560,7 +550,7 @@name: "flex raw-text progression",markup: '<div class="parent flex">raw<div class="tracked"></div></div>',steps: [- { name: "rebuild after raw text before item", mutate: parent => parent.querySelector(".tracked").before(" "), preserve: false },+ { name: "rebuild after raw text before item", mutate: parent => parent.querySelector(".tracked").before(" ") },{ name: "preserve after final item", mutate: parent => parent.append(" ") },{ name: "preserve in trailing text item", mutate: parent => parent.append("\t") },],@@ -569,7 +559,7 @@name: "rebuild before non-trailing flex raw text",markup: '<div class="parent flex"><div class="tracked"></div>raw<div class="after"></div></div>',steps: [- { name: "insert whitespace", mutate: parent => parent.firstChild.after(" "), preserve: false },+ { name: "insert whitespace", mutate: parent => parent.firstChild.after(" ") },],},{@@ -578,15 +568,15 @@steps: [{ name: "insert before raw text", mutate: parent => parent.lastChild.before(" ") },{ name: "append after raw text", mutate: parent => parent.append(" ") },- { name: "rebuild before item with trailing text item", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild before item with trailing text item", mutate: parent => parent.prepend(" ") },],},{name: "grid raw-text progression",markup: '<div class="parent grid">raw<div class="tracked"></div></div>',steps: [- { name: "rebuild before raw text", mutate: parent => parent.prepend(" "), preserve: false },- { name: "rebuild after raw text before item", mutate: parent => parent.querySelector(".tracked").before(" "), preserve: false },+ { name: "rebuild before raw text", mutate: parent => parent.prepend(" ") },+ { name: "rebuild after raw text before item", mutate: parent => parent.querySelector(".tracked").before(" ") },{ name: "preserve after final item", mutate: parent => parent.append(" ") },],},@@ -596,7 +586,7 @@steps: [{ name: "insert before raw text", mutate: parent => parent.lastChild.before(" ") },{ name: "append after raw text", mutate: parent => parent.append(" ") },- { name: "rebuild before item with trailing text item", mutate: parent => parent.prepend(" "), preserve: false },+ { name: "rebuild before item with trailing text item", mutate: parent => parent.prepend(" ") },],},{