Bug 137988

Summary: [iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Benjamin Poulain
Reported 2014-10-22 16:41:44 PDT
[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
Attachments
Patch (5.43 KB, patch)
2014-10-22 16:51 PDT, Benjamin Poulain
simon.fraser: review+
Benjamin Poulain
Comment 1 2014-10-22 16:51:58 PDT
Simon Fraser (smfr)
Comment 2 2014-10-22 17:18:38 PDT
Comment on attachment 240305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240305&action=review > Source/WebKit2/ChangeLog:21 > + For the target values, things are trickier. We do not know what the values are gonna be before we execute going to be > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2227 > + if (CGRectIsEmpty(newBounds) || newMinimumLayoutSize.isEmpty() || newMinimumLayoutSizeForMinimalUI.isEmpty() || CGRectIsEmpty(futureUnobscuredRectInSelfCoordinates)) { > + _dynamicViewportUpdateMode = DynamicViewportUpdateMode::NotResizing; Maybe you should assert here. It seems odd to pass empty rects to things like setViewportConfigurationMinimumLayoutSize
Benjamin Poulain
Comment 3 2014-10-22 19:26:54 PDT
(In reply to comment #2) > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:2227 > > + if (CGRectIsEmpty(newBounds) || newMinimumLayoutSize.isEmpty() || newMinimumLayoutSizeForMinimalUI.isEmpty() || CGRectIsEmpty(futureUnobscuredRectInSelfCoordinates)) { > > + _dynamicViewportUpdateMode = DynamicViewportUpdateMode::NotResizing; > > Maybe you should assert here. It seems odd to pass empty rects to things > like setViewportConfigurationMinimumLayoutSize That's a good point, there is not valid use case for empty layout size here.
Benjamin Poulain
Comment 4 2014-10-22 19:40:02 PDT
David Kilzer (:ddkilzer)
Comment 5 2014-10-24 12:19:12 PDT
*** Bug 136522 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.