Bug 188950

Summary: CSS reference filter that references a tiled feTurbulence is blank
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: SVGAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://codepen.io/yoksel/pen/BOjmqj?editors=1000
Bug Depends on: 189248    
Bug Blocks:    
Attachments:
Description Flags
Reduction
none
Patch
none
Patch
dino: review+
Patch none

Description Simon Fraser (smfr) 2018-08-25 20:40:46 PDT
https://codepen.io/yoksel/pen/BOjmqj?editors=1000 shows blank in WebKit (macOS and iOS). It works in Firefox.
Comment 1 Radar WebKit Bug Importer 2018-08-25 20:41:13 PDT
<rdar://problem/43724286>
Comment 2 Simon Fraser (smfr) 2018-08-28 21:02:10 PDT
In debug builds we assert:

ASSERTION FAILED: tileWidth > 0 && tileHeight > 0
./platform/graphics/filters/FETurbulence.cpp(188) : FETurbulence::StitchData WebCore::FETurbulence::computeStitching(WebCore::IntSize, float &, float &) const
1   0x116495479 WTFCrash
2   0x105b0fe4b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x1088fd976 WebCore::FETurbulence::computeStitching(WebCore::IntSize, float&, float&) const
4   0x1088ff138 WebCore::FETurbulence::platformApplySoftware()
5   0x1089005a4 WebCore::FilterEffect::apply()
Comment 3 Simon Fraser (smfr) 2018-08-28 21:05:37 PDT
If we early return to avoid the assertion, the content renders, but the turbulence seems to have the wrong resolution on Retina displays.
Comment 4 Simon Fraser (smfr) 2018-08-31 20:45:41 PDT
Created attachment 348704 [details]
Reduction

Seems related to stitchTiles="stitch" on feTurbulence
Comment 5 Simon Fraser (smfr) 2018-08-31 21:02:18 PDT
tile size is computed from filterPrimitiveSubregion, which we never compute for CSS filters.
Comment 6 Simon Fraser (smfr) 2018-09-03 22:16:45 PDT Comment hidden (obsolete)
Comment 7 Simon Fraser (smfr) 2018-09-03 22:17:04 PDT Comment hidden (obsolete)
Comment 8 Simon Fraser (smfr) 2018-09-04 13:51:42 PDT
Created attachment 348844 [details]
Patch
Comment 9 Simon Fraser (smfr) 2018-09-04 14:44:13 PDT
Created attachment 348848 [details]
Patch
Comment 10 WebKit Commit Bot 2018-09-04 15:51:54 PDT
Comment on attachment 348848 [details]
Patch

Clearing flags on attachment: 348848

Committed r235644: <https://trac.webkit.org/changeset/235644>