Truly independent web browser
LibWeb: Root the fieldset ancestors of a SubtreeInsertionScope
Shannon Booth81b6d104b2bf
diff --git a/Libraries/LibWeb/DOM/SubtreeInsertionScope.cpp b/Libraries/LibWeb/DOM/SubtreeInsertionScope.cppindex cdb9812c64a..e569ec1c216 100644--- a/Libraries/LibWeb/DOM/SubtreeInsertionScope.cpp+++ b/Libraries/LibWeb/DOM/SubtreeInsertionScope.cpp@@ -43,7 +43,7 @@ GC::Ptr<HTML::HTMLFormElement> SubtreeInsertionScope::nearest_inclusive_form_ancReadonlySpan<GC::Ref<Element>> SubtreeInsertionScope::inclusive_fieldset_ancestors_of_parent(){if (!m_inclusive_fieldset_ancestors_of_parent.has_value()) {- Vector<GC::Ref<Element>> fieldsets;+ GC::RootVector<GC::Ref<Element>> fieldsets;for (GC::Ptr<Element> element = as_if<Element>(*m_parent); element; element = element->parent_element()) {if (is<HTML::HTMLFieldSetElement>(*element))fieldsets.append(*element);diff --git a/Libraries/LibWeb/DOM/SubtreeInsertionScope.h b/Libraries/LibWeb/DOM/SubtreeInsertionScope.hindex 9b44902df58..9a81ae1223d 100644--- a/Libraries/LibWeb/DOM/SubtreeInsertionScope.h+++ b/Libraries/LibWeb/DOM/SubtreeInsertionScope.h@@ -10,6 +10,7 @@#include <AK/Optional.h>#include <AK/Vector.h>#include <LibGC/Ptr.h>+#include <LibGC/RootVector.h>#include <LibWeb/Forward.h>namespace Web::DOM {@@ -31,7 +32,7 @@ private:GC::Ref<Document> m_document;SubtreeInsertionScope* m_enclosing_scope { nullptr };Optional<GC::Ptr<HTML::HTMLFormElement>> m_nearest_inclusive_form_ancestor_of_parent;- Optional<Vector<GC::Ref<Element>>> m_inclusive_fieldset_ancestors_of_parent;+ Optional<GC::RootVector<GC::Ref<Element>>> m_inclusive_fieldset_ancestors_of_parent;};}