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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « cc/input/top_controls_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 // Now that we've synced everything from the pending tree to the active 1766 // Now that we've synced everything from the pending tree to the active
1767 // tree, rename the pending tree the recycle tree so we can reuse it on the 1767 // tree, rename the pending tree the recycle tree so we can reuse it on the
1768 // next sync. 1768 // next sync.
1769 DCHECK(!recycle_tree_); 1769 DCHECK(!recycle_tree_);
1770 pending_tree_.swap(recycle_tree_); 1770 pending_tree_.swap(recycle_tree_);
1771 1771
1772 active_tree_->SetRootLayerScrollOffsetDelegate( 1772 active_tree_->SetRootLayerScrollOffsetDelegate(
1773 root_layer_scroll_offset_delegate_); 1773 root_layer_scroll_offset_delegate_);
1774 1774
1775 if (top_controls_manager_) { 1775 if (top_controls_manager_) {
1776 top_controls_manager_->SetTopControlsHeight( 1776 // The order here should be kept in order to prevent top controls from
1777 active_tree_->top_controls_height()); 1777 // showing in the hidden state.
1778 top_controls_manager_->SetControlsTopOffset( 1778 top_controls_manager_->SetControlsTopOffset(
1779 active_tree_->total_top_controls_content_offset() - 1779 active_tree_->total_top_controls_content_offset() -
1780 active_tree_->top_controls_height()); 1780 active_tree_->top_controls_height());
1781 top_controls_manager_->SetTopControlsHeight(
1782 active_tree_->top_controls_height());
1781 } 1783 }
1782 1784
1783 UpdateViewportContainerSizes(); 1785 UpdateViewportContainerSizes();
1784 } else { 1786 } else {
1785 active_tree_->ProcessUIResourceRequestQueue(); 1787 active_tree_->ProcessUIResourceRequestQueue();
1786 } 1788 }
1787 1789
1788 active_tree_->DidBecomeActive(); 1790 active_tree_->DidBecomeActive();
1789 ActivateAnimations(); 1791 ActivateAnimations();
1790 if (settings_.impl_side_painting) { 1792 if (settings_.impl_side_painting) {
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
3458 } 3460 }
3459 3461
3460 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3462 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3461 std::vector<PictureLayerImpl*>::iterator it = 3463 std::vector<PictureLayerImpl*>::iterator it =
3462 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3464 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3463 DCHECK(it != picture_layers_.end()); 3465 DCHECK(it != picture_layers_.end());
3464 picture_layers_.erase(it); 3466 picture_layers_.erase(it);
3465 } 3467 }
3466 3468
3467 } // namespace cc 3469 } // namespace cc
OLDNEW
« 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