WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
202791
SMIL animations of href / xlink:href of <image> have no visual effect
https://bugs.webkit.org/show_bug.cgi?id=202791
Summary
SMIL animations of href / xlink:href of <image> have no visual effect
Nikolas Zimmermann
Reported
2019-10-10 03:19:44 PDT
LayoutTests/svg/W3C-SVG-1.1/animate-elem-39-t.svg shows that SMIL animations of the <image> element href / xlink:href have no effect. A quick investigation shows that imageSourceURL() is the culprit, since it simply returns getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr) -- which is equal to the serialized baseVal of the underlying SVGAnimatedString, never reflecting the animVal. SVGURIReference::href() returns the right value, and also correctly handles href vs. xlink:href, since the baseVal is either reflecting href, or if xlink:href (if any of them is set). The only issue is that imageSourceURL() returns a reference to a const AtomString, and thus we cannot simply return href(). A quick hack to fix SMIL animations on the aforementioned testcase is: const AtomString& SVGImageElement::imageSourceURL() const { static NeverDestroyed<AtomString> tempAtom("tempAtom", AtomString::ConstructFromLiteral); AtomString& mutableAtom = tempAtom; mutableAtom = href(); return tempAtom; } We either have to give up the "const AtomString&" return value, or add a new AtomString m_imageSourceURL member to SVGImageElement. And obviously we need more test coverage!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-07-01 15:10:35 PDT
<
rdar://problem/96316808
>
Ahmad Saleem
Comment 2
2023-06-30 14:13:55 PDT
Fixed in Blink by giving up on AtomString& and just returning ("href()").
https://src.chromium.org/viewvc/blink?view=revision&revision=157025
Ahmad Saleem
Comment 3
2024-09-09 18:11:30 PDT
(In reply to Ahmad Saleem from
comment #2
)
> Fixed in Blink by giving up on AtomString& and just returning ("href()"). > >
https://src.chromium.org/viewvc/blink?view=revision&revision=157025
SVG link is gone -
https://source.chromium.org/chromium/chromium/src/+/93976b6624f40024070bea7dde68e81a3d366173
Ahmad Saleem
Comment 4
2026-03-20 21:44:08 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/61066
EWS
Comment 5
2026-03-30 09:30:31 PDT
Committed
310236@main
(4a210d1278f1): <
https://commits.webkit.org/310236@main
> Reviewed commits have been landed. Closing PR #61066 and removing active labels.
Brent Fulgham
Comment 6
2026-04-29 10:09:18 PDT
This change is present in Safari Technology Preview 242. Please install that revision or newer to confirm the fix. Release notes:
https://webkit.org/blog/17934/release-notes-for-safari-technology-preview-242/
Brent Fulgham
Comment 7
2026-04-29 11:46:08 PDT
This change is present in Safari Technology Preview 241. Please install that revision or newer to confirm the fix. Release notes:
https://webkit.org/blog/17917/release-notes-for-safari-technology-preview-241/
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug