Bug 139417 - Incorrect rounding in feGaussianBlur filter effect
Summary: Incorrect rounding in feGaussianBlur filter effect
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-12-08 15:26 PST by Said Abou-Hallawa
Modified: 2023-05-14 18:41 PDT (History)
5 users (show)

See Also:


Attachments
Safari-Rendering (20.32 KB, image/png)
2014-12-08 15:26 PST, Said Abou-Hallawa
no flags Details
SVG test-case (323 bytes, image/svg+xml)
2023-05-14 18:39 PDT, Karl Dubost
no flags Details
rendering in safari, firefox, chrome (154.73 KB, image/png)
2023-05-14 18:41 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2014-12-08 15:26:45 PST
Created attachment 242854 [details]
Safari-Rendering

Open the following SVG in WebKit:

<svg xmlns="http://www.w3.org/2000/svg" version="1.0">
  <filter id="f1">
    <feGaussianBlur in="SourceGraphic" stdDeviation="0.000000000000000000000000001" />
  </filter>
  <rect width="100%" height="100%" fill="lime"/>
  <circle fill="red" r="98" cx="200" cy="100"/>
  <circle fill="lime" r="100" cx="200" cy="100" filter="url(#f1)"/>
</svg>

Result: A lime background with the bottom arch of the blur effect although the stdDeviation of the effect is almost equal to zero.
Expected: A pure lime background is drawn. The same background can be drawn if the filter effect above is changed to be: <feGaussianBlur in="SourceGraphic" stdDeviation="0" />

NOTE: Both Chrome and FireFox display this SVG as expected.
Comment 1 Radar WebKit Bug Importer 2014-12-08 15:27:21 PST
<rdar://problem/19182781>
Comment 2 Ahmad Saleem 2023-05-12 02:41:10 PDT
I am unable to reproduce this bug in Safari 16.4 and STP169. I think it might be something fixed macOS 13 update because some SVG bugs got fixed because of it.

If someone else confirm, we can close this as "RESOLVED CONFIGURATION CHANGED'.
Comment 3 Karl Dubost 2023-05-14 18:39:59 PDT
Created attachment 466350 [details]
SVG test-case

It's not sure the svg below is testing what is required to exhibit the issue. 

Because the current rendering is the same in the 3 browsers, in the context of 

```
data:text/html,<svg xmlns="http://www.w3.org/2000/svg" version="1.0"><filter id="f1"><feGaussianBlur in="SourceGraphic" stdDeviation="0.000000000000000000000000001" /></filter><rect width="100%" height="100%" fill="lime"/><circle fill="red" r="98" cx="200" cy="100"/><circle fill="lime" r="100" cx="200" cy="100" filter="url(#f1)%22/%3E%3C/svg%3E 
```
It gives a red circle inside a green rectangle which is being cutout.



Ha! This is still valid when loading directly as an SVG file. Adding a test case for it. 

I will add a screenshot
Comment 4 Karl Dubost 2023-05-14 18:41:02 PDT
Created attachment 466351 [details]
rendering in safari, firefox, chrome

Rendering in the latest versions of STP, nightly and canary as of today.