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

Unified Diff: cc/layer_tree_impl.cc

Issue 12034003: Unbreak max scroll offset in threaded compositing mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_impl.cc
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc
index bfdcf50ca8c5e1b318472b3e6a5a390f99e4a012..9f9588b85adfdf276969106f55365069def58362 100644
--- a/cc/layer_tree_impl.cc
+++ b/cc/layer_tree_impl.cc
@@ -188,9 +188,9 @@ const LayerTreeImpl::LayerList& LayerTreeImpl::RenderSurfaceLayerList() const {
}
gfx::Size LayerTreeImpl::ContentSize() const {
- if (!root_scroll_layer_)
+ if (!root_scroll_layer_ || root_scroll_layer_->children().empty())
return gfx::Size();
- return root_scroll_layer_->bounds();
+ return root_scroll_layer_->children()[0]->bounds();
}
LayerImpl* LayerTreeImpl::LayerById(int id) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698