| Index: third_party/WebKit/Source/core/frame/Screen.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/Screen.cpp b/third_party/WebKit/Source/core/frame/Screen.cpp
|
| index 0abf20f12bc9a2989905bd7a37f6a4ae9d053609..f3d8347fb7da47a5de39cf57db8cb13592a7e0f4 100644
|
| --- a/third_party/WebKit/Source/core/frame/Screen.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/Screen.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "core/frame/Settings.h"
|
| #include "core/inspector/InspectorInstrumentation.h"
|
| #include "core/page/ChromeClient.h"
|
| +#include "core/page/Page.h"
|
| #include "public/platform/WebScreenInfo.h"
|
|
|
| namespace blink {
|
| @@ -46,7 +47,7 @@ int Screen::height() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.rect.height * screenInfo.deviceScaleFactor);
|
| }
|
| @@ -59,7 +60,7 @@ int Screen::width() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.rect.width * screenInfo.deviceScaleFactor);
|
| }
|
| @@ -86,7 +87,7 @@ int Screen::availLeft() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.availableRect.x * screenInfo.deviceScaleFactor);
|
| }
|
| @@ -99,7 +100,7 @@ int Screen::availTop() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.availableRect.y * screenInfo.deviceScaleFactor);
|
| }
|
| @@ -112,7 +113,7 @@ int Screen::availHeight() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.availableRect.height *
|
| screenInfo.deviceScaleFactor);
|
| @@ -126,7 +127,7 @@ int Screen::availWidth() const {
|
| FrameHost* host = frame()->host();
|
| if (!host)
|
| return 0;
|
| - if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| + if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) {
|
| WebScreenInfo screenInfo = host->chromeClient().screenInfo();
|
| return lroundf(screenInfo.availableRect.width *
|
| screenInfo.deviceScaleFactor);
|
|
|