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

Unified Diff: ui/gfx/geometry/size_f.cc

Issue 2749513011: Stabilize empty rect handling in EnclosingRect. (Closed)
Patch Set: Fix edges better Created 3 years, 9 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 | « ui/gfx/geometry/size_f.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/size_f.cc
diff --git a/ui/gfx/geometry/size_f.cc b/ui/gfx/geometry/size_f.cc
index 6d08e18c62ea5b1ad33dee9cecf26e0ff347e47a..a53352bdf719eec8327626e715225b601ec0728a 100644
--- a/ui/gfx/geometry/size_f.cc
+++ b/ui/gfx/geometry/size_f.cc
@@ -17,13 +17,13 @@ void SizeF::Enlarge(float grow_width, float grow_height) {
}
void SizeF::SetToMin(const SizeF& other) {
- width_ = width() <= other.width() ? width() : other.width();
- height_ = height() <= other.height() ? height() : other.height();
+ set_width(width() <= other.width() ? width() : other.width());
danakj 2017/03/23 16:10:42 These change doesn't seem needed. Both width() and
Peter Mayo 2017/03/23 19:29:23 Done.
+ set_height(height() <= other.height() ? height() : other.height());
}
void SizeF::SetToMax(const SizeF& other) {
- width_ = width() >= other.width() ? width() : other.width();
- height_ = height() >= other.height() ? height() : other.height();
+ set_width(width() >= other.width() ? width() : other.width());
+ set_height(height() >= other.height() ? height() : other.height());
}
std::string SizeF::ToString() const {
« no previous file with comments | « ui/gfx/geometry/size_f.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698