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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2622103002: Generalize browser controls adjustment for arbitrary scrollers. (Closed)
Patch Set: Fixed some comments Created 3 years, 11 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: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index 94de65e8797ea5b3212c435c97424aaee7266f97..7899bfb739fa6ae38580bd46562acd8c67d122a4 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -587,6 +587,10 @@ void VisualViewport::setBrowserControlsAdjustment(float adjustment) {
m_browserControlsAdjustment = adjustment;
}
+float VisualViewport::browserControlsAdjustment() const {
+ return m_browserControlsAdjustment;
+}
+
IntRect VisualViewport::scrollableAreaBoundingBox() const {
// This method should return the bounding box in the parent view's coordinate
// space; however, VisualViewport technically isn't a child of any Frames.
@@ -606,6 +610,7 @@ IntSize VisualViewport::contentsSize() const {
if (!frame || !frame->view())
return IntSize();
+ // TODO(bokan): This should be the layout viewport rather than main FrameView.
return frame->view()->visibleContentRect(IncludeScrollbars).size();
}

Powered by Google App Engine
This is Rietveld 408576698