Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: Source/core/frame/FrameView.cpp

Issue 560623002: Adjust maximum scroll bounds on FrameView to account for top controls. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 0aead4777869975461aa32155082b51948005ade..0a2af2873d6521af1cd299a362c1391f7b2d948a 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -118,6 +118,7 @@ FrameView::FrameView(LocalFrame* frame)
, m_layoutSizeFixedToFrameSize(true)
, m_didScrollTimer(this, &FrameView::didScrollTimerFired)
, m_needsUpdateWidgetPositions(false)
+ , m_topControlsViewportAdjustment(0)
{
ASSERT(m_frame);
init();
@@ -2982,4 +2983,16 @@ void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
}
}
+void FrameView::setTopControlsViewportAdjustment(int adjustment)
+{
+ m_topControlsViewportAdjustment = adjustment;
+}
+
+IntPoint FrameView::maximumScrollPosition() const
+{
+ IntPoint max = ScrollView::maximumScrollPosition();
+ max.move(0, m_topControlsViewportAdjustment / visibleContentScaleFactor());
+ return max;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698