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

Unified Diff: third_party/WebKit/Source/core/css/MediaValues.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameHost.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/MediaValues.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index 3b858816994084e6eb588b1448b67c3e97cd98fc..c9c709c0932e26aaa9e44d9b301d1829c110c7a3 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -48,18 +48,20 @@ double MediaValues::calculateViewportHeight(LocalFrame* frame)
int MediaValues::calculateDeviceWidth(LocalFrame* frame)
{
ASSERT(frame && frame->view() && frame->settings() && frame->host());
- int deviceWidth = frame->host()->chromeClient().screenInfo().rect.width;
+ blink::WebScreenInfo screenInfo = frame->host()->chromeClient().screenInfo();
+ int deviceWidth = screenInfo.rect.width;
if (frame->settings()->reportScreenSizeInPhysicalPixelsQuirk())
- deviceWidth = lroundf(deviceWidth * frame->host()->deviceScaleFactor());
+ deviceWidth = lroundf(deviceWidth * screenInfo.deviceScaleFactor);
return deviceWidth;
}
int MediaValues::calculateDeviceHeight(LocalFrame* frame)
{
ASSERT(frame && frame->view() && frame->settings() && frame->host());
- int deviceHeight = frame->host()->chromeClient().screenInfo().rect.height;
+ blink::WebScreenInfo screenInfo = frame->host()->chromeClient().screenInfo();
+ int deviceHeight = screenInfo.rect.height;
if (frame->settings()->reportScreenSizeInPhysicalPixelsQuirk())
- deviceHeight = lroundf(deviceHeight * frame->host()->deviceScaleFactor());
+ deviceHeight = lroundf(deviceHeight * screenInfo.deviceScaleFactor);
return deviceHeight;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698