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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 11410024: ui: Remove gfx::Size::ClampToNonNegative, prevent negative sizes always. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no negative sizes Created 8 years, 1 month 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: chrome/browser/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index 2c4e5a7a2777346692da0def1c592c7362d77924..788f2f81342b81e8f4ca54486442aa4e9befe747 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -75,7 +75,7 @@ void SuspendRenderViewHost(RenderViewHost* rvh) {
ShellWindow::CreateParams::CreateParams()
: frame(ShellWindow::CreateParams::FRAME_CHROME),
- bounds(INT_MIN, INT_MIN, INT_MIN, INT_MIN),
+ bounds(INT_MIN, INT_MIN, 0, 0),
restore_position(true), restore_size(true),
creator_process_id(0), hidden(false) {
}
@@ -122,9 +122,9 @@ void ShellWindow::Init(const GURL& url,
gfx::Rect bounds = params.bounds;
- if (bounds.width() == INT_MIN)
+ if (bounds.width() == 0)
bounds.set_width(kDefaultWidth);
- if (bounds.height() == INT_MIN)
+ if (bounds.height() == 0)
bounds.set_height(kDefaultHeight);
// If left and top are left undefined, the native shell window will center

Powered by Google App Engine
This is Rietveld 408576698