Skip to content

Truly independent web browser

LibWeb: Keep the formatting of deleted content for the next text

Andreas Klinga4f61587cfa9
diff --git a/Libraries/LibWeb/Editing/Commands.cpp b/Libraries/LibWeb/Editing/Commands.cpp
index f09b23e083e..a4b0ee281d4 100644
--- a/Libraries/LibWeb/Editing/Commands.cpp
+++ b/Libraries/LibWeb/Editing/Commands.cpp
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <AK/ScopeGuard.h>
#include <LibGC/ConservativeVector.h>
#include <LibGC/RootVector.h>
#include <LibUnicode/CharacterTypes.h>
@@ -1652,6 +1653,16 @@ bool command_insert_paragraph_action(DOM::Document& document, Utf16View)
auto selection_was_collapsed = selection.is_collapsed();
delete_the_selection(selection);
+ // INTEROP: Deleting the selection can set overrides to keep the formatting of the deleted content. Browsers keep
+ // that formatting in the new paragraph, so keep the overrides that add formatting when the caret moves to
+ // it, unless the new paragraph is of another kind, such as a div after a heading.
+ auto overrides = record_current_overrides(document);
+ auto keeps_overrides = true;
+ ScopeGuard restore_overrides = [&] {
+ if (keeps_overrides && selection.is_collapsed())
+ restore_overrides_that_add_formatting(document, overrides);
+ };
+
GC::Ref<DOM::Range> active_range = *selection.range();
GC::Ptr<DOM::Node> node = active_range->start_container();
@@ -1985,6 +1996,8 @@ bool command_insert_paragraph_action(DOM::Document& document, Utf16View)
// 21. Otherwise, let new container name be the local name of container.
return container_element.local_name();
}();
+ if (new_container_name != container_element.local_name())
+ keeps_overrides = false;
// 22. Let new container be the result of calling createElement(new container name) on the context object.
auto new_container = MUST(DOM::create_element(document, new_container_name, Namespace::HTML));
diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp
index 06a65b68763..210d06cb7e7 100644
--- a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp
+++ b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp
@@ -408,8 +408,28 @@ void canonicalize_collapsed_selection_for_editing(Selection& selection)
Web::Selection::CaretNavigator navigator(selection.document());
auto canonical_location = navigator.canonical_location_for_editing({ range->start_container(), range->start_offset(), selection.focus_affinity() });
- if (canonical_location.node != range->start_container() || canonical_location.offset != range->start_offset())
- MUST(selection.collapse(canonical_location.node, canonical_location.offset));
+ if (canonical_location.node == range->start_container() && canonical_location.offset == range->start_offset())
+ return;
+
+ // NB: Moving the caret unsets the overrides, but the canonical point is equivalent to the old one. Keep the
+ // overrides that add formatting, such as the ones that deleting the selection set to keep the formatting of
+ // deleted content.
+ auto& document = *selection.document();
+ auto overrides = record_current_overrides(document);
+ MUST(selection.collapse(canonical_location.node, canonical_location.offset));
+ restore_overrides_that_add_formatting(document, overrides);
+}
+
+void restore_overrides_that_add_formatting(DOM::Document& document, Vector<RecordedOverride> const& overrides)
+{
+ for (auto const& override : overrides) {
+ override.value.visit(
+ [&](bool value) {
+ if (value)
+ document.set_command_state_override(override.command, value);
+ },
+ [&](Utf16String const& value) { document.set_command_value_override(override.command, value); });
+ }
}
enum class PreserveLeadingSpaceAcrossNodeBoundary {
@@ -1268,6 +1288,17 @@ void delete_the_selection(Selection& selection, bool block_merging, bool strip_w
// 19. Record current states and values, and let overrides be the result.
auto overrides = record_current_states_and_values(document);
+ // INTEROP: Browsers keep the formatting of the deleted content for the text that is inserted next only if the
+ // selection starts with text. They do not keep it if it starts with an image or an empty element.
+ GC::Ptr<DOM::Node> first_leaf = start.node;
+ if (!is<DOM::Text>(*start.node) || start.offset == start.node->length()) {
+ first_leaf = start.node->child_at_index(start.offset);
+ while (first_leaf && first_leaf->first_child())
+ first_leaf = first_leaf->first_child();
+ }
+ if (first_leaf && !is<DOM::Text>(*first_leaf))
+ overrides.clear();
+
// 21. If start node and end node are the same, and start node is an editable Text node:
if (start.node == end.node && is<DOM::Text>(*start.node) && start.node->is_editable()) {
// 1. Call deleteData(start offset, end offset − start offset) on start node.
diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.h b/Libraries/LibWeb/Editing/Internal/Algorithms.h
index 75330cb0623..da25fc5ff7d 100644
--- a/Libraries/LibWeb/Editing/Internal/Algorithms.h
+++ b/Libraries/LibWeb/Editing/Internal/Algorithms.h
@@ -129,6 +129,7 @@ bool precedes_a_line_break(GC::Ref<DOM::Node>);
Optional<DOM::BoundaryPoint> previous_equivalent_point(DOM::BoundaryPoint);
void push_down_values(Utf16FlyString const&, GC::Ref<DOM::Node>, Optional<Utf16View>);
Vector<RecordedOverride> record_current_overrides(DOM::Document const&);
+void restore_overrides_that_add_formatting(DOM::Document&, Vector<RecordedOverride> const&);
Vector<RecordedOverride> record_current_states_and_values(DOM::Document const&);
GC::ConservativeVector<RecordedNodeValue> record_the_values_of_nodes(Vector<GC::Ref<DOM::Node>> const&);
void remove_extraneous_line_breaks_at_the_end_of_node(GC::Ref<DOM::Node>);
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&child=b.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&child=b.txt
index cce146b110b..3638a65d1e2 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&child=b.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&child=b.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 30 tests
-8 Pass
-22 Fail
+12 Pass
+18 Fail
Pass Testing inserting content around link element
Pass Inserting "XY" after setting caret position to middle of a link containing <b> (Selection.collapse) in <p><a href="about:blank"><b>[]abc</b></a></p>
Pass Inserting "XY" after setting caret position to middle of a link containing <b> (Selection.addRange) in <p><a href="about:blank"><b>[]abc</b></a></p>
@@ -22,10 +22,10 @@ Pass Inserting "XY" after deleting last character of a link containing <b> (Back
Pass Inserting "XY" after deleting last character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>abcd[]</b></a></p>
Pass Inserting "XY" after deleting last character of a link containing <b> (Delete) in <p><a href="about:blank"><b>abc[]d</b></a></p>
Pass Inserting "XY" after deleting last character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>abc[]d</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (Backspace) in <p><a href="about:blank"><b>z[]abc</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>z[]abc</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (Delete) in <p><a href="about:blank"><b>[]zabc</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[]zabc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (Backspace) in <p><a href="about:blank"><b>z[]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>z[]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (Delete) in <p><a href="about:blank"><b>[]zabc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[]zabc</b></a></p>
Fail Inserting "XY" at start of a link which has a class for bold text in <p><a href="about:blank" class="bold"><b>[]abc</b></a></p>
Fail Inserting "XY" at end of a link which has a class for bold text in <p><a href="about:blank" class="bold"><b>abc[]</b></a></p>
Fail Inserting "XY" at start of a link which has inline style for bold text in <p><a href="about:blank" style="font-weight: bold"><b>[]abc</b></a></p>
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
index eb40bd3d156..17b18dcc7a5 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 30 tests
-8 Pass
-22 Fail
+12 Pass
+18 Fail
Pass Testing inserting content around link element
Pass Inserting "XY" after setting caret position to middle of a link in <b> and containing <i> (Selection.collapse) in <p><b><a href="about:blank"><i>[]abc</i></a></b></p>
Pass Inserting "XY" after setting caret position to middle of a link in <b> and containing <i> (Selection.addRange) in <p><b><a href="about:blank"><i>[]abc</i></a></b></p>
@@ -22,10 +22,10 @@ Pass Inserting "XY" after deleting last character of a link in <b> and containin
Pass Inserting "XY" after deleting last character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>abcd[]</i></a></b></p>
Pass Inserting "XY" after deleting last character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>abc[]d</i></a></b></p>
Pass Inserting "XY" after deleting last character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>abc[]d</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
Fail Inserting "XY" at start of a link which has a class for bold text in <p><b><a href="about:blank" class="bold"><i>[]abc</i></a></b></p>
Fail Inserting "XY" at end of a link which has a class for bold text in <p><b><a href="about:blank" class="bold"><i>abc[]</i></a></b></p>
Fail Inserting "XY" at start of a link which has inline style for bold text in <p><b><a href="about:blank" style="font-weight: bold"><i>[]abc</i></a></b></p>
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&child=b.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&child=b.txt
index 8ad8fc8ff43..48064be333f 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&child=b.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&child=b.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 30 tests
-5 Pass
-25 Fail
+7 Pass
+23 Fail
Pass Testing inserting content around link element
Pass Inserting "XY" after setting caret position to middle of a link containing <b> (Selection.collapse) in <p><a href="about:blank"><b>[]abc</b></a></p>
Pass Inserting "XY" after setting caret position to middle of a link containing <b> (Selection.addRange) in <p><a href="about:blank"><b>[]abc</b></a></p>
@@ -23,9 +23,9 @@ Pass Inserting "XY" after deleting last character of a link containing <b> (exec
Fail Inserting "XY" after deleting last character of a link containing <b> (Delete) in <p><a href="about:blank"><b>abc[]d</b></a></p>
Pass Inserting "XY" after deleting last character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>abc[]d</b></a></p>
Fail Inserting "XY" after deleting first character of a link containing <b> (Backspace) in <p><a href="about:blank"><b>z[]abc</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>z[]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>z[]abc</b></a></p>
Fail Inserting "XY" after deleting first character of a link containing <b> (Delete) in <p><a href="about:blank"><b>[]zabc</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[]zabc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[]zabc</b></a></p>
Fail Inserting "XY" at start of a link which has a class for bold text in <p><a href="about:blank" class="bold"><b>[]abc</b></a></p>
Fail Inserting "XY" at end of a link which has a class for bold text in <p><a href="about:blank" class="bold"><b>abc[]</b></a></p>
Fail Inserting "XY" at start of a link which has inline style for bold text in <p><a href="about:blank" style="font-weight: bold"><b>[]abc</b></a></p>
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
index 6bdfd6d1583..a79d63f5d88 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 30 tests
-5 Pass
-25 Fail
+7 Pass
+23 Fail
Pass Testing inserting content around link element
Pass Inserting "XY" after setting caret position to middle of a link in <b> and containing <i> (Selection.collapse) in <p><b><a href="about:blank"><i>[]abc</i></a></b></p>
Pass Inserting "XY" after setting caret position to middle of a link in <b> and containing <i> (Selection.addRange) in <p><b><a href="about:blank"><i>[]abc</i></a></b></p>
@@ -23,9 +23,9 @@ Pass Inserting "XY" after deleting last character of a link in <b> and containin
Fail Inserting "XY" after deleting last character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>abc[]d</i></a></b></p>
Pass Inserting "XY" after deleting last character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>abc[]d</i></a></b></p>
Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>z[]abc</i></a></b></p>
Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[]zabc</i></a></b></p>
Fail Inserting "XY" at start of a link which has a class for bold text in <p><b><a href="about:blank" class="bold"><i>[]abc</i></a></b></p>
Fail Inserting "XY" at end of a link which has a class for bold text in <p><b><a href="about:blank" class="bold"><i>abc[]</i></a></b></p>
Fail Inserting "XY" at start of a link which has inline style for bold text in <p><b><a href="about:blank" style="font-weight: bold"><i>[]abc</i></a></b></p>
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&child=b.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&child=b.txt
index e0794cdead0..5d032ae0f3d 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&child=b.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&child=b.txt
@@ -2,26 +2,26 @@ Harness status: OK
Found 21 tests
-15 Pass
-6 Fail
+19 Pass
+2 Fail
Pass Testing inserting content at non-collapsed selection around link element
Pass Inserting "XY" after deleting first character of a link containing <b> (Direct typing) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (Direct typing) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Fail Inserting "XY" after deleting text after middle of a link containing <b> (Direct typing) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (Direct typing) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (Backspace) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (Backspace) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (Backspace) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (Backspace) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (Backspace) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (Delete) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (Delete) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (Delete) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (Delete) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (Delete) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (execCommand("delete")) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (execCommand("forwarddelete")) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
index 32fd19fe23a..45aafc90180 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=ContentEditable&parent=b&child=i.txt
@@ -2,26 +2,26 @@ Harness status: OK
Found 21 tests
-15 Pass
-6 Fail
+19 Pass
+2 Fail
Pass Testing inserting content at non-collapsed selection around link element
Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (Direct typing) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (Direct typing) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Fail Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (Direct typing) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (Direct typing) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (Backspace) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (Backspace) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (Delete) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (execCommand("delete")) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&child=b.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&child=b.txt
index 77a8157bf3a..311d11bd1bd 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&child=b.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&child=b.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 21 tests
-7 Pass
-14 Fail
+9 Pass
+12 Fail
Pass Testing inserting content at non-collapsed selection around link element
Fail Inserting "XY" after deleting first character of a link containing <b> (Direct typing) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (Direct typing) in <p><a href="about:blank"><b>abc[d]</b></a></p>
@@ -17,11 +17,11 @@ Fail Inserting "XY" after deleting first character of a link containing <b> (Del
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (Delete) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Fail Inserting "XY" after deleting text after middle of a link containing <b> (Delete) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Fail Inserting "XY" after deleting text before middle of a link containing <b> (Delete) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (execCommand("delete")) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (execCommand("delete")) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
-Fail Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
+Pass Inserting "XY" after deleting first character of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>[z]abc</b></a></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>abc[d]</b></a></p>
Pass Inserting "XY" after deleting text after middle of a link containing <b> (execCommand("forwarddelete")) in <p><a href="about:blank"><b>ab[cd</b></a>de]f</p>
Pass Inserting "XY" after deleting text before middle of a link containing <b> (execCommand("forwarddelete")) in <p>a[bc<a href="about:blank"><b>de]f</b></a></p>
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
index 45dcb5fa1ee..9adce540ce5 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/other/typing-around-link-element-at-non-collapsed-selection.tentative@target=DesignMode&parent=b&child=i.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 21 tests
-7 Pass
-14 Fail
+9 Pass
+12 Fail
Pass Testing inserting content at non-collapsed selection around link element
Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (Direct typing) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (Direct typing) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
@@ -17,11 +17,11 @@ Fail Inserting "XY" after deleting first character of a link in <b> and containi
Fail Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Fail Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (Delete) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Fail Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (Delete) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (execCommand("delete")) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (execCommand("delete")) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
-Fail Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
+Pass Inserting "XY" after deleting first character of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>[z]abc</i></a></b></p>
Pass Inserting "XY" after deleting last character in a non-collapsed range of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>abc[d]</i></a></b></p>
Pass Inserting "XY" after deleting text after middle of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b><a href="about:blank"><i>ab[cd</i></a>de]f</b></p>
Pass Inserting "XY" after deleting text before middle of a link in <b> and containing <i> (execCommand("forwarddelete")) in <p><b>a[bc<a href="about:blank"><i>de]f</i></a></b></p>
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected] b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
index cef79c8b56e..409599f97fa 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
@@ -2,8 +2,8 @@ Harness status: OK
Found 1000 tests
-964 Pass
-36 Fail
+970 Pass
+30 Fail
Pass [["underline","","first application"],["underline","","second application"],["createlink","http://www.google.com/"],["inserttext","a"]] "foo[]bar" queryCommandValue("inserttext") before
Pass [["underline","","first application"],["underline","","second application"],["createlink","http://www.google.com/"],["inserttext","a"]] "foo[]bar" queryCommandIndeterm("inserttext") after
Pass [["underline","","first application"],["underline","","second application"],["createlink","http://www.google.com/"],["inserttext","a"]] "foo[]bar" queryCommandState("inserttext") after
@@ -197,7 +197,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<s>[bar]</s>baz" queryCommandValue("
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" queryCommandValue("delete") before
@@ -213,7 +213,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar]</sub>baz" queryCommandVal
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar]</sup>baz" queryCommandValue("delete") before
@@ -309,7 +309,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<font color=#0000FF>[bar]</font>baz"
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar]</span>baz" queryCommandValue("delete") before
@@ -485,7 +485,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<sub><font size=3>[bar]</font></sub>
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar]</sub></font>baz" queryCommandValue("delete") before
@@ -901,7 +901,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<s>[bar</s>baz]" queryCommandValue("
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" queryCommandValue("delete") before
@@ -917,7 +917,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<sub>[bar</sub>baz]" queryCommandVal
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<sup>[bar</sup>baz]" queryCommandValue("delete") before
diff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected] b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
index 4a643189f9e..1849dfdc4a0 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]
@@ -2,8 +2,8 @@ Harness status: OK
Found 1092 tests
-1001 Pass
-91 Fail
+1014 Pass
+78 Fail
Pass [["delete",""],["inserttext","a"]] "foo<font color=#0000FF>[bar</font>baz]" queryCommandIndeterm("inserttext") before
Pass [["delete",""],["inserttext","a"]] "foo<font color=#0000FF>[bar</font>baz]" queryCommandState("inserttext") before
Pass [["delete",""],["inserttext","a"]] "foo<font color=#0000FF>[bar</font>baz]" queryCommandValue("inserttext") before
@@ -13,7 +13,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<font color=#0000FF>[bar</font>baz]"
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<span style=background-color:#00FFFF>[bar</span>baz]" queryCommandValue("delete") before
@@ -189,7 +189,7 @@ Pass [["delete",""],["inserttext","a"]] "foo<sub><font size=3>[bar</font></sub>b
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]": execCommand("inserttext", false, "a") return value
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" checks for modifications to non-editable content
-Fail [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" compare innerHTML
+Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" compare innerHTML
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" queryCommandIndeterm("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" queryCommandState("delete") before
Pass [["delete",""],["inserttext","a"]] "foo<font size=3><sub>[bar</sub></font>baz]" queryCommandValue("delete") before
@@ -233,12 +233,12 @@ Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[de
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("delete", false, "") return value
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("inserttext", false, "d") return value
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" checks for modifications to non-editable content
-Fail [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
+Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") before
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") before
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") before
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") after
-Fail [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
+Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
Pass [["styleWithCSS","false"],["delete",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") after
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","a"]] "<div><b>[abc]</b></div>": execCommand("styleWithCSS", false, "false") return value
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","a"]] "<div><b>[abc]</b></div>": execCommand("delete", false, "") return value
@@ -257,12 +257,12 @@ Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("insertparagraph", false, "") return value
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("inserttext", false, "d") return value
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" checks for modifications to non-editable content
-Fail [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
+Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") before
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") before
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") before
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") after
-Fail [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
+Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
Pass [["styleWithCSS","false"],["delete",""],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") after
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","a"]] "<div><b>[abc]</b></div>": execCommand("styleWithCSS", false, "false") return value
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","a"]] "<div><b>[abc]</b></div>": execCommand("insertparagraph", false, "") return value
@@ -279,12 +279,12 @@ Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("insertparagraph", false, "") return value
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>": execCommand("inserttext", false, "d") return value
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" checks for modifications to non-editable content
-Fail [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
+Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" compare innerHTML
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") before
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") before
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") before
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandIndeterm("bold") after
-Fail [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
+Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandState("bold") after
Pass [["styleWithCSS","false"],["insertparagraph",""],["inserttext","d"]] "<div>abc<b>[def]</b></div>" queryCommandValue("bold") after
Pass [["styleWithCSS","false"],["bold",""],["inserttext","d"]] "<div><b>abc[]<br></b></div>": execCommand("styleWithCSS", false, "false") return value
Pass [["styleWithCSS","false"],["bold",""],["inserttext","d"]] "<div><b>abc[]<br></b></div>": execCommand("bold", false, "") return value
@@ -357,31 +357,31 @@ Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext"
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def</b>]ghi": execCommand("inserttext", false, "e") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def</b>]ghi": execCommand("inserttext", false, "f") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def</b>]ghi" checks for modifications to non-editable content
-Fail [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def</b>]ghi" compare innerHTML
+Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def</b>]ghi" compare innerHTML
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi": execCommand("insertparagraph", false, "") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi": execCommand("inserttext", false, "d") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi": execCommand("inserttext", false, "e") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi": execCommand("inserttext", false, "f") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi" checks for modifications to non-editable content
-Fail [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi" compare innerHTML
+Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc[<b>def]</b>ghi" compare innerHTML
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi": execCommand("insertparagraph", false, "") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi": execCommand("inserttext", false, "d") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi": execCommand("inserttext", false, "e") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi": execCommand("inserttext", false, "f") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi" checks for modifications to non-editable content
-Fail [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi" compare innerHTML
+Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>[def]</b>ghi" compare innerHTML
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi": execCommand("insertparagraph", false, "") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi": execCommand("inserttext", false, "d") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi": execCommand("inserttext", false, "e") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi": execCommand("inserttext", false, "f") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi" checks for modifications to non-editable content
-Fail [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi" compare innerHTML
+Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc<b>{def}</b>ghi" compare innerHTML
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi": execCommand("insertparagraph", false, "") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi": execCommand("inserttext", false, "d") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi": execCommand("inserttext", false, "e") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi": execCommand("inserttext", false, "f") return value
Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi" checks for modifications to non-editable content
-Fail [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi" compare innerHTML
+Pass [["insertparagraph",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "abc{<b>def</b>}ghi" compare innerHTML
Pass [["delete",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "<div>abc{<b><i>def</i></b>}ghi</div>": execCommand("delete", false, "") return value
Pass [["delete",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "<div>abc{<b><i>def</i></b>}ghi</div>": execCommand("inserttext", false, "d") return value
Pass [["delete",""],["inserttext","d"],["inserttext","e"],["inserttext","f"]] "<div>abc{<b><i>def</i></b>}ghi</div>": execCommand("inserttext", false, "e") return value