| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index db086a297a05c4ca4766b3881c9a735b77a24190..9cf738f77cc63f9af8259aa55e4da0ad0c04b484 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -121,6 +121,7 @@ FrameView::FrameView(LocalFrame* frame)
|
| , m_layoutSizeFixedToFrameSize(true)
|
| , m_didScrollTimer(this, &FrameView::didScrollTimerFired)
|
| , m_needsUpdateWidgetPositions(false)
|
| + , m_topControlsViewportAdjustment(0)
|
| {
|
| ASSERT(m_frame);
|
| init();
|
| @@ -3008,4 +3009,23 @@ void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
|
| }
|
| }
|
|
|
| +void FrameView::setTopControlsViewportAdjustment(float adjustment)
|
| +{
|
| + m_topControlsViewportAdjustment = adjustment;
|
| +}
|
| +
|
| +IntPoint FrameView::maximumScrollPosition() const
|
| +{
|
| + FloatSize visibleContentSizeF = unscaledVisibleContentSize(ExcludeScrollbars);
|
| + visibleContentSizeF.expand(0, -m_topControlsViewportAdjustment);
|
| + visibleContentSizeF.scale(1 / visibleContentScaleFactor());
|
| + IntSize visibleSize = expandedIntSize(visibleContentSizeF);
|
| +
|
| + IntPoint maximumOffset(
|
| + contentsWidth() - visibleSize.width() - scrollOrigin().x(),
|
| + contentsHeight() - visibleSize.height() - scrollOrigin().y());
|
| + maximumOffset.clampNegativeToZero();
|
| + return maximumOffset;
|
| +}
|
| +
|
| } // namespace blink
|
|
|