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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 565673003: Properly initialize top controls content offset on LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed up unit tests Created 6 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 | « cc/input/top_controls_manager.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 86442992f14a4ccf35da98abc73a9eca9d62cac0..df32a5590a932a86f3811eee85b0274340678432 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -349,17 +349,10 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->PassSwapPromises(&swap_promise_list_);
- float top_controls_height = 0.f;
-
- if (host_impl->top_controls_manager())
- top_controls_height = host_impl->top_controls_manager()->controls_height();
-
sync_tree->set_top_controls_layout_height(top_controls_layout_height_);
- sync_tree->set_top_controls_top_offset(top_controls_content_offset_ -
- top_controls_height);
- sync_tree->set_top_controls_delta(
- sync_tree->top_controls_delta() -
- sync_tree->sent_top_controls_delta());
+ sync_tree->set_top_controls_content_offset(top_controls_content_offset_);
+ sync_tree->set_top_controls_delta(sync_tree->top_controls_delta() -
+ sync_tree->sent_top_controls_delta());
sync_tree->set_sent_top_controls_delta(0.f);
host_impl->SetUseGpuRasterization(UseGpuRasterization());
« no previous file with comments | « cc/input/top_controls_manager.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698