| 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;
|
| }
|
|
|
|
|