Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 2a0b3d6

Browse files
chrishtrchromium-wpt-export-bot
authored andcommitted
Don't apply filter or clip-path in SVGForeignObjectPainter.
SVG foreign objects always have PaintLayers now, since they are stacking contexts. The filter and clip-path are applied by PaintLayerPainter. Therefore we shouldn't try to apply them in SVGForeignObjectPainter, nor should we early-out if they "fail" to apply. Bug: 989673 Change-Id: I4a20da8f8ea85d377b25d8376d591f36f172d854 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1743256 Commit-Queue: Chris Harrelson <[email protected]> Reviewed-by: Stephen Chenney <[email protected]> Cr-Commit-Position: refs/heads/master@{#685285}
1 parent d328e57 commit 2a0b3d6

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html>
2+
<svg>
3+
<foreignObject style="overflow: visible;"
4+
width="400" height="400" filter="url(#blur)">
5+
<div id=target>test</div>
6+
</foreignObject>
7+
<g>
8+
<defs>
9+
<filter id="blur">
10+
<feGaussianBlur stdDeviation="0.1"/>
11+
</filter>
12+
</defs>
13+
</g>
14+
</svg>
15+
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!doctype HTML>
2+
<title>Test that re-painting a foreignObject element with a filter works.</title>
3+
<link rel="match" href="filter-repaint-ref.html">
4+
<link rel="author" title="Chris Harrelson" href="mailto:[email protected]">
5+
<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#embedded-ForeignObjectElement"/>
6+
<svg>
7+
<foreignObject style="overflow: visible;"
8+
width="400" height="400" filter="url(#blur)">
9+
<div id=target>test</div>
10+
</foreignObject>
11+
<g>
12+
<defs>
13+
<filter id="blur">
14+
<feGaussianBlur stdDeviation="0.1"/>
15+
</filter>
16+
</defs>
17+
</g>
18+
</svg>
19+
<script>
20+
onload = () => {
21+
requestAnimationFrame(() => requestAnimationFrame(() =>
22+
target.style.width = '11px'));
23+
}
24+
</script>

0 commit comments

Comments
 (0)