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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1603253003: Add dedicated windowToViewport method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index e728623d5c978578683a6067ec101d77ecff7e96..afcbff9161e0972ceba8ddf6418a9eb4b993a40c 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -519,6 +519,11 @@ IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const
return screenRect;
}
+float ChromeClientImpl::windowToViewport(float scalar) const
+{
+ return m_webView->client() ? m_webView->client()->convertWindowToViewport(scalar) : scalar;
+}
+
WebScreenInfo ChromeClientImpl::screenInfo() const
{
return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenInfo();

Powered by Google App Engine
This is Rietveld 408576698