SVG image element not repainted when href attribute is removed#60612
Conversation
|
EWS run on previous version of this PR (hash 28f6d78) Details |
|
I looked into whether this fixes failure on LBSE as well but I think it is more involved in case of LBSE. On LBSE, we don't render anything on these tests with and without patch. |
|
Are we skipping these tests locally? Seems worth figuring out why it doesn’t reproduce on WKTR as otherwise it could regress again. |
I added this in commit message already: I don't know why WKTR is doing this or not - we can investigate this separately, happy to file follow-up bug. |
|
Filed for investigation - https://bugs.webkit.org/show_bug.cgi?id=309945 |
|
I saw that, but now is the best time to investigate. If this code gets refactored it might get quite involved. |
Can you elaborate on how this might get more involved. Because I think it is separate issue and has nothing to do with fixing the issue, where we fail tests. |
28f6d78 to
e66a5d9
Compare
|
EWS run on current version of this PR (hash e66a5d9) Details |
https://bugs.webkit.org/show_bug.cgi?id=309937 rdar://172530834 Reviewed by Nikolas Zimmermann. When removing the href or xlink:href attribute from an SVG <image> element, the image loader clears its cached image but the renderer is never invalidated, so stale pixels remain on screen. Add updateSVGRendererForElementChange() to the URI attribute change path in SVGImageElement::svgAttributeChanged, matching the pattern used for other visual attribute changes like preserveAspectRatio. This is covered by image-remove-href-1.svg and image-remove-href-3.svg test cases, which we fail as per WPT dashboard but they don't have any failing expectations but with this patch, my local build show them as passing and show 'green' rect rather than 'red'. * Source/WebCore/svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): Canonical link: https://commits.webkit.org/309397@main
e66a5d9 to
4046b9a
Compare
|
Committed 309397@main (4046b9a): https://commits.webkit.org/309397@main Reviewed commits have been landed. Closing PR #60612 and removing active labels. |
🛠 vision-apple

4046b9a
e66a5d9
🛠 mac🛠 win🧪 wpe-wk2🧪 win-tests🧪 api-mac🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 mac-wk1🧪 mac-wk2🧪 gtk-wk2🛠 vision-sim🧪 mac-wk2-stress🛠 playstation🧪 mac-intel-wk2🛠 tv-sim🛠 watch🛠 watch-sim