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

Unified Diff: cc/trees/layer_tree_host_impl.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, 10 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 | « cc/input/top_controls_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index d89bad30481ac47b8f9aaf27ccbaa723e278c452..3c689f1a2bf8aa0d6b10a56ca0eb2d8ce9a1b0c2 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1773,11 +1773,13 @@ void LayerTreeHostImpl::ActivateSyncTree() {
root_layer_scroll_offset_delegate_);
if (top_controls_manager_) {
- top_controls_manager_->SetTopControlsHeight(
- active_tree_->top_controls_height());
+ // The order here should be kept in order to prevent top controls from
+ // showing in the hidden state.
top_controls_manager_->SetControlsTopOffset(
active_tree_->total_top_controls_content_offset() -
active_tree_->top_controls_height());
+ top_controls_manager_->SetTopControlsHeight(
+ active_tree_->top_controls_height());
}
UpdateViewportContainerSizes();
« no previous file with comments | « cc/input/top_controls_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698