Skip to content

Commit

Permalink
Support <svg:image crossorigin>
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260724
rdar://114462749

Reviewed by Youenn Fablet.

Add support for the crossorigin attribute to SVGImageElement in a
manner analogous to HTMLImageElement.

Also remove a duplicate parser for the crossorigin attribute in
HTMLImageElement.

* LayoutTests/imported/w3c/web-platform-tests/svg/idlharness.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-construction.crossOriginSource.sub.html:
* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attributeChanged):
(): Deleted.
(WebCore::parseCrossoriginState): Deleted.
* Source/WebCore/svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::attributeChanged):
(WebCore::SVGImageElement::setCrossOrigin):
(WebCore::SVGImageElement::crossOrigin const):
* Source/WebCore/svg/SVGImageElement.h:
* Source/WebCore/svg/SVGImageElement.idl:

Canonical link: https://commits.webkit.org/267349@main
  • Loading branch information
annevk committed Aug 28, 2023
1 parent 4c7e11d commit 504cb35
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ PASS SVGImageElement interface: attribute y
PASS SVGImageElement interface: attribute width
PASS SVGImageElement interface: attribute height
PASS SVGImageElement interface: attribute preserveAspectRatio
FAIL SVGImageElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false
PASS SVGImageElement interface: attribute crossOrigin
PASS SVGImageElement interface: attribute href
PASS SVGImageElement must be primary interface of objects.image
PASS Stringification of objects.image
Expand All @@ -1309,7 +1309,7 @@ PASS SVGImageElement interface: objects.image must inherit property "y" with the
PASS SVGImageElement interface: objects.image must inherit property "width" with the proper type
PASS SVGImageElement interface: objects.image must inherit property "height" with the proper type
PASS SVGImageElement interface: objects.image must inherit property "preserveAspectRatio" with the proper type
FAIL SVGImageElement interface: objects.image must inherit property "crossOrigin" with the proper type assert_inherits: property "crossOrigin" not found in prototype chain
PASS SVGImageElement interface: objects.image must inherit property "crossOrigin" with the proper type
PASS SVGImageElement interface: objects.image must inherit property "href" with the proper type
PASS SVGGraphicsElement interface: objects.image must inherit property "transform" with the proper type
PASS SVGGraphicsElement interface: objects.image must inherit property "getBBox(optional SVGBoundingBoxOptions)" with the proper type
Expand Down
Loading

0 comments on commit 504cb35

Please sign in to comment.