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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 21323002: Bring back setting visible viewport size based on cliprect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 1d74dcc07160394bf3524b70b7e66f2576200cd0..43a4b68f314fb4aa84edaba036790c1f198e3787 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1316,6 +1316,15 @@ float LayerTreeHostImpl::DeviceScaleFactor() const {
}
gfx::SizeF LayerTreeHostImpl::VisibleViewportSize() const {
+ // The container layer bounds should be used if non-overlay scrollbars may
+ // exist since it adjusts for them.
+ LayerImpl* container_layer = active_tree_->RootContainerLayer();
+ if (!Settings().solid_color_scrollbars && container_layer) {
+ DCHECK(!top_controls_manager_);
+ DCHECK_EQ(0, overdraw_bottom_height_);
+ return container_layer->bounds();
+ }
+
gfx::SizeF dip_size =
gfx::ScaleSize(device_viewport_size(), 1.f / device_scale_factor());
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698