WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
315522
[regression] feGaussianBlur in filter is not applied if the stdDeviation contains a 0 in the pair
https://bugs.webkit.org/show_bug.cgi?id=315522
Summary
[regression] feGaussianBlur in filter is not applied if the stdDeviation cont...
Nikolas Zimmermann
Reported
2026-05-25 14:45:46 PDT
Created
attachment 479820
[details]
Rendering comparison LayoutTests/svg/filters/feGaussianBlur.svg used to render fine in WebKit, now MiniBrowser looks different from Firefox/Chrome -- I didn't investigate further.
Attachments
Rendering comparison
(592.43 KB, image/png)
2026-05-25 14:45 PDT
,
Nikolas Zimmermann
no flags
Details
rendering in minibrowser, safari, firefox, chrome
(229.07 KB, image/png)
2026-05-25 17:46 PDT
,
Karl Dubost
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2026-05-25 17:46:29 PDT
Created
attachment 479821
[details]
rendering in minibrowser, safari, firefox, chrome LayoutTests/svg/filters/feGaussianBlur.svg From left to right * minibrowser: commit e3c460f943a83d5f57c5adb2326a437a3d98110d (HEAD -> main, origin/main, origin/HEAD) * STP 244 (WebKit 22625.1.17.19.1) * Firefox Nightly 153.0a1 (2026-05-20) (aarch64) * Chrome Canary 150.0.7857.0 (Official Build) canary (arm64) The most visible effects are on the second and third square. which if I reduced the SVG corresponds to the 2nd and 3rd in this markup. The first one being 0. <svg version="1.1" xmlns="
http://www.w3.org/2000/svg
" xmlns:xlink="
http://www.w3.org/1999/xlink
"> <defs> <filter id="0x0"> <feGaussianBlur stdDeviation="0"/> </filter> <filter id="0x5"> <feGaussianBlur stdDeviation="0 5"/> </filter> <filter id="5x0"> <feGaussianBlur stdDeviation="5 0"/> </filter> </defs> <g filter="url(#0x0)" transform="translate(10, 10)"> <rect x="0" y="0" width="50" height="50" fill="red"/> <rect x="25" y="25" width="50" height="50" fill="blue"/> </g> <g filter="url(#0x5)" transform="translate(110, 10)"> <rect x="0" y="0" width="50" height="50" fill="red"/> <rect x="25" y="25" width="50" height="50" fill="blue"/> </g> <g filter="url(#5x0)" transform="translate(210, 10)"> <rect x="0" y="0" width="50" height="50" fill="red"/> <rect x="25" y="25" width="50" height="50" fill="blue"/> </g> </svg> OK found the issue in the markup. Each time stdDeviation attribute contains a `0` (whichever the order), the gaussian blur is not applied. <svg> <defs> <filter id="testPASS"> <feGaussianBlur stdDeviation="0.0001 5" /> </filter> <filter id="testFAIL"> <feGaussianBlur stdDeviation="0 5" /> </filter> </defs> <g filter="url(#testPASS)" transform="translate(10, 10)"> <rect x="0" y="0" width="50" height="50" fill="red" /> <rect x="25" y="25" width="50" height="50" fill="blue" /> </g> <g filter="url(#testFAIL)" transform="translate(110, 10)"> <rect x="0" y="0" width="50" height="50" fill="red" /> <rect x="25" y="25" width="50" height="50" fill="blue" /> </g> </svg>
Radar WebKit Bug Importer
Comment 2
2026-05-25 17:47:03 PDT
<
rdar://problem/177906905
>
Karl Dubost
Comment 3
2026-05-25 17:56:06 PDT
https://drafts.csswg.org/filter-effects-1/#feGaussianBlurElement
stdDeviation = "<number-optional-number>" The standard deviation for the blur operation. These are the requirements from the spec. 1. If two <number> s are provided, a. the first number represents a standard deviation value along the x-axis of the coordinate system established by attribute primitiveUnits on the filter element. b. The second value represents a standard deviation in Y. 2. If one number is provided, then that value is used for both X and Y. 3. A negative value or a value of zero disables the effect of the given filter primitive (i.e., the result is the filter input image). 4. If stdDeviation is 0 in only one of X or Y, then the effect is that the blur is only applied in the direction that has a non-zero value. 5. The initial value for stdDeviation is 0. 6. Animatable: yes. Are 3 and 4 ambiguous as they seem to contradict each other? 3 says value of 0 disables the effect. 4 says value of 0 on one of the value disables only in the direction of the values. aka stdDeviation="X Y". if X=0 disables along X but Y applies. If Y=0 disables along Y but X applies.
Karl Dubost
Comment 4
2026-05-25 18:07:33 PDT
This was probably regressed by
https://github.com/WebKit/WebKit/commit/f4ce4a791de7
Bug 315118
https://github.com/WebKit/WebKit/pull/65208
Root cause — that patch rewrote the early-return guard in FEGaussianBlurSoftwareApplier::apply: // before: AND-zero (both axes must be zero to short-circuit) if (!m_effect->stdDeviationX() && !m_effect->stdDeviationY()) return true; // after: OR-zero (either axis being zero short-circuits) ← regression auto stdDeviation = m_effect->effectiveStdDeviation(filter.renderingOptions()); if (stdDeviation.isEmpty()) return true; FloatSize::isEmpty() is width <= 0 || height <= 0 (FloatSize.h:73), so stdDeviation="0 5" and "5 0" now bypass the blur entirely. Software path only — Core Image and Skia appliers feed σ straight to their backends and were never affected. Fix applied on branch 315522-fegaussianblur-zero-axis (1 file, 1 line): auto stdDeviation = m_effect->effectiveStdDeviation(filter.renderingOptions()); - if (stdDeviation.isEmpty()) + if (!stdDeviation.width() && !stdDeviation.height()) return true; A new WPT test should be added for this to catch the regression in the future.
Karl Dubost
Comment 5
2026-05-25 18:26:53 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65642
EWS
Comment 6
2026-05-26 03:39:57 PDT
Committed
313874@main
(19ba11bf04d0): <
https://commits.webkit.org/313874@main
> Reviewed commits have been landed. Closing PR #65642 and removing active labels.
Karl Dubost
Comment 7
2026-05-26 05:53:40 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/60174
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug