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

[ios] Update fullscreen insets during rotation animation

This change move the fullscreen inset updates to happen alongside the
size transition animation. The change in web content size will then
not happen after the transition finished, producing a cleaner experience.

Fixed: 1168154
Change-Id: I048c763ffbc0d3723833a003b3a9a79c8a8c58cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2641115Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845426}
parent af6e7cad
...@@ -1686,13 +1686,16 @@ NSString* const kBrowserViewControllerSnackbarCategory = ...@@ -1686,13 +1686,16 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// Force updates of the toolbar updater as the toolbar height might // Force updates of the toolbar updater as the toolbar height might
// change on rotation. // change on rotation.
[_toolbarUIUpdater updateState]; [_toolbarUIUpdater updateState];
}
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
BrowserViewController* strongSelf = weakSelf;
// Resize horizontal viewport if Smooth Scrolling is on. // Resize horizontal viewport if Smooth Scrolling is on.
if (fullscreen::features::ShouldUseSmoothScrolling()) { if (fullscreen::features::ShouldUseSmoothScrolling()) {
strongSelf.fullscreenController->ResizeHorizontalViewport(); BrowserViewController* strongSelf = weakSelf;
if (strongSelf) {
strongSelf.fullscreenController->ResizeHorizontalViewport();
}
} }
}
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
BrowserViewController* strongSelf = weakSelf;
if (!base::FeatureList::IsEnabled(kModernTabStrip)) { if (!base::FeatureList::IsEnabled(kModernTabStrip)) {
if (strongSelf.tabStripView) { if (strongSelf.tabStripView) {
[strongSelf.legacyTabStripCoordinator tabStripSizeDidChange]; [strongSelf.legacyTabStripCoordinator tabStripSizeDidChange];
......
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