<?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>309219</bug_id>
          
          <creation_ts>2026-03-04 21:02:04 -0800</creation_ts>
          <short_desc>Make sure than when polyline have an odd number (missing coordinates), we drop the last one and draws the rest.</short_desc>
          <delta_ts>2026-04-04 01:56:39 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=311469</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</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>2187218</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-04 21:02:04 -0800</bug_when>
    <thetext>This pull request 
https://github.com/WebKit/WebKit/pull/59513
erroneously changed LayoutTests/svg/custom/poly-parsing-error.html

SVG2 specification specifies what should happen in case of an odd number of coordinates.

&gt; If an odd number of coordinates is provided, then the element is in error, with the same user agent behavior as occurs with an incorrectly specified ‘path’ element. In such error cases the user agent will drop the last, odd coordinate and otherwise render the shape. — https://w3c.github.io/svgwg/svg2-draft/shapes.html#PolylineElementPointsAttribute


This is a square. 

&lt;svg width=&quot;100px&quot; height=&quot;100px&quot; viewBox=&quot;0 0 300 300&quot;&gt;
  &lt;desc&gt;polyline odd number of points coordinates&lt;/desc&gt;
  &lt;polyline fill=&quot;none&quot; stroke=&quot;blue&quot; stroke-width=&quot;5&quot; 
            points=&quot;50,150
                    150,150 
                    150,50
                    50,50
                    50,150
                    &quot; /&gt;
&lt;/svg&gt;


5 points / missing last y coordinates. This should render like the next one.

&lt;svg width=&quot;100px&quot; height=&quot;100px&quot; viewBox=&quot;0 0 300 300&quot;&gt;
  &lt;desc&gt;polyline odd number of points coordinates&lt;/desc&gt;
  &lt;polyline fill=&quot;none&quot; stroke=&quot;blue&quot; stroke-width=&quot;5&quot; 
            points=&quot;50,150
                    150,150 
                    150,50
                    50,50
                    50
                    &quot; /&gt;
&lt;/svg&gt;


&lt;svg width=&quot;100px&quot; height=&quot;100px&quot; viewBox=&quot;0 0 300 300&quot;&gt;
  &lt;desc&gt;polyline odd number of points coordinates&lt;/desc&gt;
  &lt;polyline fill=&quot;none&quot; stroke=&quot;blue&quot; stroke-width=&quot;5&quot; 
            points=&quot;50,150
                    150,150 
                    150,50
                    50,50
                    &quot; /&gt;
&lt;/svg&gt;

Question, what should happen when a point in the middle is incorrect.


Make a WPT test for polyline.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189400</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-11 22:02:10 -0700</bug_when>
    <thetext>&lt;rdar://problem/172341540&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>