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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 511253003: Made Blink aware of top controls offset (Chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash + mojo example build break 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/trees/layer_tree_impl.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 797d2d138fffa548cba3f8a8433c17d306324911..328234f5fd100d7fcbcf595ed3f1f3434919c81c 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -92,7 +92,11 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
needs_full_tree_sync_(true),
next_activation_forces_redraw_(false),
has_ever_been_drawn_(false),
- render_surface_layer_list_id_(0) {
+ render_surface_layer_list_id_(0),
+ top_controls_layout_height_(0),
+ top_controls_top_offset_(0),
+ top_controls_delta_(0),
+ sent_top_controls_delta_(0) {
}
LayerTreeImpl::~LayerTreeImpl() {
@@ -200,6 +204,13 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->PassSwapPromises(&swap_promise_list_);
+ target_tree->top_controls_layout_height_ = top_controls_layout_height_;
+ target_tree->top_controls_top_offset_ = top_controls_top_offset_;
+ target_tree->top_controls_delta_ =
+ target_tree->top_controls_delta_ -
+ target_tree->sent_top_controls_delta_;
+ target_tree->sent_top_controls_delta_ = 0.f;
+
target_tree->SetPageScaleValues(
page_scale_factor(), min_page_scale_factor(), max_page_scale_factor(),
target_tree->page_scale_delta() / target_tree->sent_page_scale_delta());
@@ -376,6 +387,10 @@ void LayerTreeImpl::ApplySentScrollAndScaleDeltasFromAbortedCommit() {
page_scale_delta_ /= sent_page_scale_delta_;
sent_page_scale_delta_ = 1.f;
+ top_controls_top_offset_ += sent_top_controls_delta_;
+ top_controls_delta_ -= sent_top_controls_delta_;
+ sent_top_controls_delta_ = 0.f;
+
if (!root_layer())
return;
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698