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

Unified Diff: ios/web/web_state/ui/crw_web_controller_container_view.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 | « no previous file | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller_container_view.mm
diff --git a/ios/web/web_state/ui/crw_web_controller_container_view.mm b/ios/web/web_state/ui/crw_web_controller_container_view.mm
index eb06ce1cb1c74a812055f54828e4c9b77cec5f9d..754d9e8b814f4d013b8d1d24e9f24cf48d3314e0 100644
--- a/ios/web/web_state/ui/crw_web_controller_container_view.mm
+++ b/ios/web/web_state/ui/crw_web_controller_container_view.mm
@@ -160,12 +160,8 @@
if (![_webViewContentView isEqual:webViewContentView]) {
[_webViewContentView removeFromSuperview];
_webViewContentView.reset([webViewContentView retain]);
- // UIWebViews that are added in |-layoutSubviews| exhbit a scrolling bug, so
- // they must be added here in the getter (crbug.com/568097).
- if ([_webViewContentView webViewType] == web::UI_WEB_VIEW_TYPE) {
- DCHECK(![_webViewContentView superview]);
- [self addSubview:_webViewContentView];
- }
+ [_webViewContentView setFrame:self.bounds];
+ [self addSubview:_webViewContentView];
}
}
@@ -221,13 +217,6 @@
- (void)layoutSubviews {
[super layoutSubviews];
- // WKWebViews added outside of |-layoutSubviews| exhibit a rendering bug that
- // erroneously scrolls to an arbitrary offset, so add them here
- // (crbug.com/574996).
- if (self.webViewContentView.webViewType == web::WK_WEB_VIEW_TYPE &&
- !self.webViewContentView.superview) {
- [self addSubview:self.webViewContentView];
- }
self.webViewContentView.frame = self.bounds;
// TODO(crbug.com/570114): Move adding of the following subviews to another
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698