Bug 214199 - [iOS] Prevent SPI clients from making the minimum layout height or width negative
Summary: [iOS] Prevent SPI clients from making the minimum layout height or width nega...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-10 14:28 PDT by Wenson Hsieh
Modified: 2020-07-10 17:30 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.70 KB, patch)
2020-07-10 14:43 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
For EWS (4.72 KB, patch)
2020-07-10 14:56 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].