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()) |