Commit 829c833a authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Fix animation for landscape NTP

This CL fixes the display when showing the NTP on a cold start.
It prevents the animation by directly adding the BVC to the view
hierarchy when the animations are disabled.
It is also making sure that the location bar isn't shown on the NTP
when doing a cold start.

Fixed: 1082726
Change-Id: I02658837b177bbe07d58b507311657d09107fde0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216250Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772328}
parent 0ef07e7c
...@@ -102,6 +102,14 @@ const CGFloat kReducedMotionDuration = 0.25; ...@@ -102,6 +102,14 @@ const CGFloat kReducedMotionDuration = 0.25;
browser.view.accessibilityViewIsModal = YES; browser.view.accessibilityViewIsModal = YES;
if (self.animationDisabled) {
browser.view.alpha = 1;
[tabGrid setNeedsStatusBarAppearanceUpdate];
if (completion)
completion();
return;
}
browser.view.alpha = 0; browser.view.alpha = 0;
if (UIAccessibilityIsReduceMotionEnabled() || if (UIAccessibilityIsReduceMotionEnabled() ||
......
...@@ -167,6 +167,8 @@ ...@@ -167,6 +167,8 @@
if (!isNTP && !IsSplitToolbarMode(self)) { if (!isNTP && !IsSplitToolbarMode(self)) {
// Reset any location bar view updates when not an NTP. // Reset any location bar view updates when not an NTP.
[self setScrollProgressForTabletOmnibox:1]; [self setScrollProgressForTabletOmnibox:1];
} else if (isNTP && !IsSplitToolbarMode(self)) {
[self setScrollProgressForTabletOmnibox:0];
} }
} }
......
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