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

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

Issue 1197733002: Screen attribute availWidth/availHeight/width/height type changed to long (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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/Screen.h ('k') | Source/core/frame/Screen.idl » ('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 e4be656efa8561858e2b494a5f819e16c7027fcf..13807e4080267dbb172f3e9e1538128324153935 100644
--- a/Source/core/frame/Screen.cpp
+++ b/Source/core/frame/Screen.cpp
@@ -45,7 +45,7 @@ Screen::Screen(LocalFrame* frame)
{
}
-unsigned Screen::height() const
+int Screen::height() const
{
if (!m_frame)
return 0;
@@ -54,10 +54,10 @@ unsigned Screen::height() const
return 0;
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
return lroundf(host->chromeClient().screenInfo().rect.height * host->deviceScaleFactor());
- return static_cast<unsigned>(host->chromeClient().screenInfo().rect.height);
+ return host->chromeClient().screenInfo().rect.height;
}
-unsigned Screen::width() const
+int Screen::width() const
{
if (!m_frame)
return 0;
@@ -66,7 +66,7 @@ unsigned Screen::width() const
return 0;
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
return lroundf(host->chromeClient().screenInfo().rect.width * host->deviceScaleFactor());
- return static_cast<unsigned>(host->chromeClient().screenInfo().rect.width);
+ return host->chromeClient().screenInfo().rect.width;
}
unsigned Screen::colorDepth() const
@@ -107,7 +107,7 @@ int Screen::availTop() const
return static_cast<int>(host->chromeClient().screenInfo().availableRect.y);
}
-unsigned Screen::availHeight() const
+int Screen::availHeight() const
{
if (!m_frame)
return 0;
@@ -116,10 +116,10 @@ unsigned Screen::availHeight() const
return 0;
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
return lroundf(host->chromeClient().screenInfo().availableRect.height * host->deviceScaleFactor());
- return static_cast<unsigned>(host->chromeClient().screenInfo().availableRect.height);
+ return host->chromeClient().screenInfo().availableRect.height;
}
-unsigned Screen::availWidth() const
+int Screen::availWidth() const
{
if (!m_frame)
return 0;
@@ -128,7 +128,7 @@ unsigned Screen::availWidth() const
return 0;
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
return lroundf(host->chromeClient().screenInfo().availableRect.width * host->deviceScaleFactor());
- return static_cast<unsigned>(host->chromeClient().screenInfo().availableRect.width);
+ return host->chromeClient().screenInfo().availableRect.width;
}
DEFINE_TRACE(Screen)
« no previous file with comments | « Source/core/frame/Screen.h ('k') | Source/core/frame/Screen.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698