Commit 99a42e2d authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS][Thumb Strip] Keep BVC's position fixed when switching to Incognito

Before, when switching to incognito using the Thumb Strip, the BVC ended
up having a frame.y = 36 (or some other non-zero constant). It looks
like the BVC is currently positioned by frame, and my guess is that
somehow, the position of some other element + constraints caused the
BVC's frame to change after it was set. However, the BVC's frame could
be set by constraint, as it should always be that value.

Bug: 1094335
Change-Id: Iedeedadf7ac7c7e842ebe4af02d8e62ed3b6a7c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2549947
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830146}
parent a6cfdfb6
......@@ -202,6 +202,7 @@ source_set("main") {
"//ios/chrome/browser/web:tab_helper_delegates",
"//ios/chrome/browser/web:web_internal",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/common/ui/util",
"//ios/public/provider/chrome/browser",
"//net",
]
......
......@@ -4,6 +4,7 @@
#import "ios/chrome/browser/ui/main/bvc_container_view_controller.h"
#import "ios/chrome/browser/ui/thumb_strip/thumb_strip_feature.h"
#import "ios/chrome/common/ui/util/constraints_ui_util.h"
#include <ostream>
......@@ -39,8 +40,8 @@
// Add the new active view controller.
[self addChildViewController:bvc];
bvc.view.frame = self.view.bounds;
[self.view addSubview:bvc.view];
AddSameConstraints(self.view, bvc.view);
[bvc didMoveToParentViewController:self];
if (IsThumbStripEnabled()) {
......
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