diff --git a/Libraries/LibWeb/Layout/SVGFormattingContext.cpp b/Libraries/LibWeb/Layout/SVGFormattingContext.cpp index 6321ccc31db..3faff2c3e07 100644 --- a/Libraries/LibWeb/Layout/SVGFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/SVGFormattingContext.cpp @@ -3,6 +3,7 @@ * Copyright (c) 2022, Sam Atkins * Copyright (c) 2022, Tobias Christiansen * Copyright (c) 2023, MacDue + * Copyright (c) 2025, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ @@ -343,14 +344,14 @@ void SVGFormattingContext::layout_nested_viewport(Box const& viewport) nested_context.run(*m_available_space); } -Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box) +Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box) const { - auto& text_element = static_cast(text_box.dom_node()); + auto& text_element = text_box.dom_node(); // FIXME: Use per-code-point fonts. auto& font = text_box.first_available_font(); auto text_contents = text_element.text_contents(); auto text_width = font.width(text_contents); - auto text_offset = text_element.get_offset(m_viewport_size); + auto text_offset = m_current_text_position; // https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties switch (text_element.text_anchor().value_or(SVG::TextAnchor::Start)) { @@ -381,7 +382,7 @@ Gfx::Path SVGFormattingContext::compute_path_for_text(SVGTextBox const& text_box return path; } -Gfx::Path SVGFormattingContext::compute_path_for_text_path(SVGTextPathBox const& text_path_box) +Gfx::Path SVGFormattingContext::compute_path_for_text_path(SVGTextPathBox const& text_path_box) const { auto& text_path_element = static_cast(text_path_box.dom_node()); auto path_or_shape = text_path_element.path_or_shape(); @@ -409,27 +410,33 @@ void SVGFormattingContext::layout_path_like_element(SVGGraphicsBox const& graphi if (is(graphics_box)) { auto& geometry_box = static_cast(graphics_box); path = const_cast(geometry_box).dom_node().get_path(m_viewport_size); - } else if (is(graphics_box)) { - auto& text_box = static_cast(graphics_box); - path = compute_path_for_text(text_box); + } else if (auto* text_box = as_if(graphics_box)) { + // FIXME: Text offsets must be calculated per character. This only applies the first character's offset. + auto text_positioning = text_box->dom_node().text_positioning(); + text_positioning.apply_to_text_position(*text_box, m_viewport_size, m_current_text_position, 0u); + + path = compute_path_for_text(*text_box); + // and elements can contain more text elements. - text_box.for_each_child_of_type([&](auto& child) { + text_box->for_each_child_of_type([&](auto& child) { if (is(child) || is(child)) layout_graphics_element(child); return IterationDecision::Continue; }); - } else if (is(graphics_box)) { + } else if (auto* text_path_box = as_if(graphics_box)) { // FIXME: Support in . - path = compute_path_for_text_path(static_cast(graphics_box)); + path = compute_path_for_text_path(*text_path_box); } - auto path_bounding_box = to_css_pixels_transform.map(path.bounding_box()).to_type(); + auto path_bounding_box = path.bounding_box(); + m_current_text_position = path_bounding_box.bottom_right(); + auto transformed_bounding_box = to_css_pixels_transform.map(path_bounding_box).to_type(); // Stroke increases the path's size by stroke_width/2 per side. CSSPixels stroke_width = CSSPixels::nearest_value_for(graphics_box.dom_node().visible_stroke_width() * m_current_viewbox_transform.x_scale()); - path_bounding_box.inflate(stroke_width, stroke_width); - graphics_box_state.set_content_offset(path_bounding_box.top_left()); - graphics_box_state.set_content_width(path_bounding_box.width()); - graphics_box_state.set_content_height(path_bounding_box.height()); + transformed_bounding_box.inflate(stroke_width, stroke_width); + graphics_box_state.set_content_offset(transformed_bounding_box.top_left()); + graphics_box_state.set_content_width(transformed_bounding_box.width()); + graphics_box_state.set_content_height(transformed_bounding_box.height()); graphics_box_state.set_has_definite_width(true); graphics_box_state.set_has_definite_height(true); graphics_box_state.set_computed_svg_path(move(path)); diff --git a/Libraries/LibWeb/Layout/SVGFormattingContext.h b/Libraries/LibWeb/Layout/SVGFormattingContext.h index 72fe493790b..e29d887d89b 100644 --- a/Libraries/LibWeb/Layout/SVGFormattingContext.h +++ b/Libraries/LibWeb/Layout/SVGFormattingContext.h @@ -15,7 +15,7 @@ namespace Web::Layout { -class SVGFormattingContext : public FormattingContext { +class SVGFormattingContext final : public FormattingContext { public: explicit SVGFormattingContext(LayoutState&, LayoutMode, Box const&, FormattingContext* parent, Gfx::AffineTransform parent_viewbox_transform = {}); ~SVGFormattingContext(); @@ -33,8 +33,8 @@ private: void layout_mask_or_clip(SVGBox const&); void layout_image_element(SVGImageBox const& image_box); - [[nodiscard]] Gfx::Path compute_path_for_text(SVGTextBox const&); - [[nodiscard]] Gfx::Path compute_path_for_text_path(SVGTextPathBox const&); + [[nodiscard]] Gfx::Path compute_path_for_text(SVGTextBox const&) const; + [[nodiscard]] Gfx::Path compute_path_for_text_path(SVGTextPathBox const&) const; Gfx::AffineTransform m_parent_viewbox_transform {}; @@ -42,6 +42,7 @@ private: Gfx::AffineTransform m_current_viewbox_transform {}; CSSPixelSize m_viewport_size {}; CSSPixelPoint m_svg_offset {}; + Gfx::FloatPoint m_current_text_position {}; }; } diff --git a/Libraries/LibWeb/SVG/AttributeNames.h b/Libraries/LibWeb/SVG/AttributeNames.h index 97799b4f9d1..ace938e6e36 100644 --- a/Libraries/LibWeb/SVG/AttributeNames.h +++ b/Libraries/LibWeb/SVG/AttributeNames.h @@ -84,6 +84,7 @@ namespace Web::SVG::AttributeNames { __ENUMERATE_SVG_ATTRIBUTE(requiredExtensions, "requiredExtensions") \ __ENUMERATE_SVG_ATTRIBUTE(requiredFeatures, "requiredFeatures") \ __ENUMERATE_SVG_ATTRIBUTE(result, "result") \ + __ENUMERATE_SVG_ATTRIBUTE(rotate, "rotate") \ __ENUMERATE_SVG_ATTRIBUTE(rx, "rx") \ __ENUMERATE_SVG_ATTRIBUTE(ry, "ry") \ __ENUMERATE_SVG_ATTRIBUTE(slope, "slope") \ diff --git a/Libraries/LibWeb/SVG/AttributeParser.h b/Libraries/LibWeb/SVG/AttributeParser.h index f9260349b8c..76712c0b8ab 100644 --- a/Libraries/LibWeb/SVG/AttributeParser.h +++ b/Libraries/LibWeb/SVG/AttributeParser.h @@ -115,6 +115,7 @@ public: float resolve_relative_to(float length) const; float value() const { return m_value; } + bool is_percentage() const { return m_is_percentage; } private: float m_value; diff --git a/Libraries/LibWeb/SVG/SVGTextPositioningElement.cpp b/Libraries/LibWeb/SVG/SVGTextPositioningElement.cpp index 7e23944e651..61c200bef58 100644 --- a/Libraries/LibWeb/SVG/SVGTextPositioningElement.cpp +++ b/Libraries/LibWeb/SVG/SVGTextPositioningElement.cpp @@ -1,14 +1,26 @@ /* * Copyright (c) 2022, Andreas Kling * Copyright (c) 2023, Aliaksandr Kalenik + * Copyright (c) 2025, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ #include +#include +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include +#include #include namespace Web::SVG { @@ -24,32 +36,121 @@ void SVGTextPositioningElement::initialize(JS::Realm& realm) Base::initialize(realm); } +void SVGTextPositioningElement::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_x); + visitor.visit(m_y); + visitor.visit(m_dx); + visitor.visit(m_dy); + visitor.visit(m_rotate); +} + void SVGTextPositioningElement::attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) { Base::attribute_changed(name, old_value, value, namespace_); - if (name == SVG::AttributeNames::x) { - m_x = AttributeParser::parse_number_percentage(value.value_or(String {})); - } else if (name == SVG::AttributeNames::y) { - m_y = AttributeParser::parse_number_percentage(value.value_or(String {})); - } else if (name == SVG::AttributeNames::dx) { - m_dx = AttributeParser::parse_number_percentage(value.value_or(String {})); - } else if (name == SVG::AttributeNames::dy) { - m_dy = AttributeParser::parse_number_percentage(value.value_or(String {})); - } + if (name == AttributeNames::x) + m_x = {}; + else if (name == AttributeNames::y) + m_y = {}; + else if (name == AttributeNames::dx) + m_dx = {}; + else if (name == AttributeNames::dy) + m_dy = {}; + else if (name == AttributeNames::rotate) + m_rotate = {}; } -Gfx::FloatPoint SVGTextPositioningElement::get_offset(CSSPixelSize const& viewport_size) const +TextPositioning SVGTextPositioningElement::text_positioning() const { - auto const viewport_width = viewport_size.width().to_float(); - auto const viewport_height = viewport_size.height().to_float(); + CSS::Parser::ParsingParams const parsing_params { document() }; - float const x = m_x.value_or({ 0, false }).resolve_relative_to(viewport_width); - float const y = m_y.value_or({ 0, false }).resolve_relative_to(viewport_height); - float const dx = m_dx.value_or({ 0, false }).resolve_relative_to(viewport_width); - float const dy = m_dy.value_or({ 0, false }).resolve_relative_to(viewport_height); + // https://svgwg.org/svg2-draft/text.html#TSpanAttributes + // FIXME: This only handles single values, not lists. + auto resolve_value = [&](FlyString const& attribute) -> Vector { + auto raw_value = get_attribute_value(attribute); - return { x + dx, y + dy }; + auto style_value = parse_css_type(parsing_params, raw_value, CSS::ValueType::LengthPercentage); + if (auto const* length_style_value = as_if(style_value.ptr())) + return { CSS::LengthPercentage::from_style_value(*length_style_value) }; + + if (auto const* percentage_style_value = as_if(style_value.ptr())) + return { CSS::LengthPercentage::from_style_value(*percentage_style_value) }; + + style_value = parse_css_type(parsing_params, raw_value, CSS::ValueType::Number); + if (auto const* number_style_value = as_if(style_value.ptr())) + return { CSS::Number { CSS::Number::Type::Number, number_style_value->number() } }; + + return {}; + }; + + // FIXME: Implement support for the rotate attribute. + return { + .x = resolve_value(AttributeNames::x), + .y = resolve_value(AttributeNames::y), + .dx = resolve_value(AttributeNames::dx), + .dy = resolve_value(AttributeNames::dy), + .rotate = Vector {}, + }; +} + +GC::Ref SVGTextPositioningElement::ensure_length_list(GC::Ptr& list, + FlyString const& attribute_name) const +{ + if (!list) { + // FIXME: This only handles single values, not lists. + float value = 0.f; + auto maybe_number_percentage = AttributeParser::parse_number_percentage(get_attribute_value(attribute_name)); + if (maybe_number_percentage.has_value()) + value = maybe_number_percentage.release_value().value(); + + auto length = SVGLength::create(realm(), SVGLength::SVG_LENGTHTYPE_NUMBER, value, SVGLength::ReadOnly::Yes); + auto length_list = SVGLengthList::create(realm(), { length }, ReadOnlyList::Yes); + list = SVGAnimatedLengthList::create(realm(), length_list); + } + return *list; +} + +// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextPositioningElement__x +GC::Ref SVGTextPositioningElement::x() +{ + return ensure_length_list(m_x, AttributeNames::x); +} + +// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextPositioningElement__y +GC::Ref SVGTextPositioningElement::y() +{ + return ensure_length_list(m_y, AttributeNames::y); +} + +// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextPositioningElement__dx +GC::Ref SVGTextPositioningElement::dx() +{ + return ensure_length_list(m_dx, AttributeNames::dx); +} + +// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextPositioningElement__dy +GC::Ref SVGTextPositioningElement::dy() +{ + return ensure_length_list(m_dy, AttributeNames::dy); +} + +// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextPositioningElement__rotate +GC::Ref SVGTextPositioningElement::rotate() +{ + if (!m_rotate) { + // FIXME: This only handles single values, not lists. + float value = 0.f; + auto maybe_number_percentage = AttributeParser::parse_number_percentage(get_attribute_value(AttributeNames::rotate)); + if (maybe_number_percentage.has_value() && !maybe_number_percentage.value().is_percentage()) + value = maybe_number_percentage.release_value().value(); + + auto number = SVGNumber::create(realm(), value, SVGNumber::ReadOnly::Yes); + auto number_list = SVGNumberList::create(realm(), { number }, ReadOnlyList::Yes); + m_rotate = SVGAnimatedNumberList::create(realm(), number_list); + } + return *m_rotate; } } diff --git a/Libraries/LibWeb/SVG/SVGTextPositioningElement.h b/Libraries/LibWeb/SVG/SVGTextPositioningElement.h index c2e5fdf746c..9f0a94cbd22 100644 --- a/Libraries/LibWeb/SVG/SVGTextPositioningElement.h +++ b/Libraries/LibWeb/SVG/SVGTextPositioningElement.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2023, MacDue + * Copyright (c) 2025, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ @@ -7,10 +8,45 @@ #pragma once #include -#include namespace Web::SVG { +// https://svgwg.org/svg2-draft/text.html#TSpanNotes +// https://svgwg.org/svg2-draft/text.html#TSpanAttributes +struct TextPositioning { + using Position = Variant; + + Vector x; + Vector y; + Vector dx; + Vector dy; + Vector rotate; + + void apply_to_text_position(Layout::Node const& node, CSSPixelSize viewport, Gfx::FloatPoint& current_text_position, + size_t character_index) const + { + auto value_for_character = [&](Vector const& values) -> float { + if (values.is_empty()) + return 0.f; + + auto position = character_index < values.size() ? values[character_index] : values.last(); + return position.visit( + [](CSS::Number const& number) { return static_cast(number.value()); }, + [&](CSS::LengthPercentage const& length_percentage) { + auto reference = &values == &x || &values == &dx ? viewport.width() : viewport.height(); + return length_percentage.to_px(node, reference).to_float(); + }); + }; + + if (!x.is_empty()) + current_text_position.set_x(value_for_character(x)); + if (!y.is_empty()) + current_text_position.set_y(value_for_character(y)); + + current_text_position.translate_by(value_for_character(dx), value_for_character(dy)); + } +}; + // https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPositioningElement class SVGTextPositioningElement : public SVGTextContentElement { WEB_PLATFORM_OBJECT(SVGTextPositioningElement, SVGTextContentElement); @@ -18,23 +54,28 @@ class SVGTextPositioningElement : public SVGTextContentElement { public: virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value, Optional const& namespace_) override; - Gfx::FloatPoint get_offset(CSSPixelSize const& viewport_size) const; + TextPositioning text_positioning() const; - GC::Ref x() const; - GC::Ref y() const; - GC::Ref dx() const; - GC::Ref dy() const; + GC::Ref x(); + GC::Ref y(); + GC::Ref dx(); + GC::Ref dy(); + GC::Ref rotate(); protected: SVGTextPositioningElement(DOM::Document&, DOM::QualifiedName); virtual void initialize(JS::Realm&) override; + virtual void visit_edges(Visitor&) override; private: - Optional m_x; - Optional m_y; - Optional m_dx; - Optional m_dy; + GC::Ref ensure_length_list(GC::Ptr&, FlyString const& attribute_name) const; + + GC::Ptr m_x; + GC::Ptr m_y; + GC::Ptr m_dx; + GC::Ptr m_dy; + GC::Ptr m_rotate; }; } diff --git a/Libraries/LibWeb/SVG/SVGTextPositioningElement.idl b/Libraries/LibWeb/SVG/SVGTextPositioningElement.idl index b20642cbde0..fb6d01d4567 100644 --- a/Libraries/LibWeb/SVG/SVGTextPositioningElement.idl +++ b/Libraries/LibWeb/SVG/SVGTextPositioningElement.idl @@ -1,11 +1,13 @@ +#import +#import #import // https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextPositioningElement [Exposed=Window] interface SVGTextPositioningElement : SVGTextContentElement { - [FIXME, SameObject] readonly attribute SVGAnimatedLengthList x; - [FIXME, SameObject] readonly attribute SVGAnimatedLengthList y; - [FIXME, SameObject] readonly attribute SVGAnimatedLengthList dx; - [FIXME, SameObject] readonly attribute SVGAnimatedLengthList dy; - [FIXME, SameObject] readonly attribute SVGAnimatedNumberList rotate; + [SameObject] readonly attribute SVGAnimatedLengthList x; + [SameObject] readonly attribute SVGAnimatedLengthList y; + [SameObject] readonly attribute SVGAnimatedLengthList dx; + [SameObject] readonly attribute SVGAnimatedLengthList dy; + [SameObject] readonly attribute SVGAnimatedNumberList rotate; }; diff --git a/Tests/LibWeb/Layout/expected/svg/svg-text-positioning.txt b/Tests/LibWeb/Layout/expected/svg/svg-text-positioning.txt new file mode 100644 index 00000000000..8e8dc0f5f31 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/svg-text-positioning.txt @@ -0,0 +1,34 @@ +Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline + BlockContainer at [0,0] [0+0+0 800 0+0+0] [0+0+0 136 0+0+0] [BFC] children: not-inline + BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 120 0+0+8] children: inline + frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x120] baseline: 120 + SVGSVGBox at [8,8] [0+0+0 300 0+0+0] [0+0+0 120 0+0+0] [SVG] children: inline + TextNode <#text> (not painted) + SVGGeometryBox at [8,8] [0+0+0 300 0+0+0] [0+0+0 120 0+0+0] children: not-inline + TextNode <#text> (not painted) + SVGTextBox at [8,8] [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline + TextNode <#text> (not painted) + SVGTextBox at [48.796875,23.140625] [0+0+0 44.46875 0+0+0] [0+0+0 22.125 0+0+0] children: inline + TextNode <#text> (not painted) + TextNode <#text> (not painted) + SVGTextBox at [114.390625,48.9375] [0+0+0 45.765625 0+0+0] [0+0+0 20.53125 0+0+0] children: inline + TextNode <#text> (not painted) + TextNode <#text> (not painted) + SVGTextBox at [191.28125,84.15625] [0+0+0 45.09375 0+0+0] [0+0+0 20.53125 0+0+0] children: inline + TextNode <#text> (not painted) + TextNode <#text> (not painted) + TextNode <#text> (not painted) + TextNode <#text> (not painted) + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x136] + PaintableWithLines (BlockContainer) [8,8 784x120] + SVGSVGPaintable (SVGSVGBox) [8,8 300x120] + SVGPathPaintable (SVGGeometryBox) [8,8 300x120] + SVGPathPaintable (SVGTextBox) [8,8 0x0] + SVGPathPaintable (SVGTextBox) [48.796875,23.140625 44.46875x22.125] + SVGPathPaintable (SVGTextBox) [114.390625,48.9375 45.765625x20.53125] + SVGPathPaintable (SVGTextBox) [191.28125,84.15625 45.09375x20.53125] + +SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) + SC for BlockContainer [0,0 800x136] [children: 0] (z-index: auto) diff --git a/Tests/LibWeb/Layout/input/svg/svg-text-positioning.html b/Tests/LibWeb/Layout/input/svg/svg-text-positioning.html new file mode 100644 index 00000000000..39922550162 --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg/svg-text-positioning.html @@ -0,0 +1,9 @@ + + + + + foo + bar + baz + + 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 5a2946f0810..84134d58211 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 1781 tests -1028 Pass -753 Fail +1068 Pass +713 Fail Pass idl_test setup Pass idl_test validation Pass Partial interface Document: original interface defined @@ -202,23 +202,23 @@ Pass SVGNumberList interface: operation insertItemBefore(SVGNumber, unsigned lon Pass SVGNumberList interface: operation replaceItem(SVGNumber, unsigned long) Pass SVGNumberList interface: operation removeItem(unsigned long) Pass SVGNumberList interface: operation appendItem(SVGNumber) -Fail SVGNumberList must be primary interface of objects.text.rotate.baseVal -Fail Stringification of objects.text.rotate.baseVal -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "length" with the proper type -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "numberOfItems" with the proper type -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "clear()" with the proper type -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "initialize(SVGNumber)" with the proper type -Fail SVGNumberList interface: calling initialize(SVGNumber) on objects.text.rotate.baseVal with too few arguments must throw TypeError -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "getItem(unsigned long)" with the proper type -Fail SVGNumberList interface: calling getItem(unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "insertItemBefore(SVGNumber, unsigned long)" with the proper type -Fail SVGNumberList interface: calling insertItemBefore(SVGNumber, unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "replaceItem(SVGNumber, unsigned long)" with the proper type -Fail SVGNumberList interface: calling replaceItem(SVGNumber, unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "removeItem(unsigned long)" with the proper type -Fail SVGNumberList interface: calling removeItem(unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError -Fail SVGNumberList interface: objects.text.rotate.baseVal must inherit property "appendItem(SVGNumber)" with the proper type -Fail SVGNumberList interface: calling appendItem(SVGNumber) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList must be primary interface of objects.text.rotate.baseVal +Pass Stringification of objects.text.rotate.baseVal +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "length" with the proper type +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "numberOfItems" with the proper type +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "clear()" with the proper type +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "initialize(SVGNumber)" with the proper type +Pass SVGNumberList interface: calling initialize(SVGNumber) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "getItem(unsigned long)" with the proper type +Pass SVGNumberList interface: calling getItem(unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "insertItemBefore(SVGNumber, unsigned long)" with the proper type +Pass SVGNumberList interface: calling insertItemBefore(SVGNumber, unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "replaceItem(SVGNumber, unsigned long)" with the proper type +Pass SVGNumberList interface: calling replaceItem(SVGNumber, unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "removeItem(unsigned long)" with the proper type +Pass SVGNumberList interface: calling removeItem(unsigned long) on objects.text.rotate.baseVal with too few arguments must throw TypeError +Pass SVGNumberList interface: objects.text.rotate.baseVal must inherit property "appendItem(SVGNumber)" with the proper type +Pass SVGNumberList interface: calling appendItem(SVGNumber) on objects.text.rotate.baseVal with too few arguments must throw TypeError Pass SVGLengthList interface: existence and properties of interface object Pass SVGLengthList interface object length Pass SVGLengthList interface object name @@ -370,10 +370,10 @@ Pass SVGAnimatedNumberList interface: existence and properties of interface prot Pass SVGAnimatedNumberList interface: existence and properties of interface prototype object's @@unscopables property Pass SVGAnimatedNumberList interface: attribute baseVal Pass SVGAnimatedNumberList interface: attribute animVal -Fail SVGAnimatedNumberList must be primary interface of objects.text.rotate -Fail Stringification of objects.text.rotate -Fail SVGAnimatedNumberList interface: objects.text.rotate must inherit property "baseVal" with the proper type -Fail SVGAnimatedNumberList interface: objects.text.rotate must inherit property "animVal" with the proper type +Pass SVGAnimatedNumberList must be primary interface of objects.text.rotate +Pass Stringification of objects.text.rotate +Pass SVGAnimatedNumberList interface: objects.text.rotate must inherit property "baseVal" with the proper type +Pass SVGAnimatedNumberList interface: objects.text.rotate must inherit property "animVal" with the proper type Pass SVGAnimatedLengthList interface: existence and properties of interface object Pass SVGAnimatedLengthList interface object length Pass SVGAnimatedLengthList interface object name @@ -382,10 +382,10 @@ Pass SVGAnimatedLengthList interface: existence and properties of interface prot Pass SVGAnimatedLengthList interface: existence and properties of interface prototype object's @@unscopables property Pass SVGAnimatedLengthList interface: attribute baseVal Pass SVGAnimatedLengthList interface: attribute animVal -Fail SVGAnimatedLengthList must be primary interface of objects.text.x -Fail Stringification of objects.text.x -Fail SVGAnimatedLengthList interface: objects.text.x must inherit property "baseVal" with the proper type -Fail SVGAnimatedLengthList interface: objects.text.x must inherit property "animVal" with the proper type +Pass SVGAnimatedLengthList must be primary interface of objects.text.x +Pass Stringification of objects.text.x +Pass SVGAnimatedLengthList interface: objects.text.x must inherit property "baseVal" with the proper type +Pass SVGAnimatedLengthList interface: objects.text.x must inherit property "animVal" with the proper type Pass SVGUnitTypes interface: existence and properties of interface object Pass SVGUnitTypes interface object length Pass SVGUnitTypes interface object name @@ -1117,11 +1117,11 @@ Pass SVGTextPositioningElement interface object name Pass SVGTextPositioningElement interface: existence and properties of interface prototype object Pass SVGTextPositioningElement interface: existence and properties of interface prototype object's "constructor" property Pass SVGTextPositioningElement interface: existence and properties of interface prototype object's @@unscopables property -Fail SVGTextPositioningElement interface: attribute x -Fail SVGTextPositioningElement interface: attribute y -Fail SVGTextPositioningElement interface: attribute dx -Fail SVGTextPositioningElement interface: attribute dy -Fail SVGTextPositioningElement interface: attribute rotate +Pass SVGTextPositioningElement interface: attribute x +Pass SVGTextPositioningElement interface: attribute y +Pass SVGTextPositioningElement interface: attribute dx +Pass SVGTextPositioningElement interface: attribute dy +Pass SVGTextPositioningElement interface: attribute rotate Pass SVGTextElement interface: existence and properties of interface object Pass SVGTextElement interface object length Pass SVGTextElement interface object name @@ -1130,11 +1130,11 @@ Pass SVGTextElement interface: existence and properties of interface prototype o Pass SVGTextElement interface: existence and properties of interface prototype object's @@unscopables property Pass SVGTextElement must be primary interface of objects.text Pass Stringification of objects.text -Fail SVGTextPositioningElement interface: objects.text must inherit property "x" with the proper type -Fail SVGTextPositioningElement interface: objects.text must inherit property "y" with the proper type -Fail SVGTextPositioningElement interface: objects.text must inherit property "dx" with the proper type -Fail SVGTextPositioningElement interface: objects.text must inherit property "dy" with the proper type -Fail SVGTextPositioningElement interface: objects.text must inherit property "rotate" with the proper type +Pass SVGTextPositioningElement interface: objects.text must inherit property "x" with the proper type +Pass SVGTextPositioningElement interface: objects.text must inherit property "y" with the proper type +Pass SVGTextPositioningElement interface: objects.text must inherit property "dx" with the proper type +Pass SVGTextPositioningElement interface: objects.text must inherit property "dy" with the proper type +Pass SVGTextPositioningElement interface: objects.text must inherit property "rotate" with the proper type Pass SVGTextContentElement interface: objects.text must inherit property "LENGTHADJUST_UNKNOWN" with the proper type Pass SVGTextContentElement interface: objects.text must inherit property "LENGTHADJUST_SPACING" with the proper type Pass SVGTextContentElement interface: objects.text must inherit property "LENGTHADJUST_SPACINGANDGLYPHS" with the proper type @@ -1176,11 +1176,11 @@ Pass SVGTSpanElement interface: existence and properties of interface prototype Pass SVGTSpanElement interface: existence and properties of interface prototype object's @@unscopables property Pass SVGTSpanElement must be primary interface of objects.tspan Pass Stringification of objects.tspan -Fail SVGTextPositioningElement interface: objects.tspan must inherit property "x" with the proper type -Fail SVGTextPositioningElement interface: objects.tspan must inherit property "y" with the proper type -Fail SVGTextPositioningElement interface: objects.tspan must inherit property "dx" with the proper type -Fail SVGTextPositioningElement interface: objects.tspan must inherit property "dy" with the proper type -Fail SVGTextPositioningElement interface: objects.tspan must inherit property "rotate" with the proper type +Pass SVGTextPositioningElement interface: objects.tspan must inherit property "x" with the proper type +Pass SVGTextPositioningElement interface: objects.tspan must inherit property "y" with the proper type +Pass SVGTextPositioningElement interface: objects.tspan must inherit property "dx" with the proper type +Pass SVGTextPositioningElement interface: objects.tspan must inherit property "dy" with the proper type +Pass SVGTextPositioningElement interface: objects.tspan must inherit property "rotate" with the proper type Pass SVGTextContentElement interface: objects.tspan must inherit property "LENGTHADJUST_UNKNOWN" with the proper type Pass SVGTextContentElement interface: objects.tspan must inherit property "LENGTHADJUST_SPACING" with the proper type Pass SVGTextContentElement interface: objects.tspan must inherit property "LENGTHADJUST_SPACINGANDGLYPHS" with the proper type