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

Unified Diff: cc/layers/layer.cc

Issue 1675963002: Move MaxScrollOffset to property_trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests failures Created 4 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 2430f9ca74906d6c7b9eb46a3441a561bfb318b1..1f810c3d577c62c374a42571781e183dd08e6cb6 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -373,7 +373,13 @@ void Layer::SetBounds(const gfx::Size& size) {
}
}
- SetNeedsCommitNoRebuild();
+ ScrollNode* scroll_node =
+ layer_tree_host_->property_trees()->scroll_tree.Node(scroll_tree_index());
+ if (scroll_node && scroll_node->owner_id == id()) {
+ scroll_node->data.bounds = size;
sunxd 2016/02/09 00:11:32 I will delete this part, as we now force a rebuild
+ }
+
+ SetNeedsCommit();
}
Layer* Layer::RootLayer() {
@@ -942,6 +948,10 @@ void Layer::SetScrollClipLayerId(int clip_layer_id) {
SetNeedsCommit();
}
+Layer* Layer::scroll_clip_layer() const {
+ return layer_tree_host()->LayerById(scroll_clip_layer_id_);
+}
+
void Layer::SetUserScrollable(bool horizontal, bool vertical) {
DCHECK(IsPropertyChangeAllowed());
if (user_scrollable_horizontal_ == horizontal &&
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/layers/layer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698