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

Unified Diff: Source/core/frame/Screen.cpp

Issue 1135633004: Revert of Make createWindow (mostly) work with OOPIF (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/page/Chrome.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/page/Chrome.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698