Bug 256876

Summary: Webkit crashes when pinch-to-zooming with 50MB allocated for compositing layers
Product: WebKit Reporter: Tomas Brambora <tomas.brambora>
Component: CompositingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: kkinnunen, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   
See Also: https://bugs.webkit.org/show_bug.cgi?id=27684
Attachments:
Description Flags
crash video none

Description Tomas Brambora 2023-05-16 22:35:45 PDT
Created attachment 466376 [details]
crash video

Pinch to zoom reliably crashes webkit process running the tiny react app available here: https://prismatic-pudding-dceafa.netlify.app/ even when the memory allocated to compositing layers is ~50MB only.

Each red rectangle is an absolutely positioned 1000px div with `will-change: transform` CSS rule, scaled down to 0.01 with a CSS scale transform.

The app crashes quite reliably when pinching to zoom on my iPhone 13 running iOS 16.1 even with only 3 divs rendered (which according to WebInspector allocates roughly 50MB for compositing layers).

When allocating 400+MB the app crashes immediately (i.e., just by adding the divs using the slider, without any zooming).
Comment 1 Radar WebKit Bug Importer 2023-05-17 09:39:24 PDT
<rdar://problem/109464112>
Comment 2 Simon Fraser (smfr) 2023-05-17 09:40:55 PDT
"scaled down to 0.01 with a CSS scale transform"

That's not ideal. It makes this related to 27684.