Commit c4aaba6c authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Find-in-page UI would disappear if re-invoked while the close animation was...

Find-in-page UI would disappear if re-invoked while the close animation was progressing but not yet finished.

Make sure any close animation is finished and the drop-down bar state is consistent before showing.

Bug: 790889
Change-Id: I5a8edbfe398d048ef226ea849c4c9d285b1ec564
Reviewed-on: https://chromium-review.googlesource.com/893213Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533023}
parent 758d2edf
...@@ -86,6 +86,12 @@ void DropdownBarHost::Show(bool animate) { ...@@ -86,6 +86,12 @@ void DropdownBarHost::Show(bool animate) {
SetDialogPosition(GetDialogPosition(gfx::Rect())); SetDialogPosition(GetDialogPosition(gfx::Rect()));
// If we're in the middle of a close animation, stop it and skip to the end.
// This ensures that the state is consistent and prepared to show the drop-
// down bar.
if (animation_->IsClosing())
StopAnimation();
host_->Show(); host_->Show();
bool was_visible = is_visible_; bool was_visible = is_visible_;
......
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