Update InnerViewportContainerLayer size when top controls move.
At present, when Clank's top controls move, the InnerViewportContainerLayer
size is not updated immediately, leading to incorrect results from
LayerImpl::MaxScrollOffset() until the resize occurs. This allows scrolling
past the end of the page in the case where the top-controls are hidden
during a single scroll that reaches the bottom of the document.
This CL updates the InnerViewportContainerLayer size on the impl thread
each time the top controls move in order to eliminate this problem. The
mechanism for computing scrollbar vertical adjust has also been updated
to account for this.
Also, this CL makes the previous FixedPositionContainerSizeDelta
computation redundant, and it has been removed.
BUG=342857
Review URL: https://codereview.chromium.org/171813008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253743 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 4e716b5e..29b2cef8 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -213,6 +213,7 @@
// excludes the URL bar and non-overlay scrollbars and is in DIP (and
// invariant relative to page scale).
gfx::SizeF UnscaledScrollableViewportSize() const;
+ float VerticalAdjust() const;
// RendererClient implementation.
virtual void SetFullRootLayerDamage() OVERRIDE;
@@ -443,6 +444,9 @@
SharedBitmapManager* manager,
int id);
+ gfx::SizeF ComputeInnerViewportContainerSize() const;
+ void UpdateInnerViewportContainerSize();
+
// Virtual for testing.
virtual void AnimateLayers(base::TimeTicks monotonic_time,
base::Time wall_clock_time);