[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
Created attachment 240305 [details] Patch
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
(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.
Committed r175081: <http://trac.webkit.org/changeset/175081>
*** Bug 136522 has been marked as a duplicate of this bug. ***