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

Unified Diff: cc/input/top_controls_manager.cc

Issue 886763004: DO NOT MERGE: Fix top_controls_manager to stay hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 1615d7f2d3875e4766bb55f884e166caa7d380b9..f0f4ba992898e1e9d64b055a5f0edfe853763cf3 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -167,6 +167,11 @@ void TopControlsManager::SetTopControlsHeight(float top_controls_height) {
ResetAnimations();
float top_controls_offset = client_->ControlsTopOffset();
top_controls_height_ = top_controls_height;
+
+ // Stay hidden if only HIDDEN state is permitted.
+ if (permitted_state_ == HIDDEN)
+ top_controls_offset = -top_controls_height_;
+
SetControlsTopOffset(top_controls_offset);
StartAnimationIfNecessary();
}
« 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