Commit 0722c864 authored by Chris Lu's avatar Chris Lu Committed by Chromium LUCI CQ

[ios] Update horizontal insets for both ipad and iphone

Updates to the insets in response to rotations are necessary for iphones
with notches so that they match the new intrinsic safe area insets.

Bug: 1151932
Change-Id: I2405550da8e9d75899d422ea58a63d54b6780b2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568543
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Auto-Submit: Chris Lu <thegreenfrog@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836352}
parent f579542f
......@@ -1690,9 +1690,8 @@ NSString* const kBrowserViewControllerSnackbarCategory =
}
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
BrowserViewController* strongSelf = weakSelf;
// Resize horizontal viewport if Smooth Scrolling is on for multiwindow.
if (fullscreen::features::ShouldUseSmoothScrolling() &&
ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
// Resize horizontal viewport if Smooth Scrolling is on.
if (fullscreen::features::ShouldUseSmoothScrolling()) {
strongSelf.fullscreenController->ResizeHorizontalViewport();
}
if (!base::FeatureList::IsEnabled(kModernTabStrip)) {
......@@ -2453,9 +2452,8 @@ NSString* const kBrowserViewControllerSnackbarCategory =
self.browserContainerViewController.contentView =
[self viewForWebState:webState];
}
// Resize horizontal viewport if Smooth Scrolling is on for multiwindow.
if (fullscreen::features::ShouldUseSmoothScrolling() &&
ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) {
// Resize horizontal viewport if Smooth Scrolling is on.
if (fullscreen::features::ShouldUseSmoothScrolling()) {
self.fullscreenController->ResizeHorizontalViewport();
}
}
......
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