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(); |