Bug 189522 - ASSERTION FAILED: size.width <= self.bounds.size.width && size.height <= self.bounds.size.height in -[WKWebView(WKPrivate) _setMaximumUnobscuredSizeOverride:]
Summary: ASSERTION FAILED: size.width <= self.bounds.size.width && size.height <= self...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Nobody
URL: data:text/html,<div%20style="border:1...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-11 14:13 PDT by Daniel Bates
Modified: 2018-09-11 14:16 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-09-11 14:13:07 PDT
Seen using a debug build of WebKit r235897 for iOS Simulator.

Steps to reproduce:

1. Open an iPad simulator instance.
2. Rotate the iPad to landscape such that the home button is on the left. (Not sure this matters).
3. Visit <data:text/html,<div%20style="border:1px%20solid%20black;%20width:%20300px;height:%20300px"%20contenteditable="true"></div>>
4. Focus the editable <div>.
5. Click the + button to open a new tab.

Then MobileSafari will crash due because ASSERT(size.width <= self.bounds.size.width && size.height <= self.bounds.size.height) fails in -[WKWebView(WKPrivate) _setMaximumUnobscuredSizeOverride:].
Comment 1 Radar WebKit Bug Importer 2018-09-11 14:14:36 PDT
<rdar://problem/44356255>
Comment 2 Daniel Bates 2018-09-11 14:16:50 PDT
Triggered by notification UIKeyboardWillHideNotification:

#0  0x0000000109c79010 in ::WTFCrash() at /Volumes/.../Source/WTF/wtf/Assertions.cpp:267
#1  0x000000010d5de49b in WTFCrashWithInfo(int, char const*, char const*, int) at /Volumes/Scratch/WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/Assertions.h:551
#2  0x000000010dafb5d3 in ::-[WKWebView(WKPrivate) _setMaximumUnobscuredSizeOverride:](CGSize) at /Volumes/.../Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5270
#3  0x000000010dafe210 in ::-[WKWebView(WKPrivate) _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:](CGSize, CGSize) at /Volumes/.../Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5539
...

At frame #2 I see:
(lldb) fr v size
(CGSize) size = (width = 1024, height = 728.5)
(lldb) p self.bounds
(CGRect) $0 = (origin = (x = 0, y = 0), size = (width = 0, height = 0))