Bug 139417

Summary: Incorrect rounding in feGaussianBlur filter effect
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, karlcow, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Safari-Rendering
none
SVG test-case
none
rendering in safari, firefox, chrome none

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.