| Index: ui/gfx/geometry/size_f.cc
|
| diff --git a/ui/gfx/geometry/size_f.cc b/ui/gfx/geometry/size_f.cc
|
| index 10c144575e7677cd242776b08bd4589071c9d01c..6d08e18c62ea5b1ad33dee9cecf26e0ff347e47a 100644
|
| --- a/ui/gfx/geometry/size_f.cc
|
| +++ b/ui/gfx/geometry/size_f.cc
|
| @@ -8,7 +8,23 @@
|
|
|
| namespace gfx {
|
|
|
| -template class SizeBase<SizeF, float>;
|
| +float SizeF::GetArea() const {
|
| + return width() * height();
|
| +}
|
| +
|
| +void SizeF::Enlarge(float grow_width, float grow_height) {
|
| + SetSize(width() + grow_width, height() + grow_height);
|
| +}
|
| +
|
| +void SizeF::SetToMin(const SizeF& other) {
|
| + width_ = width() <= other.width() ? width() : other.width();
|
| + 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();
|
| +}
|
|
|
| std::string SizeF::ToString() const {
|
| return base::StringPrintf("%fx%f", width(), height());
|
|
|