Commit 90bd4f44 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Don't prevent toolbar contract while animating

This CL let the toolbar be contracted even if it is animating.
This is needed, because calling twice the same method could yield
different results based on the state of the device (portrait vs
landscape for example).

Bug: 900761
Change-Id: Ie3f44e871e411162bc63467d6cf5e7df3d02cc22
Reviewed-on: https://chromium-review.googlesource.com/c/1349347Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611077}
parent d10b5471
......@@ -29,18 +29,18 @@
- (void)transitionToStateOmniboxFocused:(BOOL)omniboxFocused
toolbarExpanded:(BOOL)toolbarExpanded
animated:(BOOL)animated {
if (self.isAnimating) {
return;
}
self.isAnimating = animated;
if (toolbarExpanded) {
[self updateUIToExpandedState:animated];
} else {
[self updateUIToContractedState:animated];
}
if (self.isAnimating) {
return;
}
self.isAnimating = animated;
// Make the rest of the animation happen on the next runloop when this
// animation have calculated the final frame for the location bar.
// This is necessary because expanding/contracting the toolbar is actually
......
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