Index: cc/trees/layer_tree_impl.cc |
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
index 1ff75b39139762b14c1a1115d2e87d5c412cf2c6..90a2440f28c7de5cfebab2a5b10a20f414ebc6da 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -216,6 +216,15 @@ void LayerTreeImpl::UpdateMaxScrollOffset() { |
max_scroll.ClampToMin(gfx::Vector2dF()); |
root_scroll_layer_->SetMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll)); |
+ |
+ gfx::Vector2dF scrollable_viewport_size = |
+ gfx::RectF(ScrollableViewportSize()).bottom_right() - gfx::PointF(); |
+ gfx::Vector2dF original_scrollable_viewport_size = |
+ gfx::RectF(layer_tree_host_impl_->VisibleViewportSize()).bottom_right() - |
+ gfx::PointF(); |
+ original_scrollable_viewport_size.Scale(1 / page_scale_factor()); |
+ root_scroll_layer_->SetFixedContainerSizeDelta( |
+ scrollable_viewport_size - original_scrollable_viewport_size); |
} |
gfx::Transform LayerTreeImpl::ImplTransform() const { |