Commit 50d5ba25 authored by jif's avatar jif Committed by Commit bot

Initialize the BrowserContainerView with the right frame.

When the iPad Tab Switcher creates an incognito tab for the first time, an incognito
BVC is created.
The Tab Switcher takes a screenshot of the new incognito tab, and animates its size
from a small cell to a fullscreen tab.
Before this CL, the first incognito tab was created with an incorrect size, resulting in
the screenshot used in the animation being incorrect.

BUG=671724

Review-Url: https://codereview.chromium.org/2591683002
Cr-Commit-Position: refs/heads/master@{#439792}
parent d0059913
......@@ -1169,8 +1169,9 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
// Perform additional set up after loading the view, typically from a nib.
- (void)viewDidLoad {
// Duplicate .xib layout for now.
CGRect initialViewsRect = CGRectMake(0, 30, 320, 430);
CGRect initialViewsRect = self.view.frame;
initialViewsRect.origin.y += StatusBarHeight();
initialViewsRect.size.height -= StatusBarHeight();
UIViewAutoresizing initialViewAutoresizing =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
......@@ -1183,7 +1184,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
[self.typingShield addTarget:self
action:@selector(shieldWasTapped:)
forControlEvents:UIControlEventTouchUpInside];
self.view.bounds = CGRectMake(0, 0, 320, 460);
self.view.autoresizingMask = initialViewAutoresizing;
self.view.backgroundColor = [UIColor colorWithWhite:0.75 alpha:1.0];
[self.view addSubview:self.contentArea];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment