Repository navigation
Description
Moved from w3c/fxtf-drafts#324 (Markus Stange, 2018), still open there with "Needs SVGWG Input/Decision".
edgeMode on feGaussianBlur and feConvolveMatrix
"Determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image." (https://drafts.csswg.org/filter-effects-1/#element-attrdef-fegaussianblur-edgemode).
The spec does not say where the edges of the input image are: the extent of what the source painted, or the filter region (intersected with the primitive subregion, padded with transparent black).
<svg width="200" height="200">
<filter id="f" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur in="SourceAlpha" stdDeviation="6" edgeMode="duplicate"/>
</filter>
<rect x="70" y="70" width="60" height="60" filter="url(#f)"/>
</svg>- If the input image is the filter region, its edges are transparent, and this looks the same as
edgeMode="none", a blurred square. - If it is the rect's extent, the square is extended with its own opaque edge and stays sharp.
In fxtf-drafts#324 Dirk Schulze first answered:
"the input image has a size of 20x20 and not 100x100"
(the source's size), then the same day:
"maybe using the filter region might be the better choice here".
Markus Stange:
"Setting the image size of SourceGraphic and SourceAlpha to the filter region sounds good to me."
Gecko's feConvolveMatrix uses
"the intersection of the filter region and the primitive subregion" (Markus Stange, same issue).
No resolution followed.
Implementations of edgeMode on feGaussianBlur, 2026-12-03:
| example above | parses edgeMode on feGaussianBlur |
|
|---|---|---|
| Safari 27.3, Safari Technology Preview 257 | sharp square (rect's extent) | yes: none, duplicate; wrap drawn like duplicate; mirror not parsed |
| Firefox 163 | blurred, same as none |
no |
| Chrome 161 | blurred, same as none |
no |
- WPT has no rendering test for it.
- The IDL tests (
svg/types/scripted/SVGAnimatedEnumeration-*.html,css/filter-effects/idlharness.any.html) fail in Firefox and Chrome on everySVGFEGaussianBlurElementedgeModesubtest. - WebKit's own test
svg/filters/svg-gaussianblur-edgeMode-duplicate.svg(2013) expects the sharp square.
Related: w3c/fxtf-drafts#388 (feConvolveMatrix wrap with a kernel larger than the image) depends on the same size and is also still open there.
Activity