diff options
author | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 14:32:37 +0000 |
---|---|---|
committer | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 14:32:37 +0000 |
commit | a25e25b907d387f0b76a2b8acd522193e777e793 (patch) | |
tree | 814155246ef7d0c458ad384723d940273a63fca6 /ui/gfx/rect_base.h | |
parent | 34b8066f9385db4ce27b26e96d7a718f4c259053 (diff) | |
download | chromium_src-a25e25b907d387f0b76a2b8acd522193e777e793.zip chromium_src-a25e25b907d387f0b76a2b8acd522193e777e793.tar.gz chromium_src-a25e25b907d387f0b76a2b8acd522193e777e793.tar.bz2 |
Fixes cases where we incorrectly convert from RectF to Rect by flooring. In all cases we should be taking the enclosing or enclosed int rect as appropriate.
This mainly affects bits of code using the old Rect Rect::Scale(float) function. There are, thankfully, not too many. I've replaced this legacy function with Rect Rect::ScaleUnsafe(float) and when this lands, I will open a bug for switching from ScaleUnsafe to a Scale followed by a ToEnclosedRect or ToEnclosingRect.
BUG=152596
Review URL: https://chromiumcodereview.appspot.com/10996037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/rect_base.h')
-rw-r--r-- | ui/gfx/rect_base.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h index 2219306..b6b5c99 100644 --- a/ui/gfx/rect_base.h +++ b/ui/gfx/rect_base.h @@ -65,16 +65,6 @@ class UI_EXPORT RectBase { Offset(point.x(), point.y()); } - /// Scales the rectangle by |scale|. - Class Scale(float scale) const WARN_UNUSED_RESULT { - return Scale(scale, scale); - } - - Class Scale(float x_scale, float y_scale) const WARN_UNUSED_RESULT { - return Class(origin_.Scale(x_scale, y_scale), - size_.Scale(x_scale, y_scale)); - } - InsetsClass InsetsFrom(const Class& inner) const { return InsetsClass(inner.y() - y(), inner.x() - x(), |