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

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

Issue 2025393003: Move document.visualViewport to window.visualViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing expectations Created 4 years, 6 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/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 0e6f2bc77983e0d1da1c0538800f884070a6489f..130fa525436b6c9a99074fab4f406eab4484d746 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1031,6 +1031,18 @@ double LocalDOMWindow::scrollY() const
return adjustScrollForAbsoluteZoom(viewportY, frame()->pageZoomFactor());
}
+VisualViewport* LocalDOMWindow::visualViewport()
+{
+ if (!frame())
+ return nullptr;
+
+ FrameHost* host = frame()->host();
+ if (!host)
+ return nullptr;
+
+ return &host->visualViewport();
+}
+
const AtomicString& LocalDOMWindow::name() const
{
if (!isCurrentlyDisplayedInFrame())
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698