Skip to content

Truly independent web browser

LibWeb: Add SVGStringList and the SVGTests mixin

Andreas Klingc1d3f5d92005
diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt
index 9af59b9bed0..ecf15f5840c 100644
--- a/Libraries/LibWeb/CMakeLists.txt
+++ b/Libraries/LibWeb/CMakeLists.txt
@@ -933,6 +933,7 @@ set(SOURCES
SVG/SVGScriptElement.cpp
SVG/SVGSetElement.cpp
SVG/SVGStopElement.cpp
+ SVG/SVGStringList.cpp
SVG/SVGStyleElement.cpp
SVG/SVGSVGElement.cpp
SVG/SVGSwitchElement.cpp
diff --git a/Libraries/LibWeb/SVG/SVGAnimationElement.idl b/Libraries/LibWeb/SVG/SVGAnimationElement.idl
index d5377ab8e23..9a571c400c2 100644
--- a/Libraries/LibWeb/SVG/SVGAnimationElement.idl
+++ b/Libraries/LibWeb/SVG/SVGAnimationElement.idl
@@ -18,4 +18,4 @@ interface SVGAnimationElement : SVGElement {
[FIXME] undefined endElementAt(float offset);
};
-//SVGAnimationElement includes SVGTests;
+// FIXME: SVGAnimationElement includes SVGTests;
diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
index 71515d0c181..4d816e3df44 100644
--- a/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
@@ -33,6 +33,48 @@ SVGGraphicsElement::SVGGraphicsElement(DOM::Document& document, DOM::QualifiedNa
{
}
+void SVGGraphicsElement::visit_edges(Cell::Visitor& visitor)
+{
+ Base::visit_edges(visitor);
+ visitor.visit(m_required_extensions);
+ visitor.visit(m_system_language);
+}
+
+void SVGGraphicsElement::attribute_changed(Utf16FlyString const& name, Optional<Utf16String> const& old_value, Optional<Utf16String> const& value, Optional<Utf16FlyString> const& namespace_)
+{
+ Base::attribute_changed(name, old_value, value, namespace_);
+
+ // https://svgwg.org/svg2-draft/types.html#SynchronizingReflectedValues
+ // Whenever a reflected content attribute's base value changes, then the reflecting object must be synchronized,
+ // immediately after the value changed.
+ if (namespace_.has_value())
+ return;
+ if (name == AttributeNames::requiredExtensions && m_required_extensions)
+ m_required_extensions->synchronize();
+ else if (name == AttributeNames::systemLanguage && m_system_language)
+ m_system_language->synchronize();
+}
+
+// https://svgwg.org/svg2-draft/types.html#__svg__SVGTests__requiredExtensions
+GC::Ref<SVGStringList> SVGGraphicsElement::required_extensions_for_bindings()
+{
+ // The requiredExtensions IDL attribute reflects the ‘requiredExtensions’ content attribute.
+ // NB: The attribute's value is a set of space-separated tokens.
+ if (!m_required_extensions)
+ m_required_extensions = SVGStringList::create(*this, AttributeNames::requiredExtensions, SVGStringList::Separator::Whitespace);
+ return *m_required_extensions;
+}
+
+// https://svgwg.org/svg2-draft/types.html#__svg__SVGTests__systemLanguage
+GC::Ref<SVGStringList> SVGGraphicsElement::system_language_for_bindings()
+{
+ // The systemLanguage IDL attribute reflects the ‘systemLanguage’ content attribute.
+ // NB: The attribute's value is a set of comma-separated tokens.
+ if (!m_system_language)
+ m_system_language = SVGStringList::create(*this, AttributeNames::systemLanguage, SVGStringList::Separator::Comma);
+ return *m_system_language;
+}
+
GC::Ptr<DOM::Element> SVGGraphicsElement::resolve_url_to_element(CSS::URL const& url) const
{
// FIXME: Complete and use the entire URL, not just the fragment.
diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.h b/Libraries/LibWeb/SVG/SVGGraphicsElement.h
index fb9034a2a13..c665f38a37e 100644
--- a/Libraries/LibWeb/SVG/SVGGraphicsElement.h
+++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.h
@@ -16,6 +16,7 @@
#include <LibWeb/SVG/SVGElement.h>
#include <LibWeb/SVG/SVGFitToViewBox.h>
#include <LibWeb/SVG/SVGGradientElement.h>
+#include <LibWeb/SVG/SVGStringList.h>
#include <LibWeb/SVG/TagNames.h>
#include <LibWeb/WebIDL/DOMException.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
@@ -47,12 +48,22 @@ public:
GC::Ptr<DOM::Element> resolve_url_to_element(CSS::URL const& url) const;
+ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests
+ GC::Ref<SVGStringList> required_extensions_for_bindings();
+ GC::Ref<SVGStringList> system_language_for_bindings();
+
protected:
SVGGraphicsElement(DOM::Document&, DOM::QualifiedName);
+ virtual void visit_edges(Cell::Visitor&) override;
+ virtual void attribute_changed(Utf16FlyString const& name, Optional<Utf16String> const& old_value, Optional<Utf16String> const& value, Optional<Utf16FlyString> const& namespace_) override;
+
private:
virtual bool is_svg_graphics_element() const final { return true; }
GC::Ptr<DOM::Element> resolve_fragment_identifier_to_element(Utf16String const& fragment) const;
+
+ GC::Ptr<SVGStringList> m_required_extensions;
+ GC::Ptr<SVGStringList> m_system_language;
};
Gfx::AffineTransform transform_from_transform_list(ReadonlySpan<Transform> transform_list);
diff --git a/Libraries/LibWeb/SVG/SVGGraphicsElement.idl b/Libraries/LibWeb/SVG/SVGGraphicsElement.idl
index 5f38c39dabc..bb1d095dd11 100644
--- a/Libraries/LibWeb/SVG/SVGGraphicsElement.idl
+++ b/Libraries/LibWeb/SVG/SVGGraphicsElement.idl
@@ -14,3 +14,5 @@ interface SVGGraphicsElement : SVGElement {
DOMMatrix? getCTM();
DOMMatrix? getScreenCTM();
};
+
+SVGGraphicsElement includes SVGTests;
diff --git a/Libraries/LibWeb/SVG/SVGList.cpp b/Libraries/LibWeb/SVG/SVGList.cpp
index 8a7e393683a..64435770a50 100644
--- a/Libraries/LibWeb/SVG/SVGList.cpp
+++ b/Libraries/LibWeb/SVG/SVGList.cpp
@@ -27,7 +27,8 @@ SVGList<T>::SVGList(ReadOnlyList read_only)
template<typename T>
void SVGList<T>::visit_edges(GC::Cell::Visitor& visitor)
{
- visitor.visit(m_items);
+ if constexpr (!IsSame<T, Utf16String>)
+ visitor.visit(m_items);
}
// https://www.w3.org/TR/SVG2/types.html#__svg__SVGNameList__length
@@ -48,11 +49,13 @@ WebIDL::ExceptionOr<void> SVGList<T>::clear()
return WebIDL::NoModificationAllowedError::create("Cannot modify a read-only list"_utf16);
// 2. Detach and then remove all elements in the list.
- // FIXME: Detach items.
+ for (auto const& item : m_items)
+ detach(item);
m_items.clear();
- // FIXME: 3. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
+ // 3. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
// reserialize the reflected attribute.
+ reserialize_reflected_attribute();
return {};
}
@@ -66,19 +69,23 @@ WebIDL::ExceptionOr<T> SVGList<T>::initialize_(T new_item)
return WebIDL::NoModificationAllowedError::create("Cannot modify a read-only list"_utf16);
// 2. Detach and then remove all elements in the list.
- // FIXME: Detach items.
+ for (auto const& item : m_items)
+ detach(item);
m_items.clear();
- // FIXME: 3. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
+ // 3. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
// object of the same type as newItem and which has the same (number or length) value.
+ new_item = copy_if_not_detached(move(new_item));
- // FIXME: 4. Attach newItem to the list interface object.
+ // 4. Attach newItem to the list interface object.
+ attach(new_item);
// 5. Append newItem to this list.
m_items.append(new_item);
- // FIXME: 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
+ // 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
// reserialize the reflected attribute.
+ reserialize_reflected_attribute();
// 7. Return newItem.
return new_item;
@@ -104,8 +111,9 @@ WebIDL::ExceptionOr<T> SVGList<T>::insert_item_before(T new_item, WebIDL::Unsign
if (m_read_only == ReadOnlyList::Yes)
return WebIDL::NoModificationAllowedError::create("Cannot modify a read-only list"_utf16);
- // FIXME: 2. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
+ // 2. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
// object of the same type as newItem and which has the same (number or length) value.
+ new_item = copy_if_not_detached(move(new_item));
// 3. If index is greater than the length of the list, then set index to be the list length.
if (index > m_items.size())
@@ -114,10 +122,12 @@ WebIDL::ExceptionOr<T> SVGList<T>::insert_item_before(T new_item, WebIDL::Unsign
// 4. Insert newItem into the list at index index.
m_items.insert(index, new_item);
- // FIXME: 5. Attach newItem to the list interface object.
+ // 5. Attach newItem to the list interface object.
+ attach(new_item);
- // FIXME: 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
+ // 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
// reserialize the reflected attribute.
+ reserialize_reflected_attribute();
// 7. Return newItem.
return new_item;
@@ -135,18 +145,22 @@ WebIDL::ExceptionOr<T> SVGList<T>::replace_item(T new_item, WebIDL::UnsignedLong
if (index >= m_items.size())
return WebIDL::IndexSizeError::create("List index out of bounds"_utf16);
- // FIXME: 3. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
+ // 3. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
// object of the same type as newItem and which has the same (number or length) value.
+ new_item = copy_if_not_detached(move(new_item));
- // FIXME: 4. Detach the element in the list at index index.
+ // 4. Detach the element in the list at index index.
+ detach(m_items[index]);
// 5. Replace the element in the list at index index with newItem.
m_items[index] = new_item;
- // FIXME: 6. Attach newItem to the list interface object.
+ // 6. Attach newItem to the list interface object.
+ attach(new_item);
- // FIXME: 7. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
+ // 7. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
// reserialize the reflected attribute.
+ reserialize_reflected_attribute();
// 8. Return newItem.
return new_item;
@@ -167,11 +181,16 @@ WebIDL::ExceptionOr<T> SVGList<T>::remove_item(WebIDL::UnsignedLong index)
// 3. Let item be the list element at index index.
auto item = m_items[index];
- // FIXME: 4. Detach item.
+ // 4. Detach item.
+ detach(item);
// 5. Remove the list element at index index.
m_items.remove(index);
+ // AD-HOC: The spec does not reserialize the reflected attribute here, which would leave the attribute out of sync
+ // with the list.
+ reserialize_reflected_attribute();
+
// 6. Return item.
return item;
}
@@ -184,8 +203,9 @@ WebIDL::ExceptionOr<T> SVGList<T>::append_item(T new_item)
if (m_read_only == ReadOnlyList::Yes)
return WebIDL::NoModificationAllowedError::create("Cannot modify a read-only list"_utf16);
- // FIXME: 2. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
+ // 2. If newItem is an object type, and newItem is not a detached object, then set newItem to be a newly created
// object of the same type as newItem and which has the same (number or length) value.
+ new_item = copy_if_not_detached(move(new_item));
// 3. Let index be the length of the list.
// AD-HOC: No, this is unused.
@@ -193,10 +213,12 @@ WebIDL::ExceptionOr<T> SVGList<T>::append_item(T new_item)
// 4. Append newItem to the end of the list.
m_items.append(new_item);
- // FIXME: 5. Attach newItem to the list interface object.
+ // 5. Attach newItem to the list interface object.
+ attach(new_item);
- // FIXME: 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
+ // 6. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then
// reserialize the reflected attribute.
+ reserialize_reflected_attribute();
// 7. Return newItem.
return new_item;
@@ -205,5 +227,6 @@ WebIDL::ExceptionOr<T> SVGList<T>::append_item(T new_item)
template class SVGList<GC::Ref<SVGLength>>;
template class SVGList<GC::Ref<SVGNumber>>;
template class SVGList<GC::Ref<SVGTransform>>;
+template class SVGList<Utf16String>;
}
diff --git a/Libraries/LibWeb/SVG/SVGList.h b/Libraries/LibWeb/SVG/SVGList.h
index f03389a0dd8..ae7a590bfc3 100644
--- a/Libraries/LibWeb/SVG/SVGList.h
+++ b/Libraries/LibWeb/SVG/SVGList.h
@@ -48,6 +48,21 @@ protected:
ReadOnlyList read_only() const { return m_read_only; }
+ // https://svgwg.org/svg2-draft/types.html#TermAttach
+ virtual void attach(T const&) { }
+
+ // https://svgwg.org/svg2-draft/types.html#TermDetach
+ virtual void detach(T const&) { }
+
+ // If newItem is an object type, and newItem is not a detached object, then a newly created object of the same type
+ // as newItem and which has the same value. Otherwise, newItem.
+ virtual T copy_if_not_detached(T new_item) { return new_item; }
+
+ // https://svgwg.org/svg2-draft/types.html#TermReserialize
+ virtual void reserialize_reflected_attribute() { }
+
+ Vector<T>& mutable_items() { return m_items; }
+
private:
Vector<T> m_items;
diff --git a/Libraries/LibWeb/SVG/SVGStringList.cpp b/Libraries/LibWeb/SVG/SVGStringList.cpp
new file mode 100644
index 00000000000..b00e508e5de
--- /dev/null
+++ b/Libraries/LibWeb/SVG/SVGStringList.cpp
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <AK/TemporaryChange.h>
+#include <AK/Utf16StringBuilder.h>
+#include <LibGC/Heap.h>
+#include <LibWeb/SVG/SVGElement.h>
+#include <LibWeb/SVG/SVGStringList.h>
+#include <LibWebCommon/Infra/CharacterTypes.h>
+
+namespace Web::SVG {
+
+GC_DEFINE_ALLOCATOR(SVGStringList);
+
+GC::Ref<SVGStringList> SVGStringList::create(GC::Ref<SVGElement> element, Utf16FlyString reflected_attribute, Separator separator)
+{
+ return GC::Heap::the().allocate<SVGStringList>(element, move(reflected_attribute), separator);
+}
+
+SVGStringList::SVGStringList(GC::Ref<SVGElement> element, Utf16FlyString reflected_attribute, Separator separator)
+ : SVGList(ReadOnlyList::No)
+ , m_element(element)
+ , m_reflected_attribute(move(reflected_attribute))
+ , m_separator(separator)
+{
+ synchronize();
+}
+
+void SVGStringList::visit_edges(Visitor& visitor)
+{
+ Base::visit_edges(visitor);
+ visitor.visit(m_element);
+}
+
+Vector<Utf16String> SVGStringList::parse(Utf16View input, Separator separator)
+{
+ Vector<Utf16String> strings;
+ if (separator == Separator::Whitespace) {
+ // https://infra.spec.whatwg.org/#split-on-ascii-whitespace
+ size_t position = 0;
+ auto length = input.length_in_code_units();
+ auto is_ascii_whitespace = [&](size_t index) { return Infra::ASCII_WHITESPACE.contains(static_cast<u32>(input.code_unit_at(index))); };
+ while (position < length) {
+ while (position < length && is_ascii_whitespace(position))
+ ++position;
+ auto start = position;
+ while (position < length && !is_ascii_whitespace(position))
+ ++position;
+ if (position > start)
+ strings.append(Utf16String::from_utf16(input.substring_view(start, position - start)));
+ }
+ return strings;
+ }
+
+ // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#comma-separated-tokens
+ // A set of comma-separated tokens is a string containing zero or more tokens each separated from the next by a
+ // single U+002C COMMA character (,), where tokens consist of any string of zero or more characters, neither
+ // beginning nor ending with ASCII whitespace, nor containing any U+002C COMMA characters (,), and optionally
+ // surrounded by ASCII whitespace.
+ // NB: This strictly splits the string on commas, and strips the ASCII whitespace around each token.
+ size_t token_start = 0;
+ for (size_t position = 0; position <= input.length_in_code_units(); ++position) {
+ if (position < input.length_in_code_units() && input.code_unit_at(position) != ',')
+ continue;
+ strings.append(Utf16String::from_utf16(input.substring_view(token_start, position - token_start).trim(Infra::ASCII_WHITESPACE)));
+ token_start = position + 1;
+ }
+ return strings;
+}
+
+// https://svgwg.org/svg2-draft/types.html#TermSynchronizeList
+void SVGStringList::synchronize()
+{
+ // NB: The list does not need to be synchronized with a value that it has just reserialized itself.
+ if (m_is_reserializing)
+ return;
+
+ // 1. Let value be the base value of the reflected content attribute (using the attribute's initial value if it is
+ // not present or invalid).
+ // NB: The initial value of every attribute reflected by an SVGStringList is the empty list.
+ auto value = m_element->attribute(m_reflected_attribute);
+
+ // 5. Otherwise, the list element type is DOMString:
+ // 1. Replace the list with a new list consisting of the values in value.
+ mutable_items() = value.has_value() ? parse(*value, m_separator) : Vector<Utf16String> {};
+}
+
+// https://svgwg.org/svg2-draft/types.html#TermReserialize
+void SVGStringList::reserialize_reflected_attribute()
+{
+ // 1. Let elements be the list of values in value.
+ // 2. Let serialized elements be a list of strings, where each string is formed based on the corresponding value in
+ // elements and its type:
+ // a DOMString: The string is the DOMString's value itself.
+ // 3. Set the content attribute to a string consisting of the strings in serialized elements joined and separated by
+ // single U+0020 SPACE characters.
+ // AD-HOC: Strings of an attribute that is a set of comma-separated tokens are joined with commas instead, so that
+ // parsing the attribute again returns the same list.
+ Utf16StringBuilder builder;
+ bool first = true;
+ for (auto const& item : items()) {
+ if (!first)
+ builder.append_ascii(m_separator == Separator::Comma ? ", "sv : " "sv);
+ first = false;
+ builder.append(item);
+ }
+
+ TemporaryChange change { m_is_reserializing, true };
+ m_element->set_attribute_value(m_reflected_attribute, builder.to_string());
+}
+
+}
diff --git a/Libraries/LibWeb/SVG/SVGStringList.h b/Libraries/LibWeb/SVG/SVGStringList.h
new file mode 100644
index 00000000000..e5f767b8f95
--- /dev/null
+++ b/Libraries/LibWeb/SVG/SVGStringList.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Utf16FlyString.h>
+#include <AK/Utf16String.h>
+#include <LibWeb/Bindings/Wrappable.h>
+#include <LibWeb/Forward.h>
+#include <LibWeb/SVG/SVGList.h>
+
+namespace Web::SVG {
+
+// https://svgwg.org/svg2-draft/types.html#InterfaceSVGStringList
+class SVGStringList final
+ : public Bindings::GCAllocatedWrappable
+ , public SVGList<Utf16String> {
+ WEB_WRAPPABLE(SVGStringList, Bindings::GCAllocatedWrappable);
+ GC_DECLARE_ALLOCATOR(SVGStringList);
+
+public:
+ // How the reflected attribute separates its strings.
+ enum class Separator : u8 {
+ Comma,
+ Whitespace,
+ };
+
+ [[nodiscard]] static GC::Ref<SVGStringList> create(GC::Ref<SVGElement>, Utf16FlyString reflected_attribute, Separator);
+ virtual ~SVGStringList() override = default;
+
+ static Vector<Utf16String> parse(Utf16View, Separator);
+
+ // https://svgwg.org/svg2-draft/types.html#TermSynchronizeList
+ void synchronize();
+
+private:
+ SVGStringList(GC::Ref<SVGElement>, Utf16FlyString reflected_attribute, Separator);
+
+ virtual void visit_edges(Visitor&) override;
+
+ virtual void reserialize_reflected_attribute() override;
+
+ GC::Ref<SVGElement> m_element;
+ Utf16FlyString m_reflected_attribute;
+ Separator m_separator;
+ bool m_is_reserializing { false };
+};
+
+}
diff --git a/Libraries/LibWeb/SVG/SVGStringList.idl b/Libraries/LibWeb/SVG/SVGStringList.idl
new file mode 100644
index 00000000000..05576e81041
--- /dev/null
+++ b/Libraries/LibWeb/SVG/SVGStringList.idl
@@ -0,0 +1,16 @@
+// https://svgwg.org/svg2-draft/types.html#InterfaceSVGStringList
+[Exposed=Window]
+interface SVGStringList {
+
+ readonly attribute unsigned long length;
+ readonly attribute unsigned long numberOfItems;
+
+ undefined clear();
+ DOMString initialize(DOMString newItem);
+ getter DOMString getItem(unsigned long index);
+ DOMString insertItemBefore(DOMString newItem, unsigned long index);
+ DOMString replaceItem(DOMString newItem, unsigned long index);
+ DOMString removeItem(unsigned long index);
+ DOMString appendItem(DOMString newItem);
+ setter undefined (unsigned long index, DOMString newItem);
+};
diff --git a/Libraries/LibWeb/SVG/SVGTests.idl b/Libraries/LibWeb/SVG/SVGTests.idl
new file mode 100644
index 00000000000..b65a02e088e
--- /dev/null
+++ b/Libraries/LibWeb/SVG/SVGTests.idl
@@ -0,0 +1,5 @@
+// https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests
+interface mixin SVGTests {
+ [SameObject, ImplementedAs=required_extensions_for_bindings] readonly attribute SVGStringList requiredExtensions;
+ [SameObject, ImplementedAs=system_language_for_bindings] readonly attribute SVGStringList systemLanguage;
+};
diff --git a/Libraries/LibWeb/idl_files.cmake b/Libraries/LibWeb/idl_files.cmake
index 5cf32f50193..56c439ba0f8 100644
--- a/Libraries/LibWeb/idl_files.cmake
+++ b/Libraries/LibWeb/idl_files.cmake
@@ -568,10 +568,12 @@ libweb_js_bindings(SVG/SVGRectElement)
libweb_js_bindings(SVG/SVGScriptElement)
libweb_js_bindings(SVG/SVGSetElement)
libweb_js_bindings(SVG/SVGStopElement)
+libweb_js_bindings(SVG/SVGStringList)
libweb_js_bindings(SVG/SVGStyleElement)
libweb_js_bindings(SVG/SVGSVGElement)
libweb_js_bindings(SVG/SVGSwitchElement)
libweb_js_bindings(SVG/SVGSymbolElement)
+libweb_js_bindings(SVG/SVGTests)
libweb_js_bindings(SVG/SVGTextContentElement)
libweb_js_bindings(SVG/SVGTextElement)
libweb_js_bindings(SVG/SVGTextPathElement)
diff --git a/Meta/Generators/libweb_bindings/named_and_indexed_properties.py b/Meta/Generators/libweb_bindings/named_and_indexed_properties.py
index 861af9ef1bf..e51cde2faff 100644
--- a/Meta/Generators/libweb_bindings/named_and_indexed_properties.py
+++ b/Meta/Generators/libweb_bindings/named_and_indexed_properties.py
@@ -169,7 +169,7 @@ def indexed_property_getter_value_mode(interface: Interface) -> str:
return "empty_string"
if interface.name in ("CSSUnparsedValue", "DOMStringList", "DOMTokenList", "MediaList"):
return "optional"
- if interface.name in ("SVGLengthList", "SVGNumberList", "SVGTransformList"):
+ if interface.name in ("SVGLengthList", "SVGNumberList", "SVGStringList", "SVGTransformList"):
return "svg_list"
if interface.name in ("SourceBufferList",):
return "value"
@@ -293,7 +293,7 @@ def indexed_property_setter_call(interface: Interface, operation: SpecialOperati
return f"impl.set_value_of_indexed_property(index, {value_name})"
if interface.name in ("HTMLOptionsCollection", "HTMLSelectElement"):
return f"impl.set_value_of_indexed_property(index, {value_name})"
- if interface.name in ("SVGLengthList", "SVGNumberList", "SVGTransformList"):
+ if interface.name in ("SVGLengthList", "SVGNumberList", "SVGStringList", "SVGTransformList"):
return f"impl.replace_item({value_name}, index)"
return f"impl.{hook_name}(index, {value_name})"
@@ -345,6 +345,8 @@ def write_indexed_property_setter_implementation(
value_parameter = operation.parameters[1]
value_name = "idl_value"
call = indexed_property_setter_call(interface, operation, hook_name)
+ # SVG lists implement the setter with replaceItem(), whose returned item the setter does not need.
+ discard = "(void)" if call.startswith("impl.replace_item(") else ""
if interface.name in ("HTMLOptionsCollection", "HTMLSelectElement"):
includes.add("LibWeb/DOM/Element.h")
@@ -375,7 +377,7 @@ def write_indexed_property_setter_implementation(
{{
auto& vm = realm.vm();
auto& impl = wrapped_implementation_of<{fully_qualified_name_for_interface(interface)}>(wrapper);
-{conversion_steps} TRY({call});
+{conversion_steps} {discard}TRY({call});
return {{}};
}}
diff --git a/Tests/LibWeb/Text/expected/all-window-properties.txt b/Tests/LibWeb/Text/expected/all-window-properties.txt
index eb4820f77ef..a164e0579cb 100644
--- a/Tests/LibWeb/Text/expected/all-window-properties.txt
+++ b/Tests/LibWeb/Text/expected/all-window-properties.txt
@@ -478,6 +478,7 @@ SVGSVGElement
SVGScriptElement
SVGSetElement
SVGStopElement
+SVGStringList
SVGStyleElement
SVGSwitchElement
SVGSymbolElement
diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt
index 615c7023ba8..8d1b3d4f854 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 1780 tests
-1400 Pass
-380 Fail
+1470 Pass
+310 Fail
Pass idl_test setup
Pass idl_test validation
Pass Partial interface Document: original interface defined
@@ -74,8 +74,8 @@ Pass SVGGraphicsElement interface: attribute transform
Pass SVGGraphicsElement interface: operation getBBox(optional SVGBoundingBoxOptions)
Pass SVGGraphicsElement interface: operation getCTM()
Pass SVGGraphicsElement interface: operation getScreenCTM()
-Fail SVGGraphicsElement interface: attribute requiredExtensions
-Fail SVGGraphicsElement interface: attribute systemLanguage
+Pass SVGGraphicsElement interface: attribute requiredExtensions
+Pass SVGGraphicsElement interface: attribute systemLanguage
Pass SVGGeometryElement interface: existence and properties of interface object
Pass SVGGeometryElement interface object length
Pass SVGGeometryElement interface object name
@@ -236,38 +236,38 @@ Pass SVGLengthList interface: operation insertItemBefore(SVGLength, unsigned lon
Pass SVGLengthList interface: operation replaceItem(SVGLength, unsigned long)
Pass SVGLengthList interface: operation removeItem(unsigned long)
Pass SVGLengthList interface: operation appendItem(SVGLength)
-Fail SVGStringList interface: existence and properties of interface object
-Fail SVGStringList interface object length
-Fail SVGStringList interface object name
-Fail SVGStringList interface: existence and properties of interface prototype object
-Fail SVGStringList interface: existence and properties of interface prototype object's "constructor" property
-Fail SVGStringList interface: existence and properties of interface prototype object's @@unscopables property
-Fail SVGStringList interface: attribute length
-Fail SVGStringList interface: attribute numberOfItems
-Fail SVGStringList interface: operation clear()
-Fail SVGStringList interface: operation initialize(DOMString)
-Fail SVGStringList interface: operation getItem(unsigned long)
-Fail SVGStringList interface: operation insertItemBefore(DOMString, unsigned long)
-Fail SVGStringList interface: operation replaceItem(DOMString, unsigned long)
-Fail SVGStringList interface: operation removeItem(unsigned long)
-Fail SVGStringList interface: operation appendItem(DOMString)
-Fail SVGStringList must be primary interface of objects.a.requiredExtensions
-Fail Stringification of objects.a.requiredExtensions
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "length" with the proper type
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "numberOfItems" with the proper type
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "clear()" with the proper type
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "initialize(DOMString)" with the proper type
-Fail SVGStringList interface: calling initialize(DOMString) on objects.a.requiredExtensions with too few arguments must throw TypeError
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "getItem(unsigned long)" with the proper type
-Fail SVGStringList interface: calling getItem(unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "insertItemBefore(DOMString, unsigned long)" with the proper type
-Fail SVGStringList interface: calling insertItemBefore(DOMString, unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "replaceItem(DOMString, unsigned long)" with the proper type
-Fail SVGStringList interface: calling replaceItem(DOMString, unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "removeItem(unsigned long)" with the proper type
-Fail SVGStringList interface: calling removeItem(unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
-Fail SVGStringList interface: objects.a.requiredExtensions must inherit property "appendItem(DOMString)" with the proper type
-Fail SVGStringList interface: calling appendItem(DOMString) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: existence and properties of interface object
+Pass SVGStringList interface object length
+Pass SVGStringList interface object name
+Pass SVGStringList interface: existence and properties of interface prototype object
+Pass SVGStringList interface: existence and properties of interface prototype object's "constructor" property
+Pass SVGStringList interface: existence and properties of interface prototype object's @@unscopables property
+Pass SVGStringList interface: attribute length
+Pass SVGStringList interface: attribute numberOfItems
+Pass SVGStringList interface: operation clear()
+Pass SVGStringList interface: operation initialize(DOMString)
+Pass SVGStringList interface: operation getItem(unsigned long)
+Pass SVGStringList interface: operation insertItemBefore(DOMString, unsigned long)
+Pass SVGStringList interface: operation replaceItem(DOMString, unsigned long)
+Pass SVGStringList interface: operation removeItem(unsigned long)
+Pass SVGStringList interface: operation appendItem(DOMString)
+Pass SVGStringList must be primary interface of objects.a.requiredExtensions
+Pass Stringification of objects.a.requiredExtensions
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "length" with the proper type
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "numberOfItems" with the proper type
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "clear()" with the proper type
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "initialize(DOMString)" with the proper type
+Pass SVGStringList interface: calling initialize(DOMString) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "getItem(unsigned long)" with the proper type
+Pass SVGStringList interface: calling getItem(unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "insertItemBefore(DOMString, unsigned long)" with the proper type
+Pass SVGStringList interface: calling insertItemBefore(DOMString, unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "replaceItem(DOMString, unsigned long)" with the proper type
+Pass SVGStringList interface: calling replaceItem(DOMString, unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "removeItem(unsigned long)" with the proper type
+Pass SVGStringList interface: calling removeItem(unsigned long) on objects.a.requiredExtensions with too few arguments must throw TypeError
+Pass SVGStringList interface: objects.a.requiredExtensions must inherit property "appendItem(DOMString)" with the proper type
+Pass SVGStringList interface: calling appendItem(DOMString) on objects.a.requiredExtensions with too few arguments must throw TypeError
Pass SVGAnimatedBoolean interface: existence and properties of interface object
Pass SVGAnimatedBoolean interface object length
Pass SVGAnimatedBoolean interface object name
@@ -484,8 +484,8 @@ Pass SVGGraphicsElement interface: objects.svg must inherit property "getBBox(op
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.svg with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.svg must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.svg must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.svg must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.svg must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.svg must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.svg must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.svg must inherit property "className" with the proper type
Pass SVGElement interface: objects.svg must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.svg must inherit property "viewportElement" with the proper type
@@ -504,8 +504,8 @@ Pass SVGGraphicsElement interface: objects.g must inherit property "getBBox(opti
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.g with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.g must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.g must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.g must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.g must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.g must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.g must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.g must inherit property "className" with the proper type
Pass SVGElement interface: objects.g must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.g must inherit property "viewportElement" with the proper type
@@ -524,8 +524,8 @@ Pass SVGGraphicsElement interface: objects.defs must inherit property "getBBox(o
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.defs with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.defs must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.defs must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.defs must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.defs must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.defs must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.defs must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.defs must inherit property "className" with the proper type
Pass SVGElement interface: objects.defs must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.defs must inherit property "viewportElement" with the proper type
@@ -587,8 +587,8 @@ Pass SVGGraphicsElement interface: objects.symbol must inherit property "getBBox
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.symbol with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.symbol must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.symbol must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.symbol must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.symbol must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.symbol must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.symbol must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.symbol must inherit property "className" with the proper type
Pass SVGElement interface: objects.symbol must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.symbol must inherit property "viewportElement" with the proper type
@@ -621,8 +621,8 @@ Pass SVGGraphicsElement interface: objects.use must inherit property "getBBox(op
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.use with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.use must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.use must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.use must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.use must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.use must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.use must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.use must inherit property "className" with the proper type
Pass SVGElement interface: objects.use must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.use must inherit property "viewportElement" with the proper type
@@ -654,8 +654,8 @@ Pass SVGGraphicsElement interface: objects.switch must inherit property "getBBox
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.switch with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.switch must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.switch must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.switch must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.switch must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.switch must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.switch must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.switch must inherit property "className" with the proper type
Pass SVGElement interface: objects.switch must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.switch must inherit property "viewportElement" with the proper type
@@ -883,8 +883,8 @@ Pass SVGGraphicsElement interface: objects.rect must inherit property "getBBox(o
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.rect with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.rect must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.rect must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.rect must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.rect must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.rect must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.rect must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.rect must inherit property "className" with the proper type
Pass SVGElement interface: objects.rect must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.rect must inherit property "viewportElement" with the proper type
@@ -917,8 +917,8 @@ Pass SVGGraphicsElement interface: objects.circle must inherit property "getBBox
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.circle with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.circle must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.circle must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.circle must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.circle must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.circle must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.circle must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.circle must inherit property "className" with the proper type
Pass SVGElement interface: objects.circle must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.circle must inherit property "viewportElement" with the proper type
@@ -953,8 +953,8 @@ Pass SVGGraphicsElement interface: objects.ellipse must inherit property "getBBo
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.ellipse with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.ellipse must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.ellipse must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.ellipse must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.ellipse must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.ellipse must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.ellipse must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.ellipse must inherit property "className" with the proper type
Pass SVGElement interface: objects.ellipse must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.ellipse must inherit property "viewportElement" with the proper type
@@ -989,8 +989,8 @@ Pass SVGGraphicsElement interface: objects.line must inherit property "getBBox(o
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.line with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.line must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.line must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.line must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.line must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.line must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.line must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.line must inherit property "className" with the proper type
Pass SVGElement interface: objects.line must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.line must inherit property "viewportElement" with the proper type
@@ -1053,8 +1053,8 @@ Pass SVGGraphicsElement interface: objects.polyline must inherit property "getBB
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.polyline with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.polyline must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.polyline must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.polyline must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.polyline must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.polyline must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.polyline must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.polyline must inherit property "className" with the proper type
Pass SVGElement interface: objects.polyline must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.polyline must inherit property "viewportElement" with the proper type
@@ -1085,8 +1085,8 @@ Pass SVGGraphicsElement interface: objects.polygon must inherit property "getBBo
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.polygon with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.polygon must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.polygon must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.polygon must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.polygon must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.polygon must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.polygon must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.polygon must inherit property "className" with the proper type
Pass SVGElement interface: objects.polygon must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.polygon must inherit property "viewportElement" with the proper type
@@ -1165,8 +1165,8 @@ Pass SVGGraphicsElement interface: objects.text must inherit property "getBBox(o
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.text with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.text must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.text must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.text must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.text must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.text must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.text must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.text must inherit property "className" with the proper type
Pass SVGElement interface: objects.text must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.text must inherit property "viewportElement" with the proper type
@@ -1211,8 +1211,8 @@ Pass SVGGraphicsElement interface: objects.tspan must inherit property "getBBox(
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.tspan with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.tspan must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.tspan must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.tspan must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.tspan must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.tspan must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.tspan must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.tspan must inherit property "className" with the proper type
Pass SVGElement interface: objects.tspan must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.tspan must inherit property "viewportElement" with the proper type
@@ -1278,8 +1278,8 @@ Pass SVGGraphicsElement interface: objects.textPath must inherit property "getBB
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.textPath with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.textPath must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.textPath must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.textPath must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.textPath must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.textPath must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.textPath must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.textPath must inherit property "className" with the proper type
Pass SVGElement interface: objects.textPath must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.textPath must inherit property "viewportElement" with the proper type
@@ -1312,8 +1312,8 @@ Pass SVGGraphicsElement interface: objects.image must inherit property "getBBox(
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.image with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.image must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.image must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.image must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.image must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.image must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.image must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.image must inherit property "className" with the proper type
Pass SVGElement interface: objects.image must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.image must inherit property "viewportElement" with the proper type
@@ -1340,8 +1340,8 @@ Pass SVGGraphicsElement interface: objects.foreignObject must inherit property "
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.foreignObject with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.foreignObject must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.foreignObject must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.foreignObject must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.foreignObject must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.foreignObject must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.foreignObject must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.foreignObject must inherit property "className" with the proper type
Pass SVGElement interface: objects.foreignObject must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.foreignObject must inherit property "viewportElement" with the proper type
@@ -1604,8 +1604,8 @@ Pass SVGGraphicsElement interface: objects.a must inherit property "getBBox(opti
Pass SVGGraphicsElement interface: calling getBBox(optional SVGBoundingBoxOptions) on objects.a with too few arguments must throw TypeError
Pass SVGGraphicsElement interface: objects.a must inherit property "getCTM()" with the proper type
Pass SVGGraphicsElement interface: objects.a must inherit property "getScreenCTM()" with the proper type
-Fail SVGGraphicsElement interface: objects.a must inherit property "requiredExtensions" with the proper type
-Fail SVGGraphicsElement interface: objects.a must inherit property "systemLanguage" with the proper type
+Pass SVGGraphicsElement interface: objects.a must inherit property "requiredExtensions" with the proper type
+Pass SVGGraphicsElement interface: objects.a must inherit property "systemLanguage" with the proper type
Pass SVGElement interface: objects.a must inherit property "className" with the proper type
Pass SVGElement interface: objects.a must inherit property "ownerSVGElement" with the proper type
Pass SVGElement interface: objects.a must inherit property "viewportElement" with the proper type
diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt
index cbe952609d1..7e17a27d25d 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/struct/systemLanguage-parsing.txt
@@ -2,17 +2,17 @@ Harness status: OK
Found 13 tests
-13 Fail
-Fail Comma-separated tokens are split into individual items
-Fail Whitespace after comma is stripped
-Fail Whitespace before comma is stripped
-Fail Whitespace around commas is stripped
-Fail Leading and trailing whitespace on the value is stripped
-Fail Tabs and newlines as leading/trailing whitespace are stripped
-Fail Single token without commas
-Fail BCP 47 subtags are preserved within tokens
-Fail Double comma produces an empty token between the two commas
-Fail Empty string results in a single empty token
-Fail A single comma separates two empty tokens
-Fail Numeric tokens are parsed without validation
-Fail Invalid language tags are stored as tokens without validation
\ No newline at end of file
+13 Pass
+Pass Comma-separated tokens are split into individual items
+Pass Whitespace after comma is stripped
+Pass Whitespace before comma is stripped
+Pass Whitespace around commas is stripped
+Pass Leading and trailing whitespace on the value is stripped
+Pass Tabs and newlines as leading/trailing whitespace are stripped
+Pass Single token without commas
+Pass BCP 47 subtags are preserved within tokens
+Pass Double comma produces an empty token between the two commas
+Pass Empty string results in a single empty token
+Pass A single comma separates two empty tokens
+Pass Numeric tokens are parsed without validation
+Pass Invalid language tags are stored as tokens without validation
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt
index 7304e009f6b..66b2c34550e 100644
--- a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt
+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGList-reflected-attribute-synchronize.txt
@@ -2,8 +2,8 @@ Harness status: OK
Found 59 tests
-5 Pass
-54 Fail
+6 Pass
+53 Fail
Pass SVGNumberList (rotate on text): getItem returns the same object for one index, with no attribute change
Fail SVGNumberList (rotate on text): a same-count change updates the values of the held items
Pass SVGNumberList (rotate on text): a same-count change keeps the held item in the list
@@ -62,4 +62,4 @@ Fail SVGTransformList (gradientTransform): a changed transform function keeps th
Fail SVGTransformList (gradientTransform): a changed transform function updates the held item's type and matrix
Fail SVGTransformList (gradientTransform): swapping two transform functions keeps both held items
Fail SVGTransformList (gradientTransform): an empty list detaches every item
-Fail SVGStringList: a change replaces the list rather than updating items
\ No newline at end of file
+Pass SVGStringList: a change replaces the list rather than updating items
\ No newline at end of file