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

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: Review feedback 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
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 0aead4777869975461aa32155082b51948005ade..52578d0d9e58724e23844074f5770d4cf86276b5 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(float adjustment)
+{
+ m_topControlsViewportAdjustment = adjustment;
+}
+
+IntPoint FrameView::maximumScrollPosition() const
+{
+ IntPoint max = ScrollView::maximumScrollPosition();
+ max.move(0, m_topControlsViewportAdjustment / visibleContentScaleFactor());
leviw_travelin_and_unemployed 2014/09/10 20:15:51 Don't you want to ceil this value? If so, I'd expe
bokan 2014/09/15 20:30:19 I think we want to floor in this case (since we ce
+ return max;
+}
+
} // namespace blink
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698