| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index 20aa9f46aa577f6803618959df897b0057191936..755a342454d2de44cb7ce9ddd738a61199f8ce70 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -173,7 +173,6 @@ FrameView::FrameView(LocalFrame& frame)
|
| m_inputEventsScaleFactorForEmulation(1),
|
| m_layoutSizeFixedToFrameSize(true),
|
| m_didScrollTimer(this, &FrameView::didScrollTimerFired),
|
| - m_browserControlsViewportAdjustment(0),
|
| m_needsUpdateWidgetGeometries(false),
|
| #if ENABLE(ASSERT)
|
| m_hasBeenDisposed(false),
|
| @@ -3654,10 +3653,6 @@ void FrameView::didAddScrollbar(Scrollbar& scrollbar,
|
| ScrollableArea::didAddScrollbar(scrollbar, orientation);
|
| }
|
|
|
| -void FrameView::setBrowserControlsViewportAdjustment(float adjustment) {
|
| - m_browserControlsViewportAdjustment = adjustment;
|
| -}
|
| -
|
| PaintLayer* FrameView::layer() const {
|
| LayoutViewItem layoutView = layoutViewItem();
|
| if (layoutView.isNull() || !layoutView.compositor())
|
| @@ -3670,9 +3665,23 @@ IntSize FrameView::maximumScrollOffsetInt() const {
|
| // Make the same calculation as in CC's LayerImpl::MaxScrollOffset()
|
| // FIXME: We probably shouldn't be storing the bounds in a float.
|
| // crbug.com/422331.
|
| - IntSize visibleSize =
|
| - visibleContentSize(ExcludeScrollbars) + browserControlsSize();
|
| + IntSize visibleSize = visibleContentSize(ExcludeScrollbars);
|
| IntSize contentBounds = contentsSize();
|
| +
|
| + FrameHost* host = m_frame->host();
|
| + DCHECK(host);
|
| +
|
| + // We need to perform this const_cast since maximumScrollOffsetInt is a const
|
| + // method but we can't make layoutViewportScrollableArea const since it can
|
| + // return |this|. Once root-layer-scrolls ships layoutViewportScrollableArea
|
| + // can be made const.
|
| + const ScrollableArea* layoutViewport =
|
| + const_cast<FrameView*>(this)->layoutViewportScrollableArea();
|
| + TopDocumentRootScrollerController& controller =
|
| + host->globalRootScrollerController();
|
| + if (layoutViewport == controller.rootScrollerArea())
|
| + visibleSize = controller.rootScrollerVisibleArea();
|
| +
|
| IntSize maximumOffset =
|
| toIntSize(-scrollOrigin() + (contentBounds - visibleSize));
|
| return maximumOffset.expandedTo(minimumScrollOffsetInt());
|
|
|