[ios] Fix layout issues when starting phone in voice call.
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.
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-Commit-Position: refs/heads/master@{#502230}
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 73cec7e..6c541fb 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -1237,7 +1237,7 @@
// 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 =