<?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>311469</bug_id>
          
          <creation_ts>2026-04-04 01:49:42 -0700</creation_ts>
          <short_desc>SVGPointList should truncate on odd coordinate count instead of clearing the entire list</short_desc>
          <delta_ts>2026-04-09 20:03:18 -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>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=309219</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/59084</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="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <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>2196815</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-04-04 01:49:42 -0700</bug_when>
    <thetext>Hi Team,

Found recently progressed and now with missing coverage failing test, so this is to fix it. 

Per SVG 2 spec [1], when a polyline/polygon points attribute contains an odd number of coordinates (e.g. &quot;0,0 100,0 20&quot; where the trailing y value is missing), the successfully parsed coordinate pairs should be retained. Currently WebKit rejects the entire list and returns 0 items, instead of keeping the 2 valid pairs.
 
This is covered by the WPT test svg/types/scripted/SVGList-parse-invalid-clears-items.html, subtest &quot;SVGPointList truncates items when y attribute value is missing&quot;.
 
The fix changes SVGPointList::parse() to break out of the parse loop when x succeeds but y is missing at end-of-string, retaining already-parsed pairs. Invalid tokens (e.g. &quot;INVALID&quot;) at any  position still correctly clear the entire list.
 
[1] https://svgwg.org/svg2-draft/shapes.html#PolylineElement — &quot;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 &apos;path&apos; element.&quot;

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2196816</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-04-04 01:50:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/174069252&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2196817</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-04-04 01:53:32 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62027</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2198111</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-08 14:55:24 -0700</bug_when>
    <thetext>Committed 310798@main (31e8f16d17b1): &lt;https://commits.webkit.org/310798@main&gt;

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

    </bug>

</bugzilla>