Summary: | CHART.XKCD charts don't work in Safari | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | SVG | Assignee: | 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
Simon Fraser (smfr)
2019-08-20 20:46:33 PDT
Created attachment 376841 [details]
Reduction
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> Seems to be caused by the large width and height of the filter. Created attachment 376843 [details]
Reduction
FilterEffect::apply() silently early returns at ImageBuffer::sizeNeedsClamping(m_absolutePaintRect.size()) 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). 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. 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! |