Commit ab8fe8a5 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Correct new tab animation with fullscreen features enabled.

Also note that -correctMissingSafeArea in content suggestions VC can be
bypassed when the BrowserContainerFullscreen feature is enabled.

BUG: 849206, 836730
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Id876a66b1509cdec64a645b59c296186c31fa8e1
Reviewed-on: https://chromium-review.googlesource.com/c/1255984Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596203}
parent c638ed65
......@@ -5080,8 +5080,11 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
// The animation will have the same frame as |self|, minus the status bar,
// so shift it down and reduce its height accordingly.
CGRect frame = self.view.bounds;
frame.origin.y += StatusBarHeight();
frame.size.height -= StatusBarHeight();
if (!self.usesFullscreenContainer ||
!base::FeatureList::IsEnabled(web::features::kOutOfWebFullscreen)) {
frame.origin.y += StatusBarHeight();
frame.size.height -= StatusBarHeight();
}
frame = [self.contentArea convertRect:frame fromView:self.view];
ForegroundTabAnimationView* animatedView =
[[ForegroundTabAnimationView alloc] initWithFrame:frame];
......
......@@ -591,6 +591,9 @@ const CGFloat kCardBorderRadius = 11;
// though content suggestions appear under the top safe area, they are blocked
// by the browser container view controller.
- (void)correctMissingSafeArea {
if (base::FeatureList::IsEnabled(web::features::kBrowserContainerFullscreen))
return;
if (@available(iOS 11, *)) {
UIEdgeInsets missingTop = UIEdgeInsetsZero;
// During the new tab animation the browser container view controller
......
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