Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4046b9aec3fd2fca6aec5fa6ea10ed49e0f60395
https://github.com/WebKit/WebKit/commit/4046b9aec3fd2fca6aec5fa6ea10ed49e0f60395
Author: Ahmad Saleem <[email protected]>
Date: 2026-03-17 (Tue, 17 Mar 2026)
Changed paths:
M Source/WebCore/svg/SVGImageElement.cpp
Log Message:
-----------
SVG image element not repainted when href attribute is removed
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
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications