Truly independent web browser
LibWeb: Root the node lists of the editing wrap and indent algorithms
Shannon Boothd53e9b3a82c7
diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp b/Libraries/LibWeb/Editing/Internal/Algorithms.cppindex d5abdc7aa07..9fdc9ed2483 100644--- a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp+++ b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp@@ -2071,7 +2071,7 @@ void force_the_value(GC::Ref<DOM::Node> node, Utf16FlyString const& command, Opt}// https://w3c.github.io/editing/docs/execCommand/#indent-void indent(Vector<GC::Ref<DOM::Node>> node_list)+void indent(GC::RootVector<GC::Ref<DOM::Node>> node_list){// 1. If node list is empty, do nothing and abort these steps.if (node_list.is_empty())@@ -4998,7 +4998,7 @@ bool values_are_loosely_equivalent(Utf16FlyString const& command, Optional<Utf16// https://w3c.github.io/editing/docs/execCommand/#wrapGC::Ptr<DOM::Node> wrap(- Vector<GC::Ref<DOM::Node>> node_list,+ GC::RootVector<GC::Ref<DOM::Node>> node_list,Function<bool(GC::Ref<DOM::Node>)> sibling_criteria,Function<GC::Ptr<DOM::Node>()> new_parent_instructions){diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.h b/Libraries/LibWeb/Editing/Internal/Algorithms.hindex 08ebed00b82..8c7ee15210c 100644--- a/Libraries/LibWeb/Editing/Internal/Algorithms.h+++ b/Libraries/LibWeb/Editing/Internal/Algorithms.h@@ -8,6 +8,7 @@#include <AK/Utf16FlyString.h>#include <AK/Vector.h>+#include <LibGC/RootVector.h>#include <LibWeb/DOM/Range.h>#include <LibWeb/Forward.h>#include <LibWeb/Selection/Selection.h>@@ -70,7 +71,7 @@ DOM::BoundaryPoint first_equivalent_point(DOM::BoundaryPoint);void fix_disallowed_ancestors_of_node(GC::Ref<DOM::Node>);bool follows_a_line_break(GC::Ref<DOM::Node>);void force_the_value(GC::Ref<DOM::Node>, Utf16FlyString const&, Optional<Utf16View>);-void indent(Vector<GC::Ref<DOM::Node>>);+void indent(GC::RootVector<GC::Ref<DOM::Node>>);bool is_allowed_child_of_node(Variant<GC::Ref<DOM::Node>, Utf16FlyString> child, Variant<GC::Ref<DOM::Node>, Utf16FlyString> parent);bool is_block_boundary_point(DOM::BoundaryPoint);bool is_block_end_point(DOM::BoundaryPoint);@@ -139,7 +140,7 @@ Utf16String standard_inline_value(DOM::Document const&, Utf16FlyString const& covoid toggle_lists(DOM::Document&, Utf16FlyString const&);bool values_are_equivalent(Utf16FlyString const&, Optional<Utf16View>, Optional<Utf16View>);bool values_are_loosely_equivalent(Utf16FlyString const&, Optional<Utf16View>, Optional<Utf16View>);-GC::Ptr<DOM::Node> wrap(Vector<GC::Ref<DOM::Node>>, Function<bool(GC::Ref<DOM::Node>)> sibling_criteria, Function<GC::Ptr<DOM::Node>()> new_parent_instructions);+GC::Ptr<DOM::Node> wrap(GC::RootVector<GC::Ref<DOM::Node>>, Function<bool(GC::Ref<DOM::Node>)> sibling_criteria, Function<GC::Ptr<DOM::Node>()> new_parent_instructions);// Utility methods: