Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 6dfec0e7d71c2069e3666f34d1371dbd275128fc..04144bf9245f681a1408ebdc86f364ceb0257fb7 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -777,6 +777,11 @@ gfx::Size LayerImpl::bounds() const { |
| bounds_.height() + bounds_delta_.y())); |
| } |
| +gfx::SizeF LayerImpl::BoundsForScrolling() const { |
|
danakj
2014/10/10 18:47:15
This is much less scary than changing bounds(), th
|
| + return gfx::SizeF(bounds_.width() + bounds_delta_.x(), |
| + bounds_.height() + bounds_delta_.y()); |
| +} |
| + |
| void LayerImpl::SetBounds(const gfx::Size& bounds) { |
| if (bounds_ == bounds) |
| return; |
| @@ -1170,7 +1175,7 @@ gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { |
| DCHECK(this != layer_tree_impl()->InnerViewportScrollLayer() || |
| IsContainerForFixedPositionLayers()); |
| - gfx::SizeF scaled_scroll_bounds(bounds()); |
| + gfx::SizeF scaled_scroll_bounds(BoundsForScrolling()); |
| float scale_factor = 1.f; |
| for (LayerImpl const* current_layer = this; |