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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 1133363003: Call setNeedsUpdateConstraints after adding Native controller view to superview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/ios/block_types.h" 10 #include "base/ios/block_types.h"
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 // However the delegate is not immediately called. 1371 // However the delegate is not immediately called.
1372 [self registerLoadRequest:targetURL 1372 [self registerLoadRequest:targetURL
1373 referrer:referrer 1373 referrer:referrer
1374 transition:[self currentTransition]]; 1374 transition:[self currentTransition]];
1375 [self loadRequest:request]; 1375 [self loadRequest:request];
1376 } 1376 }
1377 1377
1378 - (void)loadNativeViewWithSuccess:(BOOL)loadSuccess { 1378 - (void)loadNativeViewWithSuccess:(BOOL)loadSuccess {
1379 [_nativeController view].frame = [self visibleFrame]; 1379 [_nativeController view].frame = [self visibleFrame];
1380 [_containerView addSubview:[_nativeController view]]; 1380 [_containerView addSubview:[_nativeController view]];
1381 [[_nativeController view] setNeedsUpdateConstraints];
1381 const GURL currentURL([self currentURL]); 1382 const GURL currentURL([self currentURL]);
1382 [self didStartLoadingURL:currentURL updateHistory:loadSuccess]; 1383 [self didStartLoadingURL:currentURL updateHistory:loadSuccess];
1383 _loadPhase = web::PAGE_LOADED; 1384 _loadPhase = web::PAGE_LOADED;
1384 1385
1385 // Perform post-load-finished updates. 1386 // Perform post-load-finished updates.
1386 [self didFinishWithURL:currentURL loadSuccess:loadSuccess]; 1387 [self didFinishWithURL:currentURL loadSuccess:loadSuccess];
1387 1388
1388 // Inform the embedder the title changed. 1389 // Inform the embedder the title changed.
1389 if ([_delegate respondsToSelector:@selector(webController:titleDidChange:)]) { 1390 if ([_delegate respondsToSelector:@selector(webController:titleDidChange:)]) {
1390 NSString* title = [_nativeController title]; 1391 NSString* title = [_nativeController title];
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 if (!_externalRequest || !_externalRequest->window_name) 3684 if (!_externalRequest || !_externalRequest->window_name)
3684 return @""; 3685 return @"";
3685 return _externalRequest->window_name; 3686 return _externalRequest->window_name;
3686 } 3687 }
3687 3688
3688 - (void)resetExternalRequest { 3689 - (void)resetExternalRequest {
3689 _externalRequest.reset(); 3690 _externalRequest.reset();
3690 } 3691 }
3691 3692
3692 @end 3693 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698