<?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>254757</bug_id>
          
          <creation_ts>2023-03-30 11:43:11 -0700</creation_ts>
          <short_desc>SVGPathSegValue::clone&lt;&gt;() rename to SVGPathSegValue::cloneInternal&lt;&gt;()</short_desc>
          <delta_ts>2023-04-06 16:23:15 -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=254758</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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</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>1945424</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-30 11:43:11 -0700</bug_when>
    <thetext>SVGPathSeg has a virtual function SVGPathSeg::clone which you would expect to clone any SVGPathSeg, retaining its derived type. However, the virtual clone gets hidden by SVGPathSegValue&lt;PathSegType&gt;::clone because templated functions are never virtual. I think this means a clone operation on a SVGPathSeg pointer will work correctly if the SVGPathSeg is a SVGPathSegValue. This problem was found by GCC 13&apos;s -Woverloaded-virtual warning.

I don&apos;t know what to do about this. For now I&apos;ll just suppress the warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945426</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-30 11:46:34 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; I think this means a clone operation on a
&gt; SVGPathSeg pointer will work correctly if the SVGPathSeg is a
&gt; SVGPathSegValue.

I meant: will not work correctly. The SVGPathSegValue&lt;PathSegType&gt;::clone would only get called via a pointer to an SVGPathSegValue&lt;PathSegType&gt;. With a pointer to an SVGPathSeg, I think the program should abort with a runtime error due to unimplemented virtual function?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947054</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-06 11:44:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/107719787&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947105</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2023-04-06 13:41:17 -0700</bug_when>
    <thetext>I think this might be a bug or limitation in GCC 13 complier. The clang complier considers the template function SVGPathSegValue::clone&lt;&gt;() different from the virtual function SVGPathSeg::clone() so it does not generate an error saying the template function hides the virtual implementations.

Open LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg in the debugger and set a breakpoint in SVGPathSegMovetoAbs::clone(). In Xcode the debugger breaks at the function.

SVGPathSegValue::clone&lt;&gt;() should be renamed to SVGPathSegValue::cloneInternal&lt;&gt;(). So the code can be complied on GCC 13 without the need for -Woverloaded-virtual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947114</commentid>
    <comment_count>4</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2023-04-06 13:51:42 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12476</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947159</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-06 16:23:13 -0700</bug_when>
    <thetext>Committed 262690@main (9fc3aff2f387): &lt;https://commits.webkit.org/262690@main&gt;

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

    </bug>

</bugzilla>