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

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

Issue 1996223003: Mark FrameHost::deviceScaleFactor as deprecated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 8899ff7d3c8558d44d2e4ced8b5ed284d48654b6..9be26be8078d78a19bb4820e8b32ff27cf327f25 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -898,9 +898,10 @@ int LocalDOMWindow::outerHeight() const
if (!host)
return 0;
+ ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(host->chromeClient().windowRect().height() * host->deviceScaleFactor());
- return host->chromeClient().windowRect().height();
+ return lroundf(chromeClient.windowRect().height() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.windowRect().height();
}
int LocalDOMWindow::outerWidth() const
@@ -912,9 +913,11 @@ int LocalDOMWindow::outerWidth() const
if (!host)
return 0;
+ ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(host->chromeClient().windowRect().width() * host->deviceScaleFactor());
- return host->chromeClient().windowRect().width();
+ return lroundf(chromeClient.windowRect().width() * chromeClient.screenInfo().deviceScaleFactor);
+
+ return chromeClient.windowRect().width();
}
static FloatSize getViewportSize(LocalFrame* frame)
@@ -972,9 +975,10 @@ int LocalDOMWindow::screenX() const
if (!host)
return 0;
+ ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(host->chromeClient().windowRect().x() * host->deviceScaleFactor());
- return host->chromeClient().windowRect().x();
+ return lroundf(chromeClient.windowRect().x() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.windowRect().x();
}
int LocalDOMWindow::screenY() const
@@ -986,9 +990,10 @@ int LocalDOMWindow::screenY() const
if (!host)
return 0;
+ ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(host->chromeClient().windowRect().y() * host->deviceScaleFactor());
- return host->chromeClient().windowRect().y();
+ return lroundf(chromeClient.windowRect().y() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.windowRect().y();
}
double LocalDOMWindow::scrollX() const
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698