Truly independent web browser
LibWeb: Implement SVGGeometryElement.isPointInStroke()
Andreas Klinge2c0285e8099
diff --git a/Libraries/LibWeb/Rust/src/layout/svg_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/svg_formatting_context.rsindex ef975550982..a778d206c0a 100644--- a/Libraries/LibWeb/Rust/src/layout/svg_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/svg_formatting_context.rs@@ -1111,6 +1111,73 @@ pub unsafe extern "C" fn svg_geometry_element_encode_path(unsafe { append(context, bytes.as_ptr(), bytes.len()) };}+/// Whether the point is inside the area that stroking the geometry of a shape element covers, with the stroke drawn+/// from the element's computed style, in the user units of the viewport of the given size. Distances along the path are+/// scaled by the dash scale. The host scale is the scale from the element's user space to its host coordinate space,+/// in which a non-scaling stroke is drawn.+///+/// # Safety+/// `payloads` must point to `payload_count` style group payloads, and `points` to `point_count` points.+#[unsafe(no_mangle)]+#[allow(clippy::too_many_arguments)]+pub unsafe extern "C" fn svg_geometry_element_stroke_contains(+ geometry: FfiSvgAttributeFacts,+ payloads: *const *const c_void,+ payload_count: usize,+ points: *const FfiFloatPoint,+ point_count: usize,+ viewport_size: FfiCssPixelSize,+ dash_scale: f32,+ host_scale: f32,+ x: f32,+ y: f32,+) -> bool {+ assert!(!payloads.is_null(), "style group payload array is null");+ let mut style_payloads = FfiStylePayloads::default();+ // SAFETY: Guaranteed by the caller.+ style_payloads+ .groups+ .copy_from_slice(unsafe { ak::slice_from_raw_parts(payloads, payload_count) });+ // SAFETY: Guaranteed by the caller.+ let points = unsafe { ak::slice_from_raw_parts(points, point_count) };+ let shape_geometry = SvgShapeGeometry {+ viewport_width: viewport_size.width,+ viewport_height: viewport_size.height,+ };+ let style = StyleValues::new(&style_payloads);+ let path = shape_geometry.path(geometry, style, Some(points));++ // The same basis that layout resolves the stroke's percentages against.+ // FIXME: The spec formula is the normalized diagonal sqrt((width² + height²) / 2), as for layout.+ let basis = (viewport_size.width + viewport_size.height) * CssPixels::nearest_value_for(0.5);+ let stroke = crate::painting::record::paint::svg::svg_stroke_style_for_percentage_basis(&style, basis);+ // https://svgwg.org/svg2-draft/painting.html#PaintingVectorEffects+ // With the non-scaling-stroke vector effect, stroke outline shall be calculated in the "host" coordinate space+ // instead of user coordinate system.+ let stroke_scale = if stroke.non_scaling_stroke && host_scale > 0.0 {+ 1.0 / host_scale+ } else {+ 1.0+ };+ let stroke_style = libgfx_rust::path::StrokeStyle {+ thickness: stroke.width * stroke_scale,+ cap_style: stroke.cap_style,+ join_style: stroke.join_style,+ miter_limit: stroke.miter_limit,+ dash_array: stroke+ .dash_array+ .iter()+ .map(|dash| dash * dash_scale * stroke_scale)+ .collect(),+ dash_offset: stroke.dash_offset * dash_scale * stroke_scale,+ };+ if stroke_style.thickness <= 0.0 {+ return false;+ }+ path.stroke_to_fill(&stroke_style)+ .contains(x, y, libgfx_rust::WindingRule::Nonzero)+}+impl<'pass> SvgFormattingContext<'pass> {fn shape_geometry(&self) -> SvgShapeGeometry {SvgShapeGeometry {diff --git a/Libraries/LibWeb/Rust/src/painting/record/paint/svg.rs b/Libraries/LibWeb/Rust/src/painting/record/paint/svg.rsindex 501cbb3c25d..512f666d6a3 100644--- a/Libraries/LibWeb/Rust/src/painting/record/paint/svg.rs+++ b/Libraries/LibWeb/Rust/src/painting/record/paint/svg.rs@@ -126,10 +126,18 @@ pub(crate) fn svg_stroke_style(layout_arena: &impl GeometryRead,paintable: NodeSlotId,style: &ComputedValuesView<'_>,+) -> SvgStrokeStyle {+ let basis = crate::painting::paintable_geometry::committed_svg_viewport_percentage_basis(layout_arena, paintable);+ svg_stroke_style_for_percentage_basis(style, basis)+}++/// The stroke properties of an SVG shape, with percentages resolved against the given basis.+pub(crate) fn svg_stroke_style_for_percentage_basis(+ style: &ComputedValuesView<'_>,+ basis: crate::layout::CssPixels,) -> SvgStrokeStyle {use crate::css::css_enums::{stroke_linecap, stroke_linejoin, vector_effect};let svg = style.inherited_svg();- let basis = crate::painting::paintable_geometry::committed_svg_viewport_percentage_basis(layout_arena, paintable);let resolve = |handle: &crate::css::computed_value_types::ComputedStyleValueHandle, default: f32| {handle.length_percentage()diff --git a/Libraries/LibWeb/SVG/SVGGeometryElement.cpp b/Libraries/LibWeb/SVG/SVGGeometryElement.cppindex 768f7f8bcf5..dc173bdb592 100644--- a/Libraries/LibWeb/SVG/SVGGeometryElement.cpp+++ b/Libraries/LibWeb/SVG/SVGGeometryElement.cpp@@ -4,6 +4,7 @@* SPDX-License-Identifier: BSD-2-Clause*/+#include <AK/Math.h>#include <AK/ScopeGuard.h>#include <LibGC/Heap.h>#include <LibWeb/Bindings/DOMPointReadOnly.h>@@ -13,9 +14,12 @@#include <LibWeb/CSS/StyleComputer.h>#include <LibWeb/CSS/StyleEngineInput.h>#include <LibWeb/DOM/Document.h>+#include <LibWeb/Geometry/DOMMatrix.h>#include <LibWeb/HTML/Scripting/Environments.h>#include <LibWeb/HTML/Window.h>#include <LibWeb/Layout/LayoutRustBridge.h>+#include <LibWeb/SVG/AttributeNames.h>+#include <LibWeb/SVG/AttributeParsing.h>#include <LibWeb/SVG/SVGGeometryElement.h>#include <LibWeb/WebIDL/DOMException.h>@@ -164,6 +168,62 @@ WebIDL::ExceptionOr<bool> SVGGeometryElement::is_point_in_fill(Bindings::DOMPoinreturn is_point_in_fill;}+// https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__isPointInStroke+WebIDL::ExceptionOr<bool> SVGGeometryElement::is_point_in_stroke(Bindings::DOMPointInit const& point)+{+ // The isPointInStroke method, when invoked, must return true if the point given by point passed to the method, in+ // the coordinate space of an element, is in or on the outline path of an applied stroke on an element; and must+ // return false otherwise.+ // The outline path must take the stroke properties stroke-width, stroke-linecap, stroke-linejoin,+ // stroke-miterlimit, stroke-dasharray, stroke-dashoffset and vector-effect of an element into account.+ // The returned value is independent of any visual CSS property but the listed stroke properties.+ // If either of the x or y properties on point are infinite or NaN, then the method must return false.+ if (!isfinite(point.x) || !isfinite(point.y))+ return false;++ // NB: The host coordinate space of a non-scaling stroke is the coordinate space of the element's viewport.+ // FIXME: A single scale factor is only right for a uniform scale. Stroke a non-scaling stroke in the host+ // coordinate space instead, so that a non-uniform scale or a skew is accounted for.+ float host_scale = 1;+ if (auto ctm = get_ctm()) {+ auto elements = ctm->elements();+ host_scale = AK::sqrt(AK::fabs(static_cast<float>((elements[0] * elements[5]) - (elements[1] * elements[4]))));+ }++ // If current element is a non-rendered element, and the UA is not able to compute the geometry of the element,+ // then throw an InvalidStateError.+ bool is_point_in_stroke = false;+ auto has_geometry = with_computed_values([&](CSSPixelSize viewport_size, CSS::ComputedValues const& computed_values) {+ Array<void const*, to_underlying(CSS::StyleGroupIndex::Count)> payloads;+ for (size_t index = 0; index < payloads.size(); ++index)+ payloads[index] = computed_values.style_group_payload(static_cast<CSS::StyleGroupIndex>(index));++ // https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute+ // The user agent will scale all distance-along-a-path computations by the ratio of ‘pathLength’ to the user+ // agent's own computed value for total path length.+ // FIXME: A value of zero must be treated as a scaling factor of infinity.+ float dash_scale = 1;+ if (auto path_length = parse_number(get_attribute_value(AttributeNames::pathLength)); path_length.has_value() && *path_length > 0)+ dash_scale = geometry_path(*this, viewport_size, computed_values).length() / *path_length;++ auto points = Layout::svg_shape_points(*this);+ is_point_in_stroke = Layout::RustFFI::svg_geometry_element_stroke_contains(+ Layout::svg_geometry_facts(*this),+ payloads.data(),+ payloads.size(),+ reinterpret_cast<Layout::RustFFI::FfiFloatPoint const*>(points.data()),+ points.size(),+ viewport_size,+ dash_scale,+ host_scale,+ static_cast<float>(point.x),+ static_cast<float>(point.y));+ });+ if (!has_geometry)+ return WebIDL::InvalidStateError::create(HTML::relevant_realm(*this), "The element's geometry cannot be computed"_utf16);+ return is_point_in_stroke;+}+// https://w3c.github.io/svgwg/svg2-draft/types.html#__svg__SVGGeometryElement__getTotalLengthWebIDL::ExceptionOr<float> SVGGeometryElement::get_total_length(){diff --git a/Libraries/LibWeb/SVG/SVGGeometryElement.h b/Libraries/LibWeb/SVG/SVGGeometryElement.hindex ea86e416930..48baae3b25a 100644--- a/Libraries/LibWeb/SVG/SVGGeometryElement.h+++ b/Libraries/LibWeb/SVG/SVGGeometryElement.h@@ -23,6 +23,7 @@ public:Gfx::Path computed_path();WebIDL::ExceptionOr<bool> is_point_in_fill(Bindings::DOMPointInit const&);+ WebIDL::ExceptionOr<bool> is_point_in_stroke(Bindings::DOMPointInit const&);WebIDL::ExceptionOr<float> get_total_length();WebIDL::ExceptionOr<GC::Ref<Geometry::DOMPoint>> get_point_at_length(float distance);diff --git a/Libraries/LibWeb/SVG/SVGGeometryElement.idl b/Libraries/LibWeb/SVG/SVGGeometryElement.idlindex 74f271739fc..e27325d40f7 100644--- a/Libraries/LibWeb/SVG/SVGGeometryElement.idl+++ b/Libraries/LibWeb/SVG/SVGGeometryElement.idl@@ -4,7 +4,7 @@ interface SVGGeometryElement : SVGGraphicsElement {[SameObject] readonly attribute SVGAnimatedNumber pathLength;boolean isPointInFill(optional DOMPointInit point = {});- [FIXME] boolean isPointInStroke(optional DOMPointInit point = {});+ boolean isPointInStroke(optional DOMPointInit point = {});float getTotalLength();DOMPoint getPointAtLength(float distance);};diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-path.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-path.txtindex 0b5d7100890..a211d0ed44d 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-path.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-path.txt@@ -2,12 +2,12 @@ Harness status: OKFound 9 tests-3 Pass-6 Fail+4 Pass+5 FailPass getTotalLength() should return nonzero value in a c-v:hidden subtree.Pass getPointAtLength() should return nonzero values in a c-v:hidden subtree.Pass isPointInFill() should return true in a c-v:hidden subtree.-Fail isPointInStroke() should return true in a c-v:hidden subtree.+Pass isPointInStroke() should return true in a c-v:hidden subtree.Fail checkIntersection() should return true in a c-v:hidden subtree.Fail checkEnclosure() should return true in a c-v:hidden subtree.Fail getIntersectionList() should return items in a c-v:hidden subtree.diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-rect.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-rect.txtindex b9225cfd9e7..94703918acc 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-rect.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-contain/content-visibility/content-visibility-svg-rect.txt@@ -2,9 +2,8 @@ Harness status: OKFound 4 tests-3 Pass-1 Fail+4 PassPass getTotalLength() should return nonzero value in a c-v:hidden subtree.Pass getPointAtLength() should return nonzero values in a c-v:hidden subtree.Pass isPointInFill() should return true in a c-v:hidden subtree.-Fail isPointInStroke() should return true in a c-v:hidden subtree.\ No newline at end of file+Pass isPointInStroke() should return true in a c-v:hidden subtree.\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/idlharness.window.txtindex aa97403a290..0b78220f32f 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: OKFound 1780 tests-1569 Pass-211 Fail+1582 Pass+198 FailPass idl_test setupPass idl_test validationPass Partial interface Document: original interface defined@@ -84,7 +84,7 @@ Pass SVGGeometryElement interface: existence and properties of interface prototyPass SVGGeometryElement interface: existence and properties of interface prototype object's @@unscopables propertyPass SVGGeometryElement interface: attribute pathLengthPass SVGGeometryElement interface: operation isPointInFill(optional DOMPointInit)-Fail SVGGeometryElement interface: operation isPointInStroke(optional DOMPointInit)+Pass SVGGeometryElement interface: operation isPointInStroke(optional DOMPointInit)Pass SVGGeometryElement interface: operation getTotalLength()Pass SVGGeometryElement interface: operation getPointAtLength(float)Pass SVGNumber interface: existence and properties of interface object@@ -873,8 +873,8 @@ Pass SVGRectElement interface: objects.rect must inherit property "ry" with thePass SVGGeometryElement interface: objects.rect must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.rect must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.rect with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.rect must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.rect with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.rect must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.rect with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.rect must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.rect must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.rect with too few arguments must throw TypeError@@ -907,8 +907,8 @@ Pass SVGCircleElement interface: objects.circle must inherit property "r" with tPass SVGGeometryElement interface: objects.circle must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.circle must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.circle with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.circle must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.circle with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.circle must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.circle with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.circle must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.circle must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.circle with too few arguments must throw TypeError@@ -943,8 +943,8 @@ Pass SVGEllipseElement interface: objects.ellipse must inherit property "ry" witPass SVGGeometryElement interface: objects.ellipse must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.ellipse must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.ellipse with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.ellipse must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.ellipse with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.ellipse must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.ellipse with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.ellipse must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.ellipse must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.ellipse with too few arguments must throw TypeError@@ -979,8 +979,8 @@ Pass SVGLineElement interface: objects.line must inherit property "y2" with thePass SVGGeometryElement interface: objects.line must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.line must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.line with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.line must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.line with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.line must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.line with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.line must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.line must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.line with too few arguments must throw TypeError@@ -1043,8 +1043,8 @@ Pass SVGPolylineElement interface: objects.polyline must inherit property "animaPass SVGGeometryElement interface: objects.polyline must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.polyline must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.polyline with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.polyline must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.polyline with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.polyline must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.polyline with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.polyline must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.polyline must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.polyline with too few arguments must throw TypeError@@ -1075,8 +1075,8 @@ Pass SVGPolygonElement interface: objects.polygon must inherit property "animatePass SVGGeometryElement interface: objects.polygon must inherit property "pathLength" with the proper typePass SVGGeometryElement interface: objects.polygon must inherit property "isPointInFill(optional DOMPointInit)" with the proper typePass SVGGeometryElement interface: calling isPointInFill(optional DOMPointInit) on objects.polygon with too few arguments must throw TypeError-Fail SVGGeometryElement interface: objects.polygon must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type-Fail SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.polygon with too few arguments must throw TypeError+Pass SVGGeometryElement interface: objects.polygon must inherit property "isPointInStroke(optional DOMPointInit)" with the proper type+Pass SVGGeometryElement interface: calling isPointInStroke(optional DOMPointInit) on objects.polygon with too few arguments must throw TypeErrorPass SVGGeometryElement interface: objects.polygon must inherit property "getTotalLength()" with the proper typePass SVGGeometryElement interface: objects.polygon must inherit property "getPointAtLength(float)" with the proper typePass SVGGeometryElement interface: calling getPointAtLength(float) on objects.polygon with too few arguments must throw TypeErrordiff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/path/property/test_style_flush_on_dom_api_with_d_property.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/path/property/test_style_flush_on_dom_api_with_d_property.txtindex c9981336879..66ab0960fed 100644--- a/Tests/LibWeb/Text/expected/wpt-import/svg/path/property/test_style_flush_on_dom_api_with_d_property.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/path/property/test_style_flush_on_dom_api_with_d_property.txt@@ -2,9 +2,8 @@ Harness status: OKFound 4 tests-3 Pass-1 Fail+4 PassPass getTotalLength() with d propertyPass getPointAtLength() with d propertyPass isPointInFill() with d property-Fail isPointInStroke() with d property\ No newline at end of file+Pass isPointInStroke() with d property\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/shapes/scripted/ellipse-auto-radii.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/shapes/scripted/ellipse-auto-radii.txtindex 8fcf67b09d7..ef5533c78fe 100644--- a/Tests/LibWeb/Text/expected/wpt-import/svg/shapes/scripted/ellipse-auto-radii.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/shapes/scripted/ellipse-auto-radii.txt@@ -2,12 +2,11 @@ Harness status: OKFound 7 tests-6 Pass-1 Fail+7 PassPass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, getTotalLength resolves auto rx/ry.Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, getTotalLength returns 0 when both rx and ry are auto.Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, getPointAtLength(0) at the 3 o'clock starting point.Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, isPointInFill resolves auto rx/ry.-Fail SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, isPointInStroke with dasharray resolves auto rx/ry.+Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, isPointInStroke with dasharray resolves auto rx/ry.Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, getTotalLength resolves auto rx/ry against percentage values on the correct axis.Pass SVG ellipse rx/ry auto resolution affects SVGGeometryElement methods, getPointAtLength(0) with percentage ry uses height-axis resolution.\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txtindex 9610f425e68..6eebca7e006 100644--- a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.txt@@ -2,17 +2,17 @@ Harness status: OKFound 13 tests-13 Fail-Fail SVGGeometryElement.prototype.isPointInStroke, no arguments.-Fail SVGGeometryElement.prototype.isPointInStroke, null/undefined.-Fail SVGGeometryElement.prototype.isPointInStroke, non-finite argument.-Fail SVGGeometryElement.prototype.isPointInStroke, functional test.-Fail SVGGeometryElement.prototype.isPointInStroke, functional test with zoom.-Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-dasharray'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-dashoffset'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-miterlimit'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-linejoin'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'stroke-linecap'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'pathLength'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'vector-effect'.-Fail SVGGeometryElement.prototype.isPointInStroke, 'visibility' and 'pointer-events' have no effect.\ No newline at end of file+13 Pass+Pass SVGGeometryElement.prototype.isPointInStroke, no arguments.+Pass SVGGeometryElement.prototype.isPointInStroke, null/undefined.+Pass SVGGeometryElement.prototype.isPointInStroke, non-finite argument.+Pass SVGGeometryElement.prototype.isPointInStroke, functional test.+Pass SVGGeometryElement.prototype.isPointInStroke, functional test with zoom.+Pass SVGGeometryElement.prototype.isPointInStroke, 'stroke-dasharray'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'stroke-dashoffset'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'stroke-miterlimit'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'stroke-linejoin'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'stroke-linecap'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'pathLength'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'vector-effect'.+Pass SVGGeometryElement.prototype.isPointInStroke, 'visibility' and 'pointer-events' have no effect.\ No newline at end of file