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