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

Unified Diff: cc/trees/layer_tree_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 | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index c160d97bb96b4a4d0eff95ccf2d8b86ddf06de32..09f70c4321d62da5689ca8a3ee0a722ab4ff4838 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -215,15 +215,6 @@ void LayerTreeImpl::UpdateMaxScrollOffset() {
gfx::Vector2dF max_scroll = gfx::Rect(ScrollableSize()).bottom_right() -
gfx::RectF(ScrollableViewportSize()).bottom_right();
- // The scrollable viewport size is based on device viewport instead of Blink's
- // container layer, so we need to adjust for non-overlay scrollbars.
- ScrollbarLayerImpl* horiz = root_scroll->horizontal_scrollbar_layer();
- ScrollbarLayerImpl* vertical = root_scroll->vertical_scrollbar_layer();
- if (horiz && !horiz->is_overlay_scrollbar())
- max_scroll.set_y(max_scroll.y() + horiz->thumb_thickness());
- if (vertical && !vertical->is_overlay_scrollbar())
- max_scroll.set_x(max_scroll.x() + vertical->thumb_thickness());
-
// The viewport may be larger than the contents in some cases, such as
// having a vertical scrollbar but no horizontal overflow.
max_scroll.SetToMax(gfx::Vector2dF());
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698