Bug 256422 - [SameObject] missing from few SVG IDL files
Summary: [SameObject] missing from few SVG IDL files
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 163414
Blocks:
  Show dependency treegraph
 
Reported: 2023-05-06 18:34 PDT by Ahmad Saleem
Modified: 2024-03-18 15:42 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-05-06 18:34:52 PDT
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!
Comment 1 Chris Dumez 2023-05-06 19:15:50 PDT
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.
Comment 2 Ahmad Saleem 2023-05-06 19:16:46 PDT
(In reply to Chris Dumez from comment #1)
> 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.

So then is it Invalid bug?
Comment 3 Chris Dumez 2023-05-06 20:30:57 PDT
(In reply to Ahmad Saleem from comment #2)
> (In reply to Chris Dumez from comment #1)
> > 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.
> 
> 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.
Comment 4 Radar WebKit Bug Importer 2023-05-13 18:35:19 PDT
<rdar://problem/109311723>