Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
index e728623d5c978578683a6067ec101d77ecff7e96..abd6d27d618af17f98af1063f4d90741030be7da 100644 |
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
@@ -64,6 +64,7 @@ |
#include "platform/weborigin/SecurityOrigin.h" |
#include "public/platform/Platform.h" |
#include "public/platform/WebCursorInfo.h" |
+#include "public/platform/WebFloatRect.h" |
#include "public/platform/WebFrameScheduler.h" |
#include "public/platform/WebRect.h" |
#include "public/platform/WebURLRequest.h" |
@@ -519,6 +520,14 @@ IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const |
return screenRect; |
} |
+FloatRect ChromeClientImpl::windowToViewport(const FloatRect& rectInWindow) const |
+{ |
+ WebFloatRect viewportRect(rectInWindow); |
+ if (m_webView->client()) |
+ m_webView->client()->convertWindowToViewport(&viewportRect); |
+ return viewportRect; |
+} |
+ |
WebScreenInfo ChromeClientImpl::screenInfo() const |
{ |
return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenInfo(); |