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

Unified Diff: ui/gfx/size_f.cc

Issue 11365160: ui: Remove gfx::Size::ClampToNonNegative, prevent negative sizes always. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests that use negative values or NaN 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
« no previous file with comments | « ui/gfx/size_base_impl.h ('k') | ui/gfx/size_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size_f.cc
diff --git a/ui/gfx/size_f.cc b/ui/gfx/size_f.cc
index 96c186788e4ad23092b8078aff415270e74bc8c7..0aad4ad6556cc84ddc5a8e4414e9a0f7e407fa7f 100644
--- a/ui/gfx/size_f.cc
+++ b/ui/gfx/size_f.cc
@@ -4,8 +4,8 @@
#include "ui/gfx/size_f.h"
-#include "base/logging.h"
#include "base/stringprintf.h"
+#include "ui/gfx/size_base_impl.h"
namespace gfx {
@@ -13,9 +13,8 @@ template class SizeBase<SizeF, float>;
SizeF::SizeF() : SizeBase<SizeF, float>(0, 0) {}
-SizeF::SizeF(float width, float height) : SizeBase<SizeF, float>(0, 0) {
- set_width(width);
- set_height(height);
+SizeF::SizeF(float width, float height)
+ : SizeBase<SizeF, float>(width, height) {
}
SizeF::~SizeF() {}
« no previous file with comments | « ui/gfx/size_base_impl.h ('k') | ui/gfx/size_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698