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

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

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
Index: Source/core/frame/Screen.cpp
diff --git a/Source/core/frame/Screen.cpp b/Source/core/frame/Screen.cpp
index 1a06f48cfb3dce0ee471a80b4907720a60d1c20e..92a85b6fa3702163f6ae56864cfe87872ff31978 100644
--- a/Source/core/frame/Screen.cpp
+++ b/Source/core/frame/Screen.cpp
@@ -47,76 +47,76 @@ Screen::Screen(LocalFrame* frame)
unsigned Screen::height() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenRect(m_frame->view()).height() * host->deviceScaleFactor());
- return static_cast<unsigned>(screenRect(m_frame->view()).height());
+ return lroundf(screenRect(localFrame()->view()).height() * host->deviceScaleFactor());
+ return static_cast<unsigned>(screenRect(localFrame()->view()).height());
}
unsigned Screen::width() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenRect(m_frame->view()).width() * host->deviceScaleFactor());
- return static_cast<unsigned>(screenRect(m_frame->view()).width());
+ return lroundf(screenRect(localFrame()->view()).width() * host->deviceScaleFactor());
+ return static_cast<unsigned>(screenRect(localFrame()->view()).width());
}
unsigned Screen::colorDepth() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- return static_cast<unsigned>(screenDepth(m_frame->view()));
+ return static_cast<unsigned>(screenDepth(localFrame()->view()));
}
unsigned Screen::pixelDepth() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- return static_cast<unsigned>(screenDepth(m_frame->view()));
+ return static_cast<unsigned>(screenDepth(localFrame()->view()));
}
int Screen::availLeft() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenAvailableRect(m_frame->view()).x() * host->deviceScaleFactor());
- return static_cast<int>(screenAvailableRect(m_frame->view()).x());
+ return lroundf(screenAvailableRect(localFrame()->view()).x() * host->deviceScaleFactor());
+ return static_cast<int>(screenAvailableRect(localFrame()->view()).x());
}
int Screen::availTop() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenAvailableRect(m_frame->view()).y() * host->deviceScaleFactor());
- return static_cast<int>(screenAvailableRect(m_frame->view()).y());
+ return lroundf(screenAvailableRect(localFrame()->view()).y() * host->deviceScaleFactor());
+ return static_cast<int>(screenAvailableRect(localFrame()->view()).y());
}
unsigned Screen::availHeight() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenAvailableRect(m_frame->view()).height() * host->deviceScaleFactor());
- return static_cast<unsigned>(screenAvailableRect(m_frame->view()).height());
+ return lroundf(screenAvailableRect(localFrame()->view()).height() * host->deviceScaleFactor());
+ return static_cast<unsigned>(screenAvailableRect(localFrame()->view()).height());
}
unsigned Screen::availWidth() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- FrameHost* host = m_frame->host();
+ FrameHost* host = localFrame()->host();
if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(screenAvailableRect(m_frame->view()).width() * host->deviceScaleFactor());
- return static_cast<unsigned>(screenAvailableRect(m_frame->view()).width());
+ return lroundf(screenAvailableRect(localFrame()->view()).width() * host->deviceScaleFactor());
+ return static_cast<unsigned>(screenAvailableRect(localFrame()->view()).width());
}
void Screen::trace(Visitor* visitor)

Powered by Google App Engine
This is Rietveld 408576698