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

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: Remove comment. 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 2430f9ca74906d6c7b9eb46a3441a561bfb318b1..342708e4ac9e05d32f9b2dfee1b34ba8409c3c64 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -365,15 +365,7 @@ void Layer::SetBounds(const gfx::Size& size) {
if (!layer_tree_host_)
return;
- if (ClipNode* clip_node = layer_tree_host_->property_trees()->clip_tree.Node(
- clip_tree_index())) {
- if (clip_node->owner_id == id()) {
- clip_node->data.clip.set_size(gfx::SizeF(size));
- layer_tree_host_->property_trees()->clip_tree.set_needs_update(true);
- }
- }
-
- SetNeedsCommitNoRebuild();
+ SetNeedsCommit();
}
Layer* Layer::RootLayer() {
@@ -942,6 +934,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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698