<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>269477</bug_id>
          
          <creation_ts>2024-02-15 10:03:49 -0800</creation_ts>
          <short_desc>auto-start-reverse WPT is failing</short_desc>
          <delta_ts>2025-08-21 20:30:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=138456</see_also>
          <bug_file_loc>https://svgwg.org/svg2-draft/painting.html#InterfaceSVGMarkerElement</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>138456</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Karl Dubost">karlcow</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2013991</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-02-15 10:03:49 -0800</bug_when>
    <thetext>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

&gt; 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(&quot;http://www.w3.org/2000/svg&quot;, &quot;marker&quot;);
  markerElement.setAttribute(&quot;markerUnits&quot;, &quot;userSpaceOnUse&quot;);
  markerElement.setAttribute(&quot;orient&quot;, &quot;auto&quot;);
  return markerElement;
}



  let markerElement = createMarker();
  // Switch to &apos;auto-start-reverse&apos; 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(&apos;orient&apos;), &quot;auto-start-reverse&quot;);
}, &quot;Test auto-start-reverse&quot;);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2013993</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-02-15 10:07:22 -0800</bug_when>
    <thetext>but it seems the spec has not been updated yet?!
I don&apos;t see SVG_MARKER_ORIENT_AUTO_START_REVERSE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014031</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-02-15 11:26:11 -0800</bug_when>
    <thetext>Some WPTs:

&gt; marker-orient-001.svg
&gt; SVGAnimatedEnumeration-SVGMarkerElement.html
&gt; animate-marker-orient-from-auto-to-auto-start-reverse.html

___

NOTE - from `See Also` - we do support it but I think we don&apos;t have all the hooks configured properly or something else. Still need to investigate but adding information here as note keeping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014234</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-02-15 17:19:49 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014268</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-02-15 18:29:22 -0800</bug_when>
    <thetext>(In reply to Karl Dubost from comment #3)
&gt; The goal is to add
&gt;   const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
&gt; to the idl file
&gt; https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGMarkerElement.idl
&gt; 
&gt; The equivalent on Gecko 
&gt; https://searchfox.org/mozilla-central/source/dom/webidl/SVGMarkerElement.
&gt; webidl
&gt; 
&gt; But to make sure to not break anything too. So probably a couple of
&gt; modifications in the process. 
&gt; 
&gt; Once it is done, all the tests from 
&gt; https://wpt.fyi/results/svg/types/scripted/SVGAnimatedEnumeration-
&gt; SVGMarkerElement.html
&gt; 
&gt; will pass.

Tried this:

&gt; Source/WebCore/svg/SVGMarkerElement.idl:

const unsigned short SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;

&gt; Source/WebCore/svg/SVGMarkerTypes.h (in enum - SVGMarkerOrientType):

Change:

 SVGMarkerOrientAutoStartReverse = SVGMarkerOrientUnknown

to:

    SVGMarkerOrientAutoStartReverse

&gt; Source/WebCore/svg/SVGMarkerElement.h (in enum):

 SVG_MARKER_ORIENT_AUTO_START_REVERSE = SVGMarkerOrientAutoStartReverse

and (this might not be required):

void setOrientToAutoReverseAngle(const SVGAngle&amp;);

&gt; Source/WebCore/svg/SVGMarkerElement.cpp:

void SVGMarkerElement::setOrientToAutoReverseAngle(const SVGAngle&amp; autoreverseangle)
{
    Ref { m_orientAngle } -&gt; baseVal()-&gt;newValueSpecifiedUnits(autoreverseangle.unitType(), autoreverseangle.valueInSpecifiedUnits());
    invalidateMarkerResource();
}

(Similar to setOrientToAuto) - but need fixing.

___

This compiles but don&apos;t progress anything and get &apos;Type Error&apos;.

Just initial start.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014317</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-02-15 21:52:49 -0800</bug_when>
    <thetext>Ahmad,
This probably needs to be changed too. 

https://searchfox.org/wubkat/rev/c40451f6052e2805fb1c6abfb61fa322c67caf5b/Source/WebCore/svg/SVGMarkerTypes.h#40-48</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2016105</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-22 10:04:26 -0800</bug_when>
    <thetext>&lt;rdar://problem/123453058&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2137130</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-08-18 01:42:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/49526</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138156</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-08-21 20:30:06 -0700</bug_when>
    <thetext>Committed 299042@main (ced6588f9f23): &lt;https://commits.webkit.org/299042@main&gt;

Reviewed commits have been landed. Closing PR #49526 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>