Skip to content

Commit

Permalink
[ios] Fix layout issues when starting phone in voice call.
Browse files Browse the repository at this point in the history
UIKit seems to be insetting our root view controller by 20 points when
in a phone call, but setting our main_view_controller to
self.window.bounds is stomping on that. It's seems that pre-iOS11
this inset would still happen later.  This issue appears when compiling
against the iOS11 SDK, even when running on iOS10 or iOS9 devices, it
seems.

[email protected]

(cherry picked from commit 13b7c43)

Bug: 755974
Change-Id: I25b6e3848ae506b5531b5eb28348ac5328a6c779
Reviewed-on: https://chromium-review.googlesource.com/668046
Reviewed-by: Rohit Rao (ping after 24h) <[email protected]>
Reviewed-by: Mark Cogan <[email protected]>
Commit-Queue: Justin Cohen <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#502230}
Reviewed-on: https://chromium-review.googlesource.com/673423
Reviewed-by: Justin Cohen <[email protected]>
Cr-Commit-Position: refs/branch-heads/3202@{crosswalk-project#324}
Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
  • Loading branch information
Justin Cohen authored and Justin Cohen committed Sep 19, 2017
1 parent 283afb2 commit 65537ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion ios/chrome/browser/ui/browser_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ - (void)presentBubblesIfEligible {

// Perform additional set up after loading the view, typically from a nib.
- (void)viewDidLoad {
CGRect initialViewsRect = self.view.frame;
CGRect initialViewsRect = self.view.bounds;
initialViewsRect.origin.y += StatusBarHeight();
initialViewsRect.size.height -= StatusBarHeight();
UIViewAutoresizing initialViewAutoresizing =
Expand Down
3 changes: 0 additions & 3 deletions ios/chrome/browser/ui/main/main_coordinator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ - (void)start {
MainViewController* mainViewController = [[MainViewController alloc] init];
_mainViewController = mainViewController;
self.window.rootViewController = self.mainViewController;

// Size the main view controller to fit the whole screen.
[self.mainViewController.view setFrame:self.window.bounds];
}

@end

0 comments on commit 65537ac

Please sign in to comment.