Truly independent web browser
LibWeb: Apply white-space processing across text nodes for innerText
Andreas Kling21c1cdcec007
diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cppindex 90b46badfaf..d76f9b96af4 100644--- a/Libraries/LibWeb/DOM/Node.cpp+++ b/Libraries/LibWeb/DOM/Node.cpp@@ -4782,7 +4782,7 @@ ErrorOr<Utf16String> Node::name_or_description(Layout::BegunRead const& read, Na// aria-labelledby or aria-describedby and/or un-hidden. See the comment for substep A above.if (is_text() && (!parent_element() || (parent_element()->is_referenced() || !parent_element()->is_hidden(read) || !parent_element()->has_hidden_ancestor(read) || parent_element()->has_referenced_and_hidden_ancestor(read)))) {if (auto const* text_node = as_if<Layout::TextNode>(layout_node(read))) {- auto text = text_node->rendered_text_for_dom(false);+ auto text = text_node->rendered_text_for_dom();if (!text.is_empty())return text;}diff --git a/Libraries/LibWeb/HTML/HTMLElement.cpp b/Libraries/LibWeb/HTML/HTMLElement.cppindex 0b686305a7d..203ace5518a 100644--- a/Libraries/LibWeb/HTML/HTMLElement.cpp+++ b/Libraries/LibWeb/HTML/HTMLElement.cpp@@ -378,12 +378,217 @@ struct RequiredLineBreakCount {int count { 0 };};+// NB: The text of a CSS text box produced by a Text node, before the CSS 'white-space' processing rules have been+// applied to it. These rules collapse whitespace across the boundaries of inline boxes, so they are applied once+// the text of a whole inline formatting context has been collected.+struct UnprocessedText {+ Utf16String text;+ CSS::WhiteSpaceCollapse white_space_collapse;+};++// NB: These mark the start and the end of the items of a box that establishes an independent formatting context+// without being block-level, such as an inline-block. The text of such a box has the CSS 'white-space'+// processing rules applied as its own block, and to the text around it, the box is content that whitespace does+// not collapse across.+struct AtomicInlineStart { };+struct AtomicInlineEnd { };++using RenderedTextItem = Variant<Utf16String, RequiredLineBreakCount, UnprocessedText, AtomicInlineStart, AtomicInlineEnd>;++enum class StartsAndEndsLine : u8 {+ No,+ Yes,+};++// https://drafts.csswg.org/css-text/#white-space-processing+// NB: This applies the rules to the unprocessed text in items, as modified by the rendered text collection steps:+// collapsible spaces at the end of lines are always collapsed, but they are only removed if the line is the last+// line of the block, or it ends with a br element. Only forced line breaks and the start and end of blocks end+// lines here, so collapsible spaces at soft wrap opportunities are never removed.+static void apply_white_space_processing_rules(Vector<RenderedTextItem>& items, StartsAndEndsLine starts_and_ends_line)+{+ enum class Kind : u8 {+ Other,+ CollapsibleSpace,+ CollapsibleSegmentBreak,+ PreservedSegmentBreak,+ Removed,+ };++ struct Character {+ size_t item_index { 0 };+ char16_t code_unit { 0 };+ Kind kind { Kind::Other };+ };++ // NB: An entry of the inline formatting context that is not a character of unprocessed text.+ enum class Boundary : u8 {+ LineBreak,+ AtomicInline,+ };++ Vector<Variant<Character, Boundary>> entries;+ if (starts_and_ends_line == StartsAndEndsLine::Yes)+ entries.append(Boundary::LineBreak);++ for (size_t index = 0; index < items.size(); ++index) {+ auto const& item = items[index];+ if (auto const* run = item.get_pointer<UnprocessedText>()) {+ auto mode = run->white_space_collapse;+ auto spaces_are_collapsible = first_is_one_of(mode, CSS::WhiteSpaceCollapse::Collapse, CSS::WhiteSpaceCollapse::Discard, CSS::WhiteSpaceCollapse::PreserveBreaks);+ auto segment_breaks_are_collapsible = first_is_one_of(mode, CSS::WhiteSpaceCollapse::Collapse, CSS::WhiteSpaceCollapse::Discard);+ auto text = run->text.utf16_view();+ for (size_t offset = 0; offset < text.length_in_code_units(); ++offset) {+ auto code_unit = text.code_unit_at(offset);+ Character character { index, code_unit, Kind::Other };+ // NB: Carriage returns are treated identically to spaces in all respects.+ if (code_unit == ' ' || code_unit == '\t' || code_unit == '\r') {+ if (mode == CSS::WhiteSpaceCollapse::Discard)+ character.kind = Kind::Removed;+ else if (spaces_are_collapsible)+ character.kind = Kind::CollapsibleSpace;+ } else if (code_unit == '\n') {+ if (mode == CSS::WhiteSpaceCollapse::Discard)+ character.kind = Kind::Removed;+ else if (segment_breaks_are_collapsible)+ character.kind = Kind::CollapsibleSegmentBreak;+ else if (mode == CSS::WhiteSpaceCollapse::PreserveSpaces)+ character.code_unit = ' ';+ else+ character.kind = Kind::PreservedSegmentBreak;+ }++ if (character.kind == Kind::PreservedSegmentBreak) {+ entries.append(Boundary::LineBreak);+ entries.append(character);+ entries.append(Boundary::LineBreak);+ } else {+ entries.append(character);+ }+ }+ } else if (auto const* string = item.get_pointer<Utf16String>()) {+ if (*string == u"\n"sv)+ entries.append(Boundary::LineBreak);+ } else if (item.has<RequiredLineBreakCount>()) {+ entries.append(Boundary::LineBreak);+ } else if (item.has<AtomicInlineStart>()) {+ // NB: The items of the box have already been processed, so skip over them.+ size_t depth = 1;+ while (depth > 0 && ++index < items.size()) {+ if (items[index].has<AtomicInlineStart>())+ ++depth;+ else if (items[index].has<AtomicInlineEnd>())+ --depth;+ }+ entries.append(Boundary::AtomicInline);+ }+ }++ if (starts_and_ends_line == StartsAndEndsLine::Yes)+ entries.append(Boundary::LineBreak);++ // Phase I: Collapsing and Transformation+ // 1. Any sequence of collapsible spaces and tabs immediately preceding or following a segment break is removed.+ for (size_t index = 0; index < entries.size(); ++index) {+ auto const* segment_break = entries[index].get_pointer<Character>();+ if (!segment_break || !first_is_one_of(segment_break->kind, Kind::CollapsibleSegmentBreak, Kind::PreservedSegmentBreak))+ continue;+ // NB: Returns whether the walk away from the segment break continues past the entry at other_index.+ auto remove_collapsible_space = [&](size_t other_index) {+ auto& entry = entries[other_index];+ if (auto const* boundary = entry.get_pointer<Boundary>())+ return *boundary == Boundary::LineBreak;+ auto& character = entry.get<Character>();+ if (character.kind == Kind::CollapsibleSpace)+ character.kind = Kind::Removed;+ return character.kind == Kind::Removed;+ };+ for (size_t other_index = index; other_index > 0 && remove_collapsible_space(other_index - 1); --other_index) { }+ for (size_t other_index = index + 1; other_index < entries.size() && remove_collapsible_space(other_index); ++other_index) { }+ }++ // 2. Collapsible segment breaks are transformed for rendering according to the segment break transformation+ // rules.+ // 3. Every collapsible tab is converted to a collapsible space (U+0020).+ // NB: Any collapsible segment break that is not removed is converted to a space. A collapsible segment break that+ // follows another one becomes a space that the next step collapses.+ for (auto& entry : entries) {+ if (auto* character = entry.get_pointer<Character>()) {+ if (character->kind == Kind::CollapsibleSegmentBreak)+ character->kind = Kind::CollapsibleSpace;+ if (character->kind == Kind::CollapsibleSpace)+ character->code_unit = ' ';+ }+ }++ // 4. Any collapsible space immediately following another collapsible space, even one outside the boundary of the+ // inline containing that space, provided both spaces are within the same inline formatting context, is+ // collapsed to have zero advance width.+ bool previous_is_collapsible_space = false;+ for (auto& entry : entries) {+ if (auto* character = entry.get_pointer<Character>()) {+ if (character->kind == Kind::Removed)+ continue;+ if (character->kind == Kind::CollapsibleSpace) {+ if (previous_is_collapsible_space)+ character->kind = Kind::Removed;+ previous_is_collapsible_space = true;+ continue;+ }+ }+ previous_is_collapsible_space = false;+ }++ // Phase II: Trimming and Positioning+ // 1. A sequence of collapsible spaces at the beginning of a line is removed.+ // 3. A sequence of collapsible spaces at the end of a line is removed.+ auto remove_collapsible_spaces_at_line_edge = [&](Vector<size_t> const& indices) {+ bool at_line_edge = false;+ for (auto index : indices) {+ auto& entry = entries[index];+ if (auto* boundary = entry.get_pointer<Boundary>()) {+ at_line_edge = *boundary == Boundary::LineBreak;+ continue;+ }+ auto& character = entry.get<Character>();+ if (character.kind == Kind::Removed)+ continue;+ if (character.kind == Kind::CollapsibleSpace && at_line_edge) {+ character.kind = Kind::Removed;+ continue;+ }+ at_line_edge = false;+ }+ };+ Vector<size_t> indices;+ indices.ensure_capacity(entries.size());+ for (size_t index = 0; index < entries.size(); ++index)+ indices.append(index);+ remove_collapsible_spaces_at_line_edge(indices);+ indices.reverse();+ remove_collapsible_spaces_at_line_edge(indices);++ // NB: Replace the unprocessed text with the characters that remain.+ Vector<Vector<char16_t>> remaining_code_units;+ remaining_code_units.resize(items.size());+ for (auto const& entry : entries) {+ if (auto const* character = entry.get_pointer<Character>(); character && character->kind != Kind::Removed)+ remaining_code_units[character->item_index].append(character->code_unit);+ }+ for (size_t index = 0; index < items.size(); ++index) {+ if (items[index].has<UnprocessedText>()) {+ auto const& code_units = remaining_code_units[index];+ items[index] = code_units.is_empty() ? Utf16String {} : Utf16String::from_utf16(Utf16View { code_units.data(), code_units.size() });+ }+ }+}+// https://html.spec.whatwg.org/multipage/dom.html#rendered-text-collection-steps-static Vector<Variant<Utf16String, RequiredLineBreakCount>> rendered_text_collection_steps(Layout::BegunRead const& read, DOM::Node const& node)+static Vector<RenderedTextItem> rendered_text_collection_steps(Layout::BegunRead const& read, DOM::Node const& node){// 1. Let items be the result of running the rendered text collection steps with each child node of node in tree// order, and then concatenating the results to a single list.- Vector<Variant<Utf16String, RequiredLineBreakCount>> items;+ Vector<RenderedTextItem> items;node.for_each_child([&](auto const& child) {auto child_items = rendered_text_collection_steps(read, child);items.extend(move(child_items));@@ -417,14 +622,16 @@ static Vector<Variant<Utf16String, RequiredLineBreakCount>> rendered_text_collec// 4. If node is a Text node, then for each CSS text box produced by node, in content order, compute the text of the// box after application of the CSS 'white-space' processing rules and 'text-transform' rules, set items to the- // list of the resulting strings, and return items.-- // FIXME: The CSS 'white-space' processing rules are slightly modified: collapsible spaces at the end of lines are- // always collapsed, but they are only removed if the line is the last line of the block, or it ends with a br- // element. Soft hyphens should be preserved. [CSSTEXT]-+ // list of the resulting strings, and return items. The CSS 'white-space' processing rules are slightly modified:+ // collapsible spaces at the end of lines are always collapsed, but they are only removed if the line is the last+ // line of the block, or it ends with a br element. Soft hyphens should be preserved. [CSSTEXT]+ // NB: The 'white-space' processing rules are applied by apply_white_space_processing_rules() once the text of the+ // whole inline formatting context has been collected.if (auto const* layout_text_node = as_if<Layout::TextNode>(layout_node)) {- items.append(layout_text_node->rendered_text_for_dom(true));+ items.append(UnprocessedText {+ layout_text_node->rendered_text_for_dom(),+ style_node.style_group<CSS::ComputedValues::InheritedTextValues>().white_space_collapse_value(),+ });return items;}@@ -436,6 +643,14 @@ static Vector<Variant<Utf16String, RequiredLineBreakCount>> rendered_text_collecauto display = style_node.display();+ // NB: A box that establishes an independent formatting context without being block-level has its text processed+ // as its own block. To the text around it, the box is content that whitespace does not collapse across.+ if (layout_node->is_atomic_inline() || display.is_table_cell()) {+ apply_white_space_processing_rules(items, StartsAndEndsLine::Yes);+ items.prepend(AtomicInlineStart {});+ items.append(AtomicInlineEnd {});+ }+// 6. If node's computed value of 'display' is 'table-cell', and node's CSS box is not the last 'table-cell' box of its enclosing 'table-row' box, then append a string containing a single U+0009 TAB code point to items.if (display.is_table_cell() && node.next_sibling())items.append("\t"_utf16);@@ -470,7 +685,7 @@ Utf16String HTMLElement::get_the_text_steps()return descendant_text_content();// 2. Let results be a new empty list.- Vector<Variant<Utf16String, RequiredLineBreakCount>> results;+ Vector<RenderedTextItem> results;// 3. For each child node node of element:for_each_child([&](Node const& node) {@@ -483,11 +698,19 @@ Utf16String HTMLElement::get_the_text_steps()return IterationDecision::Continue;});+ // NB: Apply the CSS 'white-space' processing rules to the text that remains unprocessed. The start and the end of+ // the element only start and end lines if the element is not inline-level.+ auto const* layout_node = this->layout_node(read);+ auto element_is_inline = layout_node && layout_node->is_inline_node();+ apply_white_space_processing_rules(results, element_is_inline ? StartsAndEndsLine::No : StartsAndEndsLine::Yes);+ results.remove_all_matching([](auto const& item) {+ return item.template has<AtomicInlineStart>() || item.template has<AtomicInlineEnd>();+ });+// 4. Remove any items from results that are the empty string.- results.remove_all_matching([](auto& item) {- return item.visit(- [](Utf16String const& string) { return string.is_empty(); },- [](RequiredLineBreakCount const&) { return false; });+ results.remove_all_matching([](auto const& item) {+ auto const* string = item.template get_pointer<Utf16String>();+ return string && string->is_empty();});// 5. Remove any runs of consecutive required line break count items at the start or end of results.@@ -500,23 +723,22 @@ Utf16String HTMLElement::get_the_text_steps()// U+000A LF code points as the maximum of the values in the required line break count items.Utf16StringBuilder builder;for (size_t i = 0; i < results.size(); ++i) {- results[i].visit(- [&](Utf16String const& string) {- builder.append(string);- },- [&](RequiredLineBreakCount const& line_break_count) {- int max_line_breaks = line_break_count.count;- size_t j = i + 1;- while (j < results.size() && results[j].has<RequiredLineBreakCount>()) {- max_line_breaks = max(max_line_breaks, results[j].get<RequiredLineBreakCount>().count);- ++j;- }+ if (auto const* string = results[i].get_pointer<Utf16String>()) {+ builder.append(*string);+ continue;+ }++ int max_line_breaks = results[i].get<RequiredLineBreakCount>().count;+ size_t j = i + 1;+ while (j < results.size() && results[j].has<RequiredLineBreakCount>()) {+ max_line_breaks = max(max_line_breaks, results[j].get<RequiredLineBreakCount>().count);+ ++j;+ }- // Skip over the run of required line break counts.- i = j - 1;+ // Skip over the run of required line break counts.+ i = j - 1;- builder.append_repeated_ascii('\n', max_line_breaks);- });+ builder.append_repeated_ascii('\n', max_line_breaks);}// 7. Return the concatenation of the string items in results.diff --git a/Libraries/LibWeb/Layout/TextNode.cpp b/Libraries/LibWeb/Layout/TextNode.cppindex a14722272ec..5c0d810c4aa 100644--- a/Libraries/LibWeb/Layout/TextNode.cpp+++ b/Libraries/LibWeb/Layout/TextNode.cpp@@ -34,10 +34,10 @@ GeneratedTextNode::GeneratedTextNode(DOM::Document& document, BindToPreparedArenGeneratedTextNode::~GeneratedTextNode() = default;-Utf16String TextNode::rendered_text_for_dom(bool collapse_whitespace) const+Utf16String TextNode::rendered_text_for_dom() const{Utf16String text;- RustFFI::layout_script_rendered_text(document_host(), slot_id(this), collapse_whitespace, &text,+ RustFFI::layout_script_rendered_text(document_host(), slot_id(this), &text,[](void* context, RustFFI::FfiRenderedTextView view) {*static_cast<Utf16String*>(context) = Utf16String::from_utf16({ reinterpret_cast<char16_t const*>(view.text), view.length_in_code_units });});diff --git a/Libraries/LibWeb/Layout/TextNode.h b/Libraries/LibWeb/Layout/TextNode.hindex 9aeb55a6064..9bfc8420703 100644--- a/Libraries/LibWeb/Layout/TextNode.h+++ b/Libraries/LibWeb/Layout/TextNode.h@@ -36,7 +36,7 @@ public:virtual Utf16String const& text() const { return dom_node().data(); }- Utf16String rendered_text_for_dom(bool collapse_whitespace) const;+ Utf16String rendered_text_for_dom() const;RenderedTextForDOM rendered_text_for_dom_with_offset_mapping() const;RustFFI::FfiTextSourceRange word_range_at(size_t dom_offset) const;diff --git a/Libraries/LibWeb/Rust/src/layout/script_entries.rs b/Libraries/LibWeb/Rust/src/layout/script_entries.rsindex 17cb73bcd9c..b30f1a676f7 100644--- a/Libraries/LibWeb/Rust/src/layout/script_entries.rs+++ b/Libraries/LibWeb/Rust/src/layout/script_entries.rs@@ -495,8 +495,7 @@ pub struct FfiRenderedTextWithOffsetsView {pub offset_mapping_length: usize,}-/// The text the rows of the text node whose primary row is `primary` render, with whitespace collapsed where their-/// style collapses it if `collapse_whitespace`, handed to `append`.+/// The text the rows of the text node whose primary row is `primary` render, handed to `append`.////// # Safety///@@ -506,7 +505,6 @@ pub struct FfiRenderedTextWithOffsetsView {pub unsafe extern "C" fn layout_script_rendered_text(host: &DocumentHost,primary: NodeSlotId,- collapse_whitespace: bool,context: *mut c_void,append: unsafe extern "C" fn(*mut c_void, FfiRenderedTextView),) {@@ -514,15 +512,11 @@ pub unsafe extern "C" fn layout_script_rendered_text(// the render state does.let from_rows = host.read_rows_with_rendered_text(ScriptForcedRead::at_script_entry(&SCRIPT_ENTRY),- |rows, awaiting_render| {- crate::layout::text_queries::rendered_text_of_rows(rows, awaiting_render, primary, collapse_whitespace)- },+ |rows, awaiting_render| crate::layout::text_queries::rendered_text_of_rows(rows, awaiting_render, primary),);let text = match from_rows {Some(text) => text,- None => read_arena(host, |arena| {- crate::layout::text_queries::rendered_text(arena, primary, collapse_whitespace)- }),+ None => read_arena(host, |arena| crate::layout::text_queries::rendered_text(arena, primary)),};let view = FfiRenderedTextView {text: text.as_ptr(),diff --git a/Libraries/LibWeb/Rust/src/layout/text_queries.rs b/Libraries/LibWeb/Rust/src/layout/text_queries.rsindex e8d08c48148..3ca070db536 100644--- a/Libraries/LibWeb/Rust/src/layout/text_queries.rs+++ b/Libraries/LibWeb/Rust/src/layout/text_queries.rs@@ -135,18 +135,13 @@ fn ensure_text_fragments(arena: &mut LayoutNodeArena, primary: NodeSlotId) {}}-/// The text the rows of the text node whose primary row is `primary` render, with whitespace-/// collapsed where their style collapses it if `collapse_whitespace`.-pub(crate) fn rendered_text(arena: &mut LayoutNodeArena, primary: NodeSlotId, collapse_whitespace: bool) -> Vec<u16> {+/// The text the rows of the text node whose primary row is `primary` render.+pub(crate) fn rendered_text(arena: &mut LayoutNodeArena, primary: NodeSlotId) -> Vec<u16> {ensure_text_fragments(arena, primary);let mut text = Vec::new();for &node in arena.text_fragments(primary).as_slice() {let content = arena.text_content(node).expect("fragment was refreshed");- append_rendered_text(- &mut text,- &content.text,- collapse_whitespace && collapses_whitespace(&*arena, node),- );+ text.extend_from_slice(&content.text);}text}@@ -190,7 +185,6 @@ pub(crate) fn rendered_text_of_rows(rows: &impl PaintRead,awaiting_render: &[NodeSlotId],primary: NodeSlotId,- collapse_whitespace: bool,) -> Option<Vec<u16>> {let mut text = Vec::new();for &node in rows.text_fragments(primary).as_slice() {@@ -200,32 +194,11 @@ pub(crate) fn rendered_text_of_rows({return None;}- let rendered = &rows.rendered_text(node)?.text;- append_rendered_text(- &mut text,- rendered,- collapse_whitespace && collapses_whitespace(rows, node),- );+ text.extend_from_slice(&rows.rendered_text(node)?.text);}Some(text)}-/// Appends `rendered` to `text`, with runs of whitespace collapsed to their first character where `collapse`.-fn append_rendered_text(text: &mut Vec<u16>, rendered: &[u16], collapse: bool) {- if !collapse {- text.extend_from_slice(rendered);- return;- }- let mut previous_is_space = false;- for &unit in rendered {- let is_space = matches!(unit, 0x09..=0x0d | 0x20);- if !is_space || !previous_is_space {- text.push(unit);- }- previous_is_space = is_space;- }-}-fn word_range(arena: &LayoutNodeArena,primary: NodeSlotId,diff --git a/Tests/LibWeb/Text/expected/DOM/Element-text-transform-fullwidth.txt b/Tests/LibWeb/Text/expected/DOM/Element-text-transform-fullwidth.txtindex 09e956a8d86..83bf775e583 100644--- a/Tests/LibWeb/Text/expected/DOM/Element-text-transform-fullwidth.txt+++ b/Tests/LibWeb/Text/expected/DOM/Element-text-transform-fullwidth.txt@@ -1,4 +1,4 @@- [ ]+[ ][ ] !! "" #@@ -94,8 +94,8 @@| }} ~~ ⦅-⦅ ⦆-⦆ 。+⦅ ⦆+⦆ 。。 「「 」」 、@@ -158,79 +158,79 @@ワ ンン ゙゙ ゚- ゚ [ᅟ]-[ᅠ] ᆨ-ᄀ ㄲ-ᄁ ᆪ-ᆪ ᆫ-ᄂ ᆬ-ᆬ ᆭ-ᆭ ᆮ-ᄃ ᄄ-ᄄ ᆯ-ᄅ ᆰ-ᆰ ᆱ-ᆱ ᆲ-ᆲ ᆳ-ᆳ ᆴ-ᆴ ᆵ-ᆵ ㅀ-ᄚ ᄆ-ᄆ ᄇ-ᄇ ᄈ-ᄈ ᆹ-ᄡ ᄉ-ᄉ ᆻ-ᄊ ᄋ-ᄋ ᆽ-ᄌ ᄍ-ᄍ ᆾ-ᄎ ᄏ-ᄏ ᇀ-ᄐ ᄑ-ᄑ ᇂ-ᄒ ᅡ-ᅡ ᅢ-ᅢ ᅣ-ᅣ ᅤ-ᅤ ᅥ-ᅥ ᅦ-ᅦ ᅧ-ᅧ ᅨ-ᅨ ᅩ-ᅩ ᅪ-ᅪ ᅫ-ᅫ ᅬ-ᅬ ᅭ-ᅭ ᅮ-ᅮ ᅯ-ᅯ ᅰ-ᅰ ᅱ-ᅱ ᅲ-ᅲ ᅳ-ᅳ ᅴ-ᅴ ᅵ-ᅵ ¢-¢ £-£ ¬-¬  ̄- ̄ ¦-¦ ¥-¥ ₩-₩ │-│ ←-← ↑-↑ →-→ ↓-↓ ■-■ ○-○ A+ ゚ [ᅟ]+[ᅠ] ᆨ+ᄀ ㄲ+ᄁ ᆪ+ᆪ ᆫ+ᄂ ᆬ+ᆬ ᆭ+ᆭ ᆮ+ᄃ ᄄ+ᄄ ᆯ+ᄅ ᆰ+ᆰ ᆱ+ᆱ ᆲ+ᆲ ᆳ+ᆳ ᆴ+ᆴ ᆵ+ᆵ ㅀ+ᄚ ᄆ+ᄆ ᄇ+ᄇ ᄈ+ᄈ ᆹ+ᄡ ᄉ+ᄉ ᆻ+ᄊ ᄋ+ᄋ ᆽ+ᄌ ᄍ+ᄍ ᆾ+ᄎ ᄏ+ᄏ ᇀ+ᄐ ᄑ+ᄑ ᇂ+ᄒ ᅡ+ᅡ ᅢ+ᅢ ᅣ+ᅣ ᅤ+ᅤ ᅥ+ᅥ ᅦ+ᅦ ᅧ+ᅧ ᅨ+ᅨ ᅩ+ᅩ ᅪ+ᅪ ᅫ+ᅫ ᅬ+ᅬ ᅭ+ᅭ ᅮ+ᅮ ᅯ+ᅯ ᅰ+ᅰ ᅱ+ᅱ ᅲ+ᅲ ᅳ+ᅳ ᅴ+ᅴ ᅵ+ᅵ ¢+¢ £+£ ¬+¬  ̄+ ̄ ¦+¦ ¥+¥ ₩+₩ │+│ ←+← ↑+↑ →+→ ↓+↓ ■+■ ○+○ AA BB CC aa bb c-c あ+c ああ いい うう え@@ -240,4 +240,4 @@イ ウウ エエ オ-オ+オdiff --git a/Tests/LibWeb/Text/expected/DOM/Element-text-transform-lowercase.txt b/Tests/LibWeb/Text/expected/DOM/Element-text-transform-lowercase.txtindex 2a7c4b65321..fcd0bd471c6 100644--- a/Tests/LibWeb/Text/expected/DOM/Element-text-transform-lowercase.txt+++ b/Tests/LibWeb/Text/expected/DOM/Element-text-transform-lowercase.txt@@ -1 +1 @@- i̇̀ i̇̀ i̇́ i̇́ i̇̃ i̇̃ i̇̀ i̇̀ j̇́ j̇́ į̇̃ į̇̃+i̇̀ i̇̀ i̇́ i̇́ i̇̃ i̇̃ i̇̀ i̇̀ j̇́ j̇́ į̇̃ į̇̃diff --git a/Tests/LibWeb/Text/expected/DOM/Range-deleteContents.txt b/Tests/LibWeb/Text/expected/DOM/Range-deleteContents.txtindex 8f783d3a80c..eecca907f42 100644--- a/Tests/LibWeb/Text/expected/DOM/Range-deleteContents.txt+++ b/Tests/LibWeb/Text/expected/DOM/Range-deleteContents.txt@@ -1,2 +1,2 @@-before- after+before+afterdiff --git a/Tests/LibWeb/Text/expected/Editing/input-into-empty-contenteditable.txt b/Tests/LibWeb/Text/expected/Editing/input-into-empty-contenteditable.txtindex 824135e7fda..ce013625030 100644--- a/Tests/LibWeb/Text/expected/Editing/input-into-empty-contenteditable.txt+++ b/Tests/LibWeb/Text/expected/Editing/input-into-empty-contenteditable.txt@@ -1,2 +1 @@hello-diff --git a/Tests/LibWeb/Text/expected/HTML/innerText-carriage-returns.txt b/Tests/LibWeb/Text/expected/HTML/innerText-carriage-returns.txtnew file mode 100644index 00000000000..3f6493a9b09--- /dev/null+++ b/Tests/LibWeb/Text/expected/HTML/innerText-carriage-returns.txt@@ -0,0 +1 @@+"a b"diff --git a/Tests/LibWeb/Text/expected/html-parser-text-in-table-hoisting.txt b/Tests/LibWeb/Text/expected/html-parser-text-in-table-hoisting.txtindex fb8524e50e4..7ef22e9a431 100644--- a/Tests/LibWeb/Text/expected/html-parser-text-in-table-hoisting.txt+++ b/Tests/LibWeb/Text/expected/html-parser-text-in-table-hoisting.txt@@ -1 +1 @@-PASS\ No newline at end of file+PASSdiff --git a/Tests/LibWeb/Text/expected/object-with-unsupported-type-in-data-attribute.txt b/Tests/LibWeb/Text/expected/object-with-unsupported-type-in-data-attribute.txtindex 26995309a47..ab984305aa1 100644--- a/Tests/LibWeb/Text/expected/object-with-unsupported-type-in-data-attribute.txt+++ b/Tests/LibWeb/Text/expected/object-with-unsupported-type-in-data-attribute.txt@@ -1,3 +1 @@-Fallback-diff --git a/Tests/LibWeb/Text/expected/scripted-dom-insertion-during-html-parse.txt b/Tests/LibWeb/Text/expected/scripted-dom-insertion-during-html-parse.txtindex e46b6e2ca67..7ef22e9a431 100644--- a/Tests/LibWeb/Text/expected/scripted-dom-insertion-during-html-parse.txt+++ b/Tests/LibWeb/Text/expected/scripted-dom-insertion-during-html-parse.txt@@ -1 +1 @@- PASS\ No newline at end of file+PASSdiff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/getter.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/getter.txtindex de395f7f293..59efa888528 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/getter.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/getter.txt@@ -2,17 +2,17 @@ Harness status: OKFound 272 tests-218 Pass-54 Fail+254 Pass+18 FailPass Simplest possible test ("<div>abc")-Fail Leading whitespace removed ("<div> abc")-Fail Trailing whitespace removed ("<div>abc ")+Pass Leading whitespace removed ("<div> abc")+Pass Trailing whitespace removed ("<div>abc ")Pass Internal whitespace compressed ("<div>abc def")Pass \n converted to space ("<div>abc\ndef")Pass \r converted to space ("<div>abc\rdef")Pass \t converted to space ("<div>abc\tdef")-Fail Trailing whitespace before hard line break removed ("<div>abc <br>def")-Fail Leading whitespace after hard line break removed ("<div>abc<br> def")+Pass Trailing whitespace before hard line break removed ("<div>abc <br>def")+Pass Leading whitespace after hard line break removed ("<div>abc<br> def")Pass Leading whitespace preserved ("<pre> abc")Pass Trailing whitespace preserved ("<pre>abc ")Pass Internal whitespace preserved ("<pre>abc def")@@ -32,52 +32,52 @@ Pass Internal whitespace preserved ("<span style='white-space:pre'>abc def")Pass \n preserved ("<span style='white-space:pre'>abc\ndef")Pass \r converted to newline ("<span style='white-space:pre'>abc\rdef")Pass \t preserved ("<span style='white-space:pre'>abc\tdef")-Fail Leading whitespace removed ("<div style='white-space:pre-line'> abc")-Fail Trailing whitespace removed ("<div style='white-space:pre-line'>abc ")+Pass Leading whitespace removed ("<div style='white-space:pre-line'> abc")+Pass Trailing whitespace removed ("<div style='white-space:pre-line'>abc ")Pass Internal whitespace collapsed ("<div style='white-space:pre-line'>abc def")Pass \n preserved ("<div style='white-space:pre-line'>abc\ndef")Pass \r converted to newline ("<div style='white-space:pre-line'>abc\rdef")Pass \t converted to space ("<div style='white-space:pre-line'>abc\tdef")-Fail Whitespace collapses across element boundaries ("<div><span>abc </span> def")-Fail Whitespace collapses across element boundaries ("<div><span>abc </span><span></span> def")-Fail Whitespace collapses across element boundaries ("<div><span>abc </span><span style='white-space:pre'></span> def")+Pass Whitespace collapses across element boundaries ("<div><span>abc </span> def")+Pass Whitespace collapses across element boundaries ("<div><span>abc </span><span></span> def")+Pass Whitespace collapses across element boundaries ("<div><span>abc </span><span style='white-space:pre'></span> def")Pass Whitespace around <input> should not be collapsed ("<div>abc <input> def")Pass Whitespace around inline-block should not be collapsed ("<div>abc <span style='display:inline-block'></span> def")-Fail Trailing space at end of inline-block should be collapsed ("<div>abc <span style='display:inline-block'> def </span> ghi")+Pass Trailing space at end of inline-block should be collapsed ("<div>abc <span style='display:inline-block'> def </span> ghi")Pass Whitespace around inline-flex should not be collapsed ("<div>abc <span style='display:inline-flex'></span> def")-Fail Trailing space at end of inline-flex should be collapsed ("<div>abc <span style='display:inline-flex'> def </span> ghi")+Pass Trailing space at end of inline-flex should be collapsed ("<div>abc <span style='display:inline-flex'> def </span> ghi")Pass Whitespace around inline-grid should not be collapsed ("<div>abc <span style='display:inline-grid'></span> def")-Fail Trailing space at end of grid-flex should be collapsed ("<div>abc <span style='display:inline-grid'> def </span> ghi")-Fail Whitespace between <input> and block should be collapsed ("<div><input> <div>abc</div>")-Fail Whitespace between inline-block and block should be collapsed ("<div><span style='inline-block'></span> <div>abc</div>")-Fail Whitespace between inline-flex and block should be collapsed ("<div><span style='inline-flex'></span> <div>abc</div>")-Fail Whitespace between inline-grid and block should be collapsed ("<div><span style='inline-grid'></span> <div>abc</div>")+Pass Trailing space at end of grid-flex should be collapsed ("<div>abc <span style='display:inline-grid'> def </span> ghi")+Pass Whitespace between <input> and block should be collapsed ("<div><input> <div>abc</div>")+Pass Whitespace between inline-block and block should be collapsed ("<div><span style='inline-block'></span> <div>abc</div>")+Pass Whitespace between inline-flex and block should be collapsed ("<div><span style='inline-flex'></span> <div>abc</div>")+Pass Whitespace between inline-grid and block should be collapsed ("<div><span style='inline-grid'></span> <div>abc</div>")Pass Whitespace around <img> should not be collapsed ("<div>abc <img> def")Pass Whitespace around <img> should not be collapsed ("<div>abc <img width=1 height=1> def")Pass Leading whitesapce should not be collapsed ("<div><img> abc")Pass Trailing whitesapce should not be collapsed ("<div>abc <img>")-Fail Whitespace around empty span should be collapsed ("<div>abc <b></b> def")-Fail Whitespace around empty spans should be collapsed ("<div>abc <b><i></i></b> def")+Pass Whitespace around empty span should be collapsed ("<div>abc <b></b> def")+Pass Whitespace around empty spans should be collapsed ("<div>abc <b><i></i></b> def")Pass <canvas> should not collapse following space ("<div><canvas></canvas> abc")-Fail Replaced element <img> with display:block should be treated as block-level ("<div>abc <img style='display:block'> def")-Fail Replaced element <canvas> with display:block should be treated as block-level ("<div>abc <canvas style='display:block'></canvas> def")+Pass Replaced element <img> with display:block should be treated as block-level ("<div>abc <img style='display:block'> def")+Pass Replaced element <canvas> with display:block should be treated as block-level ("<div>abc <canvas style='display:block'></canvas> def")Pass Soft line breaks ignored ("<div style='width:0'>abc def")Pass Soft line break at hyphen ignored ("<div style='width:0'>abc-def")Pass Whitespace text node preserved ("<div style='width:0'><span>abc</span> <span>def</span>")Pass Soft breaks ignored in presence of word-break:break-word ("<div style='width:1px; word-break:break-word'>Hello Kitty</div>")Pass Element boundaries ignored for soft break handling (1) ("<div style='width:1px; word-break:break-word'><x>Hello</x> <x>Kitty</x></div>")-Fail Whitespace collapses across element boundaries at soft break (1) ("<div style='width:1px; word-break:break-word'><x>Hello</x> <x> Kitty</x></div>")+Pass Whitespace collapses across element boundaries at soft break (1) ("<div style='width:1px; word-break:break-word'><x>Hello</x> <x> Kitty</x></div>")Pass Element boundaries ignored for soft break handling (2) ("<div style='width:1px; word-break:break-word'><x>Hello</x><x> Kitty</x></div>")-Fail Whitespace collapses across element boundaries at soft break (2) ("<div style='width:1px; word-break:break-word'><x>Hello </x> <x>Kitty</x></div>")+Pass Whitespace collapses across element boundaries at soft break (2) ("<div style='width:1px; word-break:break-word'><x>Hello </x> <x>Kitty</x></div>")Pass Element boundaries ignored for soft break handling (3) ("<div style='width:1px; word-break:break-word'><x>Hello </x><x>Kitty</x></div>")-Fail Whitespace collapses across element boundaries at soft break (3) ("<div style='width:1px; word-break:break-word'><x>Hello </x><x> Kitty</x></div>")-Fail Whitespace collapses across element boundaries at soft break (4) ("<div style='width:1px; word-break:break-word'><x>Hello </x> <x> Kitty</x></div>")+Pass Whitespace collapses across element boundaries at soft break (3) ("<div style='width:1px; word-break:break-word'><x>Hello </x><x> Kitty</x></div>")+Pass Whitespace collapses across element boundaries at soft break (4) ("<div style='width:1px; word-break:break-word'><x>Hello </x> <x> Kitty</x></div>")Pass Element boundaries ignored for soft break handling (4) ("<div style='width:1px; word-break:break-word'><x>Hello</x> Kitty</div>")Pass Element boundaries ignored for soft break handling (5) ("<div style='width:1px; word-break:break-word'><x>Hello </x>Kitty</div>")Pass Soft breaks ignored, text-transform applied ("<div style='width:1px; word-break:break-word; text-transform:uppercase'>Hello Kitty</div>")-Fail <br> returned as newline, following space collapsed ("<div style='width:1px; word-break:break-word'>Hello<br> Kitty</div>")-Fail <br> returned as newline, preceding space collapsed ("<div style='width:1px; word-break:break-word'>Hello <br>Kitty</div>")-Fail <br> returned as newline, adjacent spaces collapsed across element boundaries ("<div style='width:1px; word-break:break-word'><x>Hello </x> <br> <x> Kitty</x></div>")+Pass <br> returned as newline, following space collapsed ("<div style='width:1px; word-break:break-word'>Hello<br> Kitty</div>")+Pass <br> returned as newline, preceding space collapsed ("<div style='width:1px; word-break:break-word'>Hello <br>Kitty</div>")+Pass <br> returned as newline, adjacent spaces collapsed across element boundaries ("<div style='width:1px; word-break:break-word'><x>Hello </x> <br> <x> Kitty</x></div>")Fail ::first-line styles applied ("<div class='first-line-uppercase'>abc")Fail ::first-line styles applied ("<div class='first-line-uppercase' style='width:0'>abc def")Pass ::first-letter styles applied ("<div class='first-letter-uppercase' style='width:0'>abc def")@@ -95,7 +95,7 @@ Pass display:contents container ("<div style='display:contents'>abc")Pass display:contents container ("<div><div style='display:contents'>abc")Pass display:contents rendered ("<div>123<span style='display:contents'>abc")Fail display:contents not processed via textContent ("<div style='display:contents'> ")-Fail display:contents not processed via textContent ("<div><div style='display:contents'> ")+Pass display:contents not processed via textContent ("<div><div style='display:contents'> ")Pass visibility:hidden container ("<div style='visibility:hidden'>abc")Pass visibility:hidden child not rendered ("<div>123<span style='visibility:hidden'>abc")Pass visibility:visible child rendered ("<div style='visibility:hidden'>123<span style='visibility:visible'>abc")@@ -108,7 +108,7 @@ Pass visibility:collapse honored on flex item ("<div style='display:flex'><spanPass visibility:collapse honored on grid item ("<div style='display:grid'><span style='visibility:collapse'>1</span><span>2</span></div>")Pass opacity:0 container ("<div style='opacity:0'>abc")Pass Whitespace compression in opacity:0 container ("<div style='opacity:0'>abc def")-Fail Remove leading/trailing whitespace in opacity:0 container ("<div style='opacity:0'> abc def ")+Pass Remove leading/trailing whitespace in opacity:0 container ("<div style='opacity:0'> abc def ")Pass opacity:0 child rendered ("<div>123<span style='opacity:0'>abc")Pass Generated content not included ("<div class='before'>")Pass Generated content on child not included ("<div><div class='before'>")@@ -168,10 +168,10 @@ Pass Newline at display:block boundary ("<div>123<span style='display:block'>abcPass Empty block induces single line break ("<div>abc<div></div>def")Pass Consecutive empty blocks ignored ("<div>abc<div></div><div></div>def")Pass No blank lines around <p> alone ("<div><p>abc")-Fail No blank lines around <p> followed by only collapsible whitespace ("<div><p>abc</p> ")-Fail No blank lines around <p> preceded by only collapsible whitespace ("<div> <p>abc</p>")+Pass No blank lines around <p> followed by only collapsible whitespace ("<div><p>abc</p> ")+Pass No blank lines around <p> preceded by only collapsible whitespace ("<div> <p>abc</p>")Pass Blank line between consecutive <p>s ("<div><p>abc<p>def")-Fail Blank line between consecutive <p>s separated only by collapsible whitespace ("<div><p>abc</p> <p>def")+Pass Blank line between consecutive <p>s separated only by collapsible whitespace ("<div><p>abc</p> <p>def")Pass Blank line between consecutive <p>s separated only by empty block ("<div><p>abc</p><div></div><p>def")Pass Blank lines between <p>s separated by non-empty block ("<div><p>abc</p><div>123</div><p>def")Pass Blank lines around a <p> in its own block ("<div>abc<div><p>123</p></div>def")@@ -181,9 +181,9 @@ Pass One blank line between <p>s, ignoring empty <p>s ("<div><p>abc<p></p><p></pPass Invisible <p> doesn't induce extra line breaks ("<div style='visibility:hidden'><p><span style='visibility:visible'>abc</span></p>\n<div style='visibility:visible'>def</div>")Pass No blank lines around <div> with margin ("<div>abc<div style='margin:2em'>def")Pass No newlines at display:inline-block boundary ("<div>123<span style='display:inline-block'>abc</span>def")-Fail Leading/trailing space removal at display:inline-block boundary ("<div>123<span style='display:inline-block'> abc </span>def")-Fail Leading/trailing space removal at display:inline-flex boundary ("<div>123<span style='display:inline-flex'> abc </span>def")-Fail Leading/trailing space removal at display:inline-grid boundary ("<div>123<span style='display:inline-grid'> abc </span>def")+Pass Leading/trailing space removal at display:inline-block boundary ("<div>123<span style='display:inline-block'> abc </span>def")+Pass Leading/trailing space removal at display:inline-flex boundary ("<div>123<span style='display:inline-flex'> abc </span>def")+Pass Leading/trailing space removal at display:inline-grid boundary ("<div>123<span style='display:inline-grid'> abc </span>def")Pass Blank lines around <p> even without margin ("<div>123<p style='margin:0px'>abc</p>def")Pass No blank lines around <h1> ("<div>123<h1>abc</h1>def")Pass No blank lines around <h2> ("<div>123<h2>abc</h2>def")@@ -268,7 +268,7 @@ Pass <rp> ("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>")Pass Lone <rp> ("<div><rp>abc</rp>")Pass visibility:hidden <rp> ("<div><rp style='visibility:hidden'>abc</rp>")Pass display:block <rp> ("<div><rp style='display:block'>abc</rp>def")-Fail display:block <rp> with whitespace ("<div><rp style='display:block'> abc </rp>def")+Pass display:block <rp> with whitespace ("<div><rp style='display:block'> abc </rp>def")Pass <rp> in a <select> ("<div><select class='poke-rp'></select>")Pass Shadow DOM contents ignored ("<div class='shadow'>")Pass Shadow DOM contents ignored ("<div><div class='shadow'>")diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=plaintext-only.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=plaintext-only.txtindex 49db5a7bdc5..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=plaintext-only.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=plaintext-only.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-8 Pass-71 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible-Fail Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible-Fail Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible-Fail Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible-Fail Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible-Fail Only single collapsible linefeed should be invisible-Fail Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsible+Pass Leading linefeed should not appear if it's collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsible+Pass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsible+Pass Trailing linefeed should not appear if it's collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisible+Pass Only single collapsible linefeed should be invisible+Pass Only single collapsible CR should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -38,48 +37,48 @@ Pass Multiple mixed white-spaces between words may be invisible if they are collPass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible-Fail linefeed before <br> should be invisible if it's collapsible-Fail CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible-Fail linefeed after <br> should be invisible if it's collapsible-Fail CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible-Fail linefeed between <br>s should be invisible if it's collapsible-Fail CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible-Fail linefeed before <hr> should be invisible if it's collapsible-Fail CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible-Fail linefeed after <hr> should be invisible if it's collapsible-Fail CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible-Fail linefeed between <hr>s should be invisible if it's collapsible-Fail CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible-Fail linefeed before <div> should be invisible if it's collapsible-Fail CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible-Fail linefeed after <div> should be invisible if it's collapsible-Fail CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible-Fail linefeed between <div>s should be invisible if it's collapsible-Fail CR between <div>s should be invisible if it's collapsible\ No newline at end of file+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsible+Pass linefeed before <br> should be invisible if it's collapsible+Pass CR before <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsible+Pass linefeed after <br> should be invisible if it's collapsible+Pass CR after <br> should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsible+Pass linefeed between <br>s should be invisible if it's collapsible+Pass CR between <br>s should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsible+Pass linefeed before <hr> should be invisible if it's collapsible+Pass CR before <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsible+Pass linefeed after <hr> should be invisible if it's collapsible+Pass CR after <hr> should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsible+Pass linefeed between <hr>s should be invisible if it's collapsible+Pass CR between <hr>s should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsible+Pass linefeed before <div> should be invisible if it's collapsible+Pass CR before <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsible+Pass linefeed after <div> should be invisible if it's collapsible+Pass CR after <div> should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsible+Pass linefeed between <div>s should be invisible if it's collapsible+Pass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=true.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=true.txtindex 49db5a7bdc5..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=true.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal&contenteditable=true.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-8 Pass-71 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible-Fail Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible-Fail Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible-Fail Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible-Fail Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible-Fail Only single collapsible linefeed should be invisible-Fail Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsible+Pass Leading linefeed should not appear if it's collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsible+Pass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsible+Pass Trailing linefeed should not appear if it's collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisible+Pass Only single collapsible linefeed should be invisible+Pass Only single collapsible CR should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -38,48 +37,48 @@ Pass Multiple mixed white-spaces between words may be invisible if they are collPass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible-Fail linefeed before <br> should be invisible if it's collapsible-Fail CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible-Fail linefeed after <br> should be invisible if it's collapsible-Fail CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible-Fail linefeed between <br>s should be invisible if it's collapsible-Fail CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible-Fail linefeed before <hr> should be invisible if it's collapsible-Fail CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible-Fail linefeed after <hr> should be invisible if it's collapsible-Fail CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible-Fail linefeed between <hr>s should be invisible if it's collapsible-Fail CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible-Fail linefeed before <div> should be invisible if it's collapsible-Fail CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible-Fail linefeed after <div> should be invisible if it's collapsible-Fail CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible-Fail linefeed between <div>s should be invisible if it's collapsible-Fail CR between <div>s should be invisible if it's collapsible\ No newline at end of file+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsible+Pass linefeed before <br> should be invisible if it's collapsible+Pass CR before <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsible+Pass linefeed after <br> should be invisible if it's collapsible+Pass CR after <br> should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsible+Pass linefeed between <br>s should be invisible if it's collapsible+Pass CR between <br>s should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsible+Pass linefeed before <hr> should be invisible if it's collapsible+Pass CR before <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsible+Pass linefeed after <hr> should be invisible if it's collapsible+Pass CR after <hr> should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsible+Pass linefeed between <hr>s should be invisible if it's collapsible+Pass CR between <hr>s should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsible+Pass linefeed before <div> should be invisible if it's collapsible+Pass CR before <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsible+Pass linefeed after <div> should be invisible if it's collapsible+Pass CR after <div> should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsible+Pass linefeed between <div>s should be invisible if it's collapsible+Pass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal.txtindex 49db5a7bdc5..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=normal.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-8 Pass-71 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible-Fail Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible-Fail Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible-Fail Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible-Fail Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible-Fail Only single collapsible linefeed should be invisible-Fail Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsible+Pass Leading linefeed should not appear if it's collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsible+Pass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsible+Pass Trailing linefeed should not appear if it's collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisible+Pass Only single collapsible linefeed should be invisible+Pass Only single collapsible CR should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -38,48 +37,48 @@ Pass Multiple mixed white-spaces between words may be invisible if they are collPass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible-Fail linefeed before <br> should be invisible if it's collapsible-Fail CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible-Fail linefeed after <br> should be invisible if it's collapsible-Fail CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible-Fail linefeed between <br>s should be invisible if it's collapsible-Fail CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible-Fail linefeed before <hr> should be invisible if it's collapsible-Fail CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible-Fail linefeed after <hr> should be invisible if it's collapsible-Fail CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible-Fail linefeed between <hr>s should be invisible if it's collapsible-Fail CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible-Fail linefeed before <div> should be invisible if it's collapsible-Fail CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible-Fail linefeed after <div> should be invisible if it's collapsible-Fail CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible-Fail linefeed between <div>s should be invisible if it's collapsible-Fail CR between <div>s should be invisible if it's collapsible\ No newline at end of file+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsible+Pass linefeed before <br> should be invisible if it's collapsible+Pass CR before <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsible+Pass linefeed after <br> should be invisible if it's collapsible+Pass CR after <br> should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsible+Pass linefeed between <br>s should be invisible if it's collapsible+Pass CR between <br>s should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsible+Pass linefeed before <hr> should be invisible if it's collapsible+Pass CR before <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsible+Pass linefeed after <hr> should be invisible if it's collapsible+Pass CR after <hr> should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsible+Pass linefeed between <hr>s should be invisible if it's collapsible+Pass CR between <hr>s should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsible+Pass linefeed before <div> should be invisible if it's collapsible+Pass CR before <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsible+Pass linefeed after <div> should be invisible if it's collapsible+Pass CR after <div> should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsible+Pass linefeed between <div>s should be invisible if it's collapsible+Pass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=plaintext-only.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=plaintext-only.txtindex b475e7049b1..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=plaintext-only.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=plaintext-only.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-31 Pass-48 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsiblePass Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsiblePass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsiblePass Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsiblePass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisiblePass Only single collapsible linefeed should be invisiblePass Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -37,49 +36,49 @@ Pass Multiple white-spaces between words may be invisible if they are collapsiblPass Multiple mixed white-spaces between words may be invisible if they are collapsible #1Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3-Fail Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible+Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsiblePass linefeed before <br> should be invisible if it's collapsiblePass CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsiblePass linefeed after <br> should be invisible if it's collapsiblePass CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsiblePass linefeed between <br>s should be invisible if it's collapsiblePass CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsiblePass linefeed before <hr> should be invisible if it's collapsiblePass CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsiblePass linefeed after <hr> should be invisible if it's collapsiblePass CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsiblePass linefeed between <hr>s should be invisible if it's collapsiblePass CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsiblePass linefeed before <div> should be invisible if it's collapsiblePass CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsiblePass linefeed after <div> should be invisible if it's collapsiblePass CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsiblePass linefeed between <div>s should be invisible if it's collapsiblePass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=true.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=true.txtindex b475e7049b1..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=true.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line&contenteditable=true.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-31 Pass-48 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsiblePass Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsiblePass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsiblePass Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsiblePass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisiblePass Only single collapsible linefeed should be invisiblePass Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -37,49 +36,49 @@ Pass Multiple white-spaces between words may be invisible if they are collapsiblPass Multiple mixed white-spaces between words may be invisible if they are collapsible #1Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3-Fail Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible+Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsiblePass linefeed before <br> should be invisible if it's collapsiblePass CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsiblePass linefeed after <br> should be invisible if it's collapsiblePass CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsiblePass linefeed between <br>s should be invisible if it's collapsiblePass CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsiblePass linefeed before <hr> should be invisible if it's collapsiblePass CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsiblePass linefeed after <hr> should be invisible if it's collapsiblePass CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsiblePass linefeed between <hr>s should be invisible if it's collapsiblePass CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsiblePass linefeed before <div> should be invisible if it's collapsiblePass CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsiblePass linefeed after <div> should be invisible if it's collapsiblePass CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsiblePass linefeed between <div>s should be invisible if it's collapsiblePass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line.txt b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line.txtindex b475e7049b1..afe450084b4 100644--- a/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/html/dom/elements/the-innertext-and-outertext-properties/innertext-with-white-spaces@white-space=pre-line.txt@@ -2,34 +2,33 @@ Harness status: OKFound 79 tests-31 Pass-48 Fail-Fail Leading white-space should not appear if white-spaces are collapsible-Fail Leading white-spaces should not appear if white-spaces are collapsible-Fail Leading tab should not appear if white-spaces are collapsible-Fail Leading tabs should not appear if white-spaces are collapsible+79 Pass+Pass Leading white-space should not appear if white-spaces are collapsible+Pass Leading white-spaces should not appear if white-spaces are collapsible+Pass Leading tab should not appear if white-spaces are collapsible+Pass Leading tabs should not appear if white-spaces are collapsiblePass Leading linefeed should not appear if it's collapsible-Fail Leading linefeeds should not appear if they are collapsible-Fail Leading mixed white-spaces should not appear if they are collapsible+Pass Leading linefeeds should not appear if they are collapsible+Pass Leading mixed white-spaces should not appear if they are collapsiblePass Leading CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Trailing white-space should not appear if white-spaces are collapsible-Fail Trailing white-spaces should not appear if white-spaces are collapsible-Fail Trailing tab should not appear if white-spaces are collapsible-Fail Trailing tabs should not appear if white-spaces are collapsible+Pass Leading CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Trailing white-space should not appear if white-spaces are collapsible+Pass Trailing white-spaces should not appear if white-spaces are collapsible+Pass Trailing tab should not appear if white-spaces are collapsible+Pass Trailing tabs should not appear if white-spaces are collapsiblePass Trailing linefeed should not appear if it's collapsible-Fail Trailing linefeeds should not appear if they are collapsible-Fail Trailing mixed white-spaces should not appear if they are collapsible+Pass Trailing linefeeds should not appear if they are collapsible+Pass Trailing mixed white-spaces should not appear if they are collapsiblePass Trailing CR should be normalized to LF and should not appear if linefeeds are collapsible-Fail Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible-Fail Only single collapsible space should be invisible-Fail Only single collapsible tab should be invisible+Pass Trailing CRs should be normalized to LFs and should not appear if linefeeds are collapsible+Pass Only single collapsible space should be invisible+Pass Only single collapsible tab should be invisiblePass Only single collapsible linefeed should be invisiblePass Only single collapsible CR should be invisible-Fail Only multiple collapsible spaces should be invisible-Fail Only multiple collapsible tabs should be invisible-Fail Only multiple collapsible linefeeds should be invisible-Fail Only multiple collapsible CRs should be invisible+Pass Only multiple collapsible spaces should be invisible+Pass Only multiple collapsible tabs should be invisible+Pass Only multiple collapsible linefeeds should be invisible+Pass Only multiple collapsible CRs should be invisiblePass Single collapsible tab should be converted to an ASCII spacePass Single collapsible linefeed should be converted to an ASCII spacePass Single collapsible CR should be converted to an ASCII space, or otherwise, a linefeed@@ -37,49 +36,49 @@ Pass Multiple white-spaces between words may be invisible if they are collapsiblPass Multiple mixed white-spaces between words may be invisible if they are collapsible #1Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #2Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #3-Fail Multiple mixed white-spaces between words may be invisible if they are collapsible #4-Fail white-space before <br> should be invisible if it's collapsible-Fail white-spaces before <br> should be invisible if they are collapsible-Fail tab before <br> should be invisible if it's collapsible+Pass Multiple mixed white-spaces between words may be invisible if they are collapsible #4+Pass white-space before <br> should be invisible if it's collapsible+Pass white-spaces before <br> should be invisible if they are collapsible+Pass tab before <br> should be invisible if it's collapsiblePass linefeed before <br> should be invisible if it's collapsiblePass CR before <br> should be invisible if it's collapsible-Fail white-space after <br> should be invisible if it's collapsible-Fail white-spaces after <br> should be invisible if they are collapsible-Fail tab after <br> should be invisible if it's collapsible+Pass white-space after <br> should be invisible if it's collapsible+Pass white-spaces after <br> should be invisible if they are collapsible+Pass tab after <br> should be invisible if it's collapsiblePass linefeed after <br> should be invisible if it's collapsiblePass CR after <br> should be invisible if it's collapsible-Fail white-space between <br>s should be invisible if it's collapsible-Fail white-spaces between <br>s should be invisible if they are collapsible-Fail tab between <br>s should be invisible if it's collapsible+Pass white-space between <br>s should be invisible if it's collapsible+Pass white-spaces between <br>s should be invisible if they are collapsible+Pass tab between <br>s should be invisible if it's collapsiblePass linefeed between <br>s should be invisible if it's collapsiblePass CR between <br>s should be invisible if it's collapsible-Fail white-space before <hr> should be invisible if it's collapsible-Fail white-spaces before <hr> should be invisible if they are collapsible-Fail tab before <hr> should be invisible if it's collapsible+Pass white-space before <hr> should be invisible if it's collapsible+Pass white-spaces before <hr> should be invisible if they are collapsible+Pass tab before <hr> should be invisible if it's collapsiblePass linefeed before <hr> should be invisible if it's collapsiblePass CR before <hr> should be invisible if it's collapsible-Fail white-space after <hr> should be invisible if it's collapsible-Fail white-spaces after <hr> should be invisible if they are collapsible-Fail tab after <hr> should be invisible if it's collapsible+Pass white-space after <hr> should be invisible if it's collapsible+Pass white-spaces after <hr> should be invisible if they are collapsible+Pass tab after <hr> should be invisible if it's collapsiblePass linefeed after <hr> should be invisible if it's collapsiblePass CR after <hr> should be invisible if it's collapsible-Fail white-space between <hr>s should be invisible if it's collapsible-Fail white-spaces between <hr>s should be invisible if they are collapsible-Fail tab between <hr>s should be invisible if it's collapsible+Pass white-space between <hr>s should be invisible if it's collapsible+Pass white-spaces between <hr>s should be invisible if they are collapsible+Pass tab between <hr>s should be invisible if it's collapsiblePass linefeed between <hr>s should be invisible if it's collapsiblePass CR between <hr>s should be invisible if it's collapsible-Fail white-space before <div> should be invisible if it's collapsible-Fail white-spaces before <div> should be invisible if they are collapsible-Fail tab before <div> should be invisible if it's collapsible+Pass white-space before <div> should be invisible if it's collapsible+Pass white-spaces before <div> should be invisible if they are collapsible+Pass tab before <div> should be invisible if it's collapsiblePass linefeed before <div> should be invisible if it's collapsiblePass CR before <div> should be invisible if it's collapsible-Fail white-space after <div> should be invisible if it's collapsible-Fail white-spaces after <div> should be invisible if they are collapsible-Fail tab after <div> should be invisible if it's collapsible+Pass white-space after <div> should be invisible if it's collapsible+Pass white-spaces after <div> should be invisible if they are collapsible+Pass tab after <div> should be invisible if it's collapsiblePass linefeed after <div> should be invisible if it's collapsiblePass CR after <div> should be invisible if it's collapsible-Fail white-space between <div>s should be invisible if it's collapsible-Fail white-spaces between <div>s should be invisible if they are collapsible-Fail tab between <div>s should be invisible if it's collapsible+Pass white-space between <div>s should be invisible if it's collapsible+Pass white-spaces between <div>s should be invisible if they are collapsible+Pass tab between <div>s should be invisible if it's collapsiblePass linefeed between <div>s should be invisible if it's collapsiblePass CR between <div>s should be invisible if it's collapsible\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/trusted-types/block-string-assignment-to-Document-write.txt b/Tests/LibWeb/Text/expected/wpt-import/trusted-types/block-string-assignment-to-Document-write.txtindex 949ffd8492f..10228889ed1 100644--- a/Tests/LibWeb/Text/expected/wpt-import/trusted-types/block-string-assignment-to-Document-write.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/trusted-types/block-string-assignment-to-Document-write.txt@@ -2,12 +2,11 @@ Harness status: OKFound 20 tests-15 Pass-5 Fail+20 PassPass document.write with html assigned via policy (successful URL transformation).Pass document.write with multiple trusted arguments.-Fail document.writeln with html assigned via policy (successful URL transformation).-Fail document.writeln with multiple trusted arguments.+Pass document.writeln with html assigned via policy (successful URL transformation).+Pass document.writeln with multiple trusted arguments.Pass `document.write(string)` throwsPass `document.write(string, string)` throwsPass `document.write(string, TrustedHTML)` throws@@ -20,7 +19,7 @@ Pass `document.write(string)` observes default policyPass `document.write(string, string)` observes default policyPass `document.write(string, TrustedHTML)` observes default policyPass `document.write` passes the correct sink string to the default policy-Fail `document.writeln(string)` observes default policy-Fail `document.writeln(string, string)` observes default policy-Fail `document.writeln(string, TrustedHTML)` observes default policy+Pass `document.writeln(string)` observes default policy+Pass `document.writeln(string, string)` observes default policy+Pass `document.writeln(string, TrustedHTML)` observes default policyPass `document.writeln` passes the correct sink string to the default policy\ No newline at end of filediff --git a/Tests/LibWeb/Text/input/HTML/innerText-carriage-returns.html b/Tests/LibWeb/Text/input/HTML/innerText-carriage-returns.htmlnew file mode 100644index 00000000000..1d149552037--- /dev/null+++ b/Tests/LibWeb/Text/input/HTML/innerText-carriage-returns.html@@ -0,0 +1,10 @@+<!DOCTYPE html>+<script src="../include.js"></script>+<div id="target"></div>+<script>+ test(() => {+ const target = document.getElementById("target");+ target.textContent = "\r a\r\r b \r";+ println(JSON.stringify(target.innerText));+ });+</script>