Animated GIF freezes when presentation attributes are changed on SVG image referenced by use element#64180
Conversation
|
EWS run on previous version of this PR (hash 0a6626a) Details |
iOS Safer C++ Build #18044 (0a6626a)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
macOS Safer C++ Build #99707 (0a6626a)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
0a6626a to
2afe75f
Compare
|
EWS run on previous version of this PR (hash 2afe75f) Details |
2afe75f to
03c5643
Compare
|
EWS run on previous version of this PR (hash 03c5643) Details |
iOS Safer C++ Build #18792 (2afe75f)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
macOS Safer C++ Build #100393 (2afe75f)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
| { | ||
| CachedImage* cachedImage = nullptr; | ||
| if (auto* htmlImage = dynamicDowncast<HTMLImageElement>(element)) | ||
| cachedImage = htmlImage->cachedImage(); |
There was a problem hiding this comment.
This is awkward. We still have the other function imageFromImageElement(HTMLImageElement& element). Since the code is repeated for HTMLImageElement and SVGImageElement, cannot we use templates?
There was a problem hiding this comment.
I don't think templates help here. However, we can replace imageFromImageElement and have everything go through the new imageFromElement
|
One thing I've observed is that a single This matters because if you remove a single edit: I've solved this by removing the renderer as client first and then checking |
03c5643 to
a772916
Compare
|
EWS run on previous version of this PR (hash a772916) Details |
a772916 to
40f4e66
Compare
|
EWS run on previous version of this PR (hash 40f4e66) Details |
40f4e66 to
6df3aab
Compare
|
EWS run on previous version of this PR (hash 6df3aab) Details |
6df3aab to
2de6cac
Compare
|
EWS run on previous version of this PR (hash 2de6cac) Details |
2de6cac to
76498b6
Compare
|
EWS run on previous version of this PR (hash 76498b6) Details
|
76498b6 to
03c0aad
Compare
|
EWS run on previous version of this PR (hash 03c0aad) Details |
03c0aad to
875a2bd
Compare
|
EWS run on previous version of this PR (hash 875a2bd) Details |
875a2bd to
6085746
Compare
|
EWS run on current version of this PR (hash 6085746) Details |
…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
6085746 to
0eadba6
Compare
|
Committed 313531@main (0eadba6): https://commits.webkit.org/313531@main Reviewed commits have been landed. Closing PR #64180 and removing active labels. |
🛠 vision-apple
0eadba6
6085746
🧪 ios-wk2-wpt