Index: Source/core/frame/Screen.cpp |
diff --git a/Source/core/frame/Screen.cpp b/Source/core/frame/Screen.cpp |
index 40bb5885b2edb7611a16ce324f65c917d297d2ad..cd743bc7e9223f14bf899b3ec85489ffd5f906c9 100644 |
--- a/Source/core/frame/Screen.cpp |
+++ b/Source/core/frame/Screen.cpp |
@@ -35,7 +35,6 @@ |
#include "core/frame/LocalFrame.h" |
#include "core/frame/Settings.h" |
#include "core/inspector/InspectorInstrumentation.h" |
-#include "core/page/Chrome.h" |
#include "platform/PlatformScreen.h" |
namespace blink { |
@@ -84,11 +83,9 @@ |
if (!m_frame) |
return 0; |
FrameHost* host = m_frame->host(); |
- if (!host) |
- return 0; |
- if (host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
- return lroundf(screenAvailableRect(host->chrome()).x() * host->deviceScaleFactor()); |
- return static_cast<int>(screenAvailableRect(host->chrome()).x()); |
+ if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
+ return lroundf(screenAvailableRect(m_frame->view()).x() * host->deviceScaleFactor()); |
+ return static_cast<int>(screenAvailableRect(m_frame->view()).x()); |
} |
int Screen::availTop() const |
@@ -96,11 +93,9 @@ |
if (!m_frame) |
return 0; |
FrameHost* host = m_frame->host(); |
- if (!host) |
- return 0; |
- if (host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
- return lroundf(screenAvailableRect(host->chrome()).y() * host->deviceScaleFactor()); |
- return static_cast<int>(screenAvailableRect(host->chrome()).y()); |
+ if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
+ return lroundf(screenAvailableRect(m_frame->view()).y() * host->deviceScaleFactor()); |
+ return static_cast<int>(screenAvailableRect(m_frame->view()).y()); |
} |
unsigned Screen::availHeight() const |
@@ -108,11 +103,9 @@ |
if (!m_frame) |
return 0; |
FrameHost* host = m_frame->host(); |
- if (!host) |
- return 0; |
- if (host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
- return lroundf(screenAvailableRect(host->chrome()).height() * host->deviceScaleFactor()); |
- return static_cast<unsigned>(screenAvailableRect(host->chrome()).height()); |
+ if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
+ return lroundf(screenAvailableRect(m_frame->view()).height() * host->deviceScaleFactor()); |
+ return static_cast<unsigned>(screenAvailableRect(m_frame->view()).height()); |
} |
unsigned Screen::availWidth() const |
@@ -120,11 +113,9 @@ |
if (!m_frame) |
return 0; |
FrameHost* host = m_frame->host(); |
- if (!host) |
- return 0; |
- if (host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
- return lroundf(screenAvailableRect(host->chrome()).width() * host->deviceScaleFactor()); |
- return static_cast<unsigned>(screenAvailableRect(host->chrome()).width()); |
+ if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk()) |
+ return lroundf(screenAvailableRect(m_frame->view()).width() * host->deviceScaleFactor()); |
+ return static_cast<unsigned>(screenAvailableRect(m_frame->view()).width()); |
} |
DEFINE_TRACE(Screen) |