Commit 9e8283e9 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Fix NTP frame

This CL fixes the frame computation for the NTP, taking into account
the BrowserContainerFullscreen experiment.

Bug: 918435
Change-Id: I55e31b86262c3b30ae3a51029dba2336929076a5
Reviewed-on: https://chromium-review.googlesource.com/c/1392956
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619940}
parent 04c3c023
...@@ -2513,6 +2513,10 @@ NSString* const kBrowserViewControllerSnackbarCategory = ...@@ -2513,6 +2513,10 @@ NSString* const kBrowserViewControllerSnackbarCategory =
NewTabPageTabHelper* NTPHelper = NewTabPageTabHelper::FromWebState(webState); NewTabPageTabHelper* NTPHelper = NewTabPageTabHelper::FromWebState(webState);
if (!NTPHelper || !NTPHelper->IsActive()) if (!NTPHelper || !NTPHelper->IsActive())
return CGRectZero; return CGRectZero;
if (base::FeatureList::IsEnabled(
web::features::kBrowserContainerFullscreen) &&
!IsRegularXRegularSizeClass())
return self.contentArea.bounds;
// NTP expects to be laid out behind the bottom toolbar. It uses // NTP expects to be laid out behind the bottom toolbar. It uses
// |contentInset| to push content above the toolbar. // |contentInset| to push content above the toolbar.
UIEdgeInsets viewportInsets = [self viewportInsetsForView:self.contentArea]; UIEdgeInsets viewportInsets = [self viewportInsetsForView: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