Bug 214199

Summary: [iOS] Prevent SPI clients from making the minimum layout height or width negative
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit APIAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
thorton: review+
For EWS none

Description Wenson Hsieh 2020-07-10 14:28:46 PDT
<rdar://problem/64109242>
Comment 1 Wenson Hsieh 2020-07-10 14:43:46 PDT
Created attachment 404003 [details]
Patch
Comment 2 Tim Horton 2020-07-10 14:46:27 PDT
Comment on attachment 404003 [details]
Patch

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

> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:2947
> +        NSLog(@"%s: Error: attempting to override layout parameters with negative width or height: %@", __PRETTY_FUNCTION__, NSStringFromCGSize(minimumLayoutSize));

os_log_error, maybe? or even os_log_fault? It is v. v. bad if we get here.
Comment 3 Wenson Hsieh 2020-07-10 14:47:20 PDT
(In reply to Tim Horton from comment #2)
> Comment on attachment 404003 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=404003&action=review
> 
> > Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:2947
> > +        NSLog(@"%s: Error: attempting to override layout parameters with negative width or height: %@", __PRETTY_FUNCTION__, NSStringFromCGSize(minimumLayoutSize));
> 
> os_log_error, maybe? or even os_log_fault? It is v. v. bad if we get here.

os_log_fault it is!
Comment 4 Wenson Hsieh 2020-07-10 14:56:08 PDT
Created attachment 404004 [details]
For EWS
Comment 5 EWS 2020-07-10 17:30:29 PDT
Committed r264248: <https://trac.webkit.org/changeset/264248>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404004 [details].