Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2037)

Unified Diff: cc/input/top_controls_manager.cc

Issue 2371223002: Keep top controls visible if SHOW is called right after HIDE. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/top_controls_manager.cc
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc
index 9e3d9b1f1fb6948767ecaf8fcc79d37d655e83e6..90ebdc661cd6db273710ac6a0afd8bd175fdd6f1 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -96,8 +96,10 @@ void TopControlsManager::UpdateTopControlsState(TopControlsState constraints,
float final_shown_ratio = 1.f;
if (constraints == HIDDEN || current == HIDDEN)
final_shown_ratio = 0.f;
- if (final_shown_ratio == TopControlsShownRatio())
+ if (final_shown_ratio == TopControlsShownRatio()) {
+ ResetAnimations();
return;
+ }
if (animate) {
SetupAnimation(final_shown_ratio ? SHOWING_CONTROLS : HIDING_CONTROLS);
« no previous file with comments | « no previous file | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698