-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An SVG element with a CSS reference filter fails to repaint when the …
…filter changes https://bugs.webkit.org/show_bug.cgi?id=263229 rdar://117047658 Reviewed by Nikolas Zimmermann. If an SVG element has a CSS filter which references an SVG element (which may be a child of that SVG, or some other SVG in the document), then we fail to repaint the SVG when the filter changes. This is a followup to 267236@main, removing the `&& !renderer().isSVGRootOrLegacySVGRoot()` check in `RenderLayer::updateFiltersAfterStyleChange()`, since in this configuration we do need to have the RenderLayer track the filter dependencies. * LayoutTests/svg/filters/css-repaint-reference-filter-on-root-expected.txt: Added. * LayoutTests/svg/filters/css-repaint-reference-filter-on-root.html: Added. * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateFiltersAfterStyleChange): Canonical link: https://commits.webkit.org/269413@main
- Loading branch information
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
LayoutTests/svg/filters/css-repaint-reference-filter-on-root-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(repaint rects | ||
(rect 49 313 100 111) | ||
) | ||
|
46 changes: 46 additions & 0 deletions
46
LayoutTests/svg/filters/css-repaint-reference-filter-on-root.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
svg { | ||
display: block; | ||
margin: 20px; | ||
height: 200px; | ||
} | ||
|
||
.container { | ||
padding: 10px; | ||
width: 300px; | ||
margin: 10px; | ||
border: 1px solid black; | ||
} | ||
</style> | ||
<script src="../../fast/repaint/resources/text-based-repaint.js"></script> | ||
<script> | ||
function repaintTest() | ||
{ | ||
let filter = document.getElementById('targetFilter'); | ||
filter.querySelector('feColorMatrix').setAttribute('values', '90') | ||
} | ||
|
||
window.addEventListener('load', () => { | ||
runRepaintTest(); | ||
}, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<svg id="gammaTarget1" width="100" height="100"> | ||
<filter id="targetFilter"> | ||
<feColorMatrix type="hueRotate" values="180" /> | ||
</filter> | ||
<rect width="100" height="100" fill="red" filter="url(#targetFilter)"/> | ||
</svg> | ||
</div> | ||
<div class="container"> | ||
<svg width="100" height="100" style="filter: url(#targetFilter);"> | ||
<rect width="100" height="100" fill="red"/> | ||
</svg> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters