Bug 200964 - CHART.XKCD charts don't work in Safari
Summary: CHART.XKCD charts don't work in Safari
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2019-08-20 20:46 PDT by Simon Fraser (smfr)
Modified: 2019-08-21 09:38 PDT (History)
4 users (show)

See Also:


Attachments
Reduction (2.00 KB, text/html)
2019-08-20 20:52 PDT, Simon Fraser (smfr)
no flags Details
Reduction (914 bytes, text/html)
2019-08-20 20:56 PDT, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 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
Comment 1 Radar WebKit Bug Importer 2019-08-20 20:46:50 PDT
<rdar://problem/54541463>
Comment 2 Simon Fraser (smfr) 2019-08-20 20:52:57 PDT
Created attachment 376841 [details]
Reduction
Comment 3 Simon Fraser (smfr) 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>
Comment 4 Simon Fraser (smfr) 2019-08-20 20:55:51 PDT
Seems to be caused by the large width and height of the filter.
Comment 5 Simon Fraser (smfr) 2019-08-20 20:56:16 PDT
Created attachment 376843 [details]
Reduction
Comment 6 Simon Fraser (smfr) 2019-08-21 08:52:43 PDT
FilterEffect::apply() silently early returns at ImageBuffer::sizeNeedsClamping(m_absolutePaintRect.size())
Comment 7 Simon Fraser (smfr) 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).
Comment 8 Said Abou-Hallawa 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.