<?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>256422</bug_id>
          
          <creation_ts>2023-05-06 18:34:52 -0700</creation_ts>
          <short_desc>[SameObject] missing from few SVG IDL files</short_desc>
          <delta_ts>2024-03-18 15:42:56 -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>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>
          <dependson>163414</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1953451</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-06 18:34:52 -0700</bug_when>
    <thetext>Hi Team,

While going through few files, I noticed that the [SameObject] is missing from following:

* Source/WebCore/svg/SVGAnimatedLengthList.idl:

It should be:

[SameObject] readonly attribute SVGLengthList baseVal;
[SameObject] readonly attribute SVGLengthList animVal;

As per spec: https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedLengthList

* Source/WebCore/svg/SVGAnimatedNumberList.idl:

[SameObject] readonly attribute SVGNumberList baseVal;
[SameObject] readonly attribute SVGNumberList animVal;

As per spec: https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumberList

* Source/WebCore/svg/SVGAnimatedRect.idl:

[SameObject] readonly attribute SVGRect baseVal;
[SameObject] readonly attribute SVGRect animVal;

https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedRect

^ As per spec, it should be DOMRec and DOMRectReadOnly as well.

* Source/WebCore/svg/SVGImageElement.idl:

[SameObject] readonly attribute SVGAnimatedLength x;
[SameObject] readonly attribute SVGAnimatedLength y;
[SameObject] readonly attribute SVGAnimatedLength width;
[SameObject] readonly attribute SVGAnimatedLength height;
[SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;

As per spec - https://svgwg.org/svg2-draft/embedded.html#InterfaceSVGImageElement

_______

There might be more cases but just highlighting few examples.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953459</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-05-06 19:15:50 -0700</bug_when>
    <thetext>FYI, SameObject in the IDL in WebKit has no effect. Implementing the behavior of SameObject is actually involves either using [CachedAttribute] or a custom JS bindings visitor function.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953460</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-06 19:16:46 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #1)
&gt; FYI, SameObject in the IDL in WebKit has no effect. Implementing the
&gt; behavior of SameObject is actually involves either using [CachedAttribute]
&gt; or a custom JS bindings visitor function.

So then is it Invalid bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953464</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-05-06 20:30:57 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #2)
&gt; (In reply to Chris Dumez from comment #1)
&gt; &gt; FYI, SameObject in the IDL in WebKit has no effect. Implementing the
&gt; &gt; behavior of SameObject is actually involves either using [CachedAttribute]
&gt; &gt; or a custom JS bindings visitor function.
&gt; 
&gt; So then is it Invalid bug?

No necessarily, we would have to write tests to verify if those attributes always return the same object or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955277</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-13 18:35:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/109311723&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>