Bug 247005

Summary: ASSERTION FAILED: !image->size().isEmpty() when setting zoom
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, dino, ews-watchlist, fmalita, gyuyoung.kim, pdr, rbuis, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=206897
https://bugs.webkit.org/show_bug.cgi?id=206579
https://bugs.webkit.org/show_bug.cgi?id=244580
Attachments:
Description Flags
Minimized testcase
none
Patch none

Description Frédéric Wang (:fredw) 2022-10-25 08:05:22 PDT
Created attachment 463215 [details]
Minimized testcase

See attached testcase, originally from bug comment 8.

This is the same assertion as bug 206897 and bug 206579, but the repro case seems slightly different, so opening just in case.

Reproduced at https://commits.webkit.org/255418@main with macos/gtk debug builds.
Comment 1 Radar WebKit Bug Importer 2022-11-01 08:06:18 PDT
<rdar://problem/101806737>
Comment 2 Rob Buis 2022-11-28 07:07:07 PST
Created attachment 463759 [details]
Patch
Comment 3 Nikolas Zimmermann 2022-12-16 07:32:51 PST
Comment on attachment 463759 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=463759&action=review

> Source/WebCore/svg/graphics/SVGImageCache.cpp:60
> +    if (containerSizeWithoutZoom.width() >= 1.f && containerSizeWithoutZoom.height() >= 1.f)

Hmm, But a containerSizeWihtoutZoom of 0.1 is fine, no? (with a zoom factor of e.g. 10).
I'm slightly confused -- I would have expected to judge if we should cache or not, based on the zoom factor? If it changes, we're going to redraw the SVGImage anyhow, right?