Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1689753002: Set CRWWebViewContentView's size before resetting scroll proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/ui/crw_web_view_content_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
index de29b293c2da896d3da9b639632678324333a1ba..7442600ef5db93586edaac115818d8852e0d5162 100644
--- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
+++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
@@ -588,6 +588,12 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
- (void)loadRequestForCurrentNavigationItem {
DCHECK(self.webView && !self.nativeController);
DCHECK([self currentSessionEntry]);
+ // If a load is kicked off on a WKWebView with a frame whose size is {0, 0} or
+ // that has a negative dimension for a size, rendering issues occur that
+ // manifest in erroneous scrolling and tap handling (crbug.com/574996,
+ // crbug.com/577793).
+ DCHECK_GT(CGRectGetWidth(self.webView.frame), 0.0);
+ DCHECK_GT(CGRectGetHeight(self.webView.frame), 0.0);
web::WKBackForwardListItemHolder* holder =
[self currentBackForwardListItemHolder];
« no previous file with comments | « ios/web/web_state/ui/crw_web_view_content_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698