Bug 182872

Summary: IPad / Safari crash, when zooming a page with an IFrame on IOS 11+
Product: WebKit Reporter: Telman Agababov <telman.agababov>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: bfulgham, simon.fraser, thorton, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: iPhone / iPad   
OS: iOS 11   
Attachments:
Description Flags
test page for the crash reproducing
none
crash logs and video of crash none

Description Telman Agababov 2018-02-16 05:36:09 PST
Created attachment 334035 [details]
test page for the crash reproducing

Summary:
Safari crashes, when zooming a page with an IFrame inside it, on IOS 11+
The crash logs shows, that crash was connected to excessive usage of the memory. 
Web developer tools shows, that IFrame elements have own layout, which allocates huge amount of memory, while zooming it (about 1gb of memory per IFrame layout)

Steps to Reproduce:
1. Create an html page with a IFrame
2. Ensure that IFrame page has some animation or 3d options, to force layout creation
3. Pinch-zoom the page several times

Example:
I also added an example with an empty page, that includes several Iframes (for easier reproduction). Where the last Iframe page has some simple animation, to force layouts creation.
You can easily achieve a crash with this example, just opening "index.html" page from the example and doing pinch-zoom actions several times (like 3 times should be enough).

Expected Results:
Pinch-zoom should work without any crashes.

Actual Results:
After several pinch to zoom actions, the page crashes.
There are 3 possible crashes, that occur when zooming :
1. page reloads, with a message - "A problem occurred with this web page so it was reloaded"
2. safari browser closes
3. IPad just turns off

Version/Build:
The last tested safari version (info from user agent) :
AppleWebKit/605.1.15 Version/11.0 Mobile/15E148 Safari/604.1

Configuration:
IPad Pro 9.7
IOS 11.1, IOS 11.2.5, IOS 11.3

I'm not sure whether it's a Webkit bug or Safari issue, so I duplicated the issue at Apple bugreport also - https://bugreport.apple.com/web/?problemID=37602027
Comment 1 Telman Agababov 2018-02-16 05:36:56 PST
Created attachment 334036 [details]
crash logs and video of crash
Comment 2 Simon Fraser (smfr) 2018-02-16 11:50:14 PST
The crash is a jetsam (out of memory).