NEW 269477
auto-start-reverse WPT is failing
https://bugs.webkit.org/show_bug.cgi?id=269477
Summary auto-start-reverse WPT is failing
Karl Dubost
Reported 2024-02-15 10:03:49 PST
In expose auto-start-reverse enum value https://bugzilla.mozilla.org/show_bug.cgi?id=1685543 related to https://github.com/w3c/svgwg/issues/424 > RESOLVED: Where SVG 2 has added a new attribute value for an attribute that has an existing DOM enumeration, we will add matching new enumeration values https://github.com/w3c/svgwg/issues/424#issuecomment-387176205 The spec is: https://svgwg.org/svg2-draft/painting.html#InterfaceSVGMarkerElement Currently Safari fails: https://wpt.fyi/results/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html What the test is doing. function createMarker() { let markerElement = document.createElementNS("http://www.w3.org/2000/svg", "marker"); markerElement.setAttribute("markerUnits", "userSpaceOnUse"); markerElement.setAttribute("orient", "auto"); return markerElement; } let markerElement = createMarker(); // Switch to 'auto-start-reverse' value - by modifying orientType. markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE; assert_equals(markerElement.orientAngle.baseVal.value, 0); assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_UNSPECIFIED); assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE); assert_equals(markerElement.getAttribute('orient'), "auto-start-reverse"); }, "Test auto-start-reverse");
Attachments
Karl Dubost
Comment 1 2024-02-15 10:07:22 PST
but it seems the spec has not been updated yet?! I don't see SVG_MARKER_ORIENT_AUTO_START_REVERSE
Ahmad Saleem
Comment 2 2024-02-15 11:26:11 PST
Some WPTs: > marker-orient-001.svg > SVGAnimatedEnumeration-SVGMarkerElement.html > animate-marker-orient-from-auto-to-auto-start-reverse.html ___ NOTE - from `See Also` - we do support it but I think we don't have all the hooks configured properly or something else. Still need to investigate but adding information here as note keeping.
Karl Dubost
Comment 3 2024-02-15 17:19:49 PST
The goal is to add const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3; to the idl file https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGMarkerElement.idl The equivalent on Gecko https://searchfox.org/mozilla-central/source/dom/webidl/SVGMarkerElement.webidl But to make sure to not break anything too. So probably a couple of modifications in the process. Once it is done, all the tests from https://wpt.fyi/results/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html will pass.
Ahmad Saleem
Comment 4 2024-02-15 18:29:22 PST
(In reply to Karl Dubost from comment #3) > The goal is to add > const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3; > to the idl file > https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGMarkerElement.idl > > The equivalent on Gecko > https://searchfox.org/mozilla-central/source/dom/webidl/SVGMarkerElement. > webidl > > But to make sure to not break anything too. So probably a couple of > modifications in the process. > > Once it is done, all the tests from > https://wpt.fyi/results/svg/types/scripted/SVGAnimatedEnumeration- > SVGMarkerElement.html > > will pass. Tried this: > Source/WebCore/svg/SVGMarkerElement.idl: const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3; > Source/WebCore/svg/SVGMarkerTypes.h (in enum - SVGMarkerOrientType): Change: SVGMarkerOrientAutoStartReverse = SVGMarkerOrientUnknown to: SVGMarkerOrientAutoStartReverse > Source/WebCore/svg/SVGMarkerElement.h (in enum): SVG_MARKER_ORIENT_AUTO_START_REVERSE = SVGMarkerOrientAutoStartReverse and (this might not be required): void setOrientToAutoReverseAngle(const SVGAngle&); > Source/WebCore/svg/SVGMarkerElement.cpp: void SVGMarkerElement::setOrientToAutoReverseAngle(const SVGAngle& autoreverseangle) { Ref { m_orientAngle } -> baseVal()->newValueSpecifiedUnits(autoreverseangle.unitType(), autoreverseangle.valueInSpecifiedUnits()); invalidateMarkerResource(); } (Similar to setOrientToAuto) - but need fixing. ___ This compiles but don't progress anything and get 'Type Error'. Just initial start.
Karl Dubost
Comment 5 2024-02-15 21:52:49 PST
Radar WebKit Bug Importer
Comment 6 2024-02-22 10:04:26 PST
Note You need to log in before you can comment on or make changes to this bug.