| Index: third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
|
| index 2eae2a1878b4e91e7ccdab438068bb4be18efcf3..d27936f47e05d3a645794a5837094b665e36a55c 100644
|
| --- a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
|
| @@ -28,6 +28,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Element.h"
|
| #include "core/frame/FrameHost.h"
|
| +#include "core/frame/FrameView.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/VisualViewport.h"
|
| @@ -85,6 +86,36 @@ double DOMVisualViewport::scrollTop()
|
| return 0;
|
| }
|
|
|
| +double DOMVisualViewport::pageX()
|
| +{
|
| + LocalFrame* frame = m_window->frame();
|
| + if (!frame)
|
| + return 0;
|
| +
|
| + FrameView* view = frame->view();
|
| + if (!view)
|
| + return 0;
|
| +
|
| + frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| + double viewportX = view->getScrollableArea()->scrollPositionDouble().x();
|
| + return adjustScrollForAbsoluteZoom(viewportX, frame->pageZoomFactor());
|
| +}
|
| +
|
| +double DOMVisualViewport::pageY()
|
| +{
|
| + LocalFrame* frame = m_window->frame();
|
| + if (!frame)
|
| + return 0;
|
| +
|
| + FrameView* view = frame->view();
|
| + if (!view)
|
| + return 0;
|
| +
|
| + frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| + double viewportY = view->getScrollableArea()->scrollPositionDouble().y();
|
| + return adjustScrollForAbsoluteZoom(viewportY, frame->pageZoomFactor());
|
| +}
|
| +
|
| double DOMVisualViewport::clientWidth()
|
| {
|
| LocalFrame* frame = m_window->frame();
|
|
|