Bug 200964

Summary: CHART.XKCD charts don't work in Safari
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, rniwa, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Reduction
none
Reduction none

Simon Fraser (smfr)
Reported 2019-08-20 20:46:33 PDT
https://timqian.com/chart.xkcd/ Scroll down to the Line Char and Bar Chart examples. They are missing the lines and bars in Safari. Works in Firefox and Chrome
Attachments
Reduction (2.00 KB, text/html)
2019-08-20 20:52 PDT, Simon Fraser (smfr)
no flags
Reduction (914 bytes, text/html)
2019-08-20 20:56 PDT, Simon Fraser (smfr)
no flags
Radar WebKit Bug Importer
Comment 1 2019-08-20 20:46:50 PDT
Simon Fraser (smfr)
Comment 2 2019-08-20 20:52:57 PDT
Created attachment 376841 [details] Reduction
Simon Fraser (smfr)
Comment 3 2019-08-20 20:53:19 PDT
It's a problem with the filter: <filter id="xkcdify" filterunits="userSpaceOnUse" x="-1000" y="-1000" width="10000" height="10000"> <feturbulence type="fractalNoise" basefrequency="0.05" result="noise"></feturbulence> <fedisplacementmap scale="5" xchannelselector="R" ychannelselector="G" in="SourceGraphic" in2="noise"></fedisplacementmap> </filter>
Simon Fraser (smfr)
Comment 4 2019-08-20 20:55:51 PDT
Seems to be caused by the large width and height of the filter.
Simon Fraser (smfr)
Comment 5 2019-08-20 20:56:16 PDT
Created attachment 376843 [details] Reduction
Simon Fraser (smfr)
Comment 6 2019-08-21 08:52:43 PDT
FilterEffect::apply() silently early returns at ImageBuffer::sizeNeedsClamping(m_absolutePaintRect.size())
Simon Fraser (smfr)
Comment 7 2019-08-21 09:11:30 PDT
Other browsers seem to be able to handle arbitrarily large width and height on the <filter> element (presumably they only make it as big as it needs to be).
Said Abou-Hallawa
Comment 8 2019-08-21 09:38:45 PDT
A related problem here is: I think the SVG shape should be rendered without filters if any of them fails to apply. The SVG rendering pipeline applies the SVG filters in the destructor SVGRenderingContext::~SVGRenderingContext(). So it is too late to fall back to drawing the shape at this stage. But I think we should change this structure and make it easier to detect errors and draw the minimum we could instead of drawing nothing.
Ahmad Saleem
Comment 9 2022-07-18 11:43:24 PDT
I am able to reproduce this bug using attached reduction in Safari 15.5 on macOS 12.4 and the test case does not render / show SVG like other browsers (Chrome Canary 105 and Firefox Nightly 104). Thanks!
Note You need to log in before you can comment on or make changes to this bug.