Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0eadba6f98dc0665039ff9641b0e764492c261a2
https://github.com/WebKit/WebKit/commit/0eadba6f98dc0665039ff9641b0e764492c261a2
Author: Taher Ali <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
M LayoutTests/fast/images/stopped-animation-deleted-image.html
A LayoutTests/svg/custom/resources/animated-gif-for-use-test.gif
A LayoutTests/svg/custom/use-animated-image-opacity-change-expected.txt
A LayoutTests/svg/custom/use-animated-image-opacity-change.html
M Source/WebCore/rendering/RenderImageResource.cpp
Log Message:
-----------
Animated GIF freezes when presentation attributes are changed on SVG image
referenced by use element
https://bugs.webkit.org/show_bug.cgi?id=314093
rdar://96837306
Reviewed by Said Abou-Hallawa.
When an SVG <image> element displaying an animated GIF is referenced by a
<use> element, rapidly changing a presentation attribute like opacity causes
the animation to freeze.
Each setAttribute call triggers invalidateInstances(), which rebuilds the
<use> shadow tree. The clone's renderer destruction calls
RenderImageResource::willBeDestroyed(), which unconditionally calls
stopAnimation() on the shared BitmapImage. Since the animation timer is
killed faster than the frame duration, it never fires to advance frames.
* LayoutTests/svg/custom/resources/animated-gif-for-use-test.gif: Added.
* LayoutTests/svg/custom/use-animated-image-opacity-change-expected.txt: Added.
* LayoutTests/svg/custom/use-animated-image-opacity-change.html: Added.
* Source/WebCore/rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::willBeDestroyed):
Canonical link: https://commits.webkit.org/313531@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications