NEW 256422
[SameObject] missing from few SVG IDL files
https://bugs.webkit.org/show_bug.cgi?id=256422
Summary [SameObject] missing from few SVG IDL files
Ahmad Saleem
Reported 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!
Attachments
Chris Dumez
Comment 1 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.
Ahmad Saleem
Comment 2 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?
Chris Dumez
Comment 3 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.
Radar WebKit Bug Importer
Comment 4 2023-05-13 18:35:19 PDT
Note You need to log in before you can comment on or make changes to this bug.