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

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

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 | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/FrameView.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.h
diff --git a/Source/core/frame/FrameView.h b/Source/core/frame/FrameView.h
index dffc6f79fa8f9ec0e1199240eb2218c26f5f2bbd..80e5e88534508d05d9ce9d854b680c1c1ba41ff9 100644
--- a/Source/core/frame/FrameView.h
+++ b/Source/core/frame/FrameView.h
@@ -307,6 +307,13 @@ public:
// If |m_tickmarks| is empty, the default behavior is restored.
void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmarks; }
+ // Since the compositor can resize the viewport due to top controls and
+ // commit scroll offsets before a WebView::resize occurs, we need to adjust
+ // our scroll extents to prevent clamping the scroll offsets.
+ void setTopControlsViewportAdjustment(float);
+
+ virtual IntPoint maximumScrollPosition() const OVERRIDE;
+
// ScrollableArea interface
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE;
@@ -488,6 +495,7 @@ private:
Vector<IntRect> m_tickmarks;
bool m_needsUpdateWidgetPositions;
+ float m_topControlsViewportAdjustment;
};
inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698