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

Unified Diff: ui/views/animation/bounds_animator.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: ui/views/animation/bounds_animator.cc
diff --git a/ui/views/animation/bounds_animator.cc b/ui/views/animation/bounds_animator.cc
index 037b9d6b5b64ea1509fabe62ae322735bfe073f6..05bea6c5ab604f420bca4c81045e5ed9e78625e3 100644
--- a/ui/views/animation/bounds_animator.cc
+++ b/ui/views/animation/bounds_animator.cc
@@ -235,8 +235,7 @@ void BoundsAnimator::AnimationProgressed(const Animation* animation) {
gfx::Rect new_bounds =
animation->CurrentValueBetween(data.start_bounds, data.target_bounds);
if (new_bounds != view->bounds()) {
- gfx::Rect total_bounds = view->bounds();
- total_bounds.Union(new_bounds);
+ gfx::Rect total_bounds = gfx::Union(new_bounds, view->bounds());
// Build up the region to repaint in repaint_bounds_. We'll do the repaint
// when all animations complete (in AnimationContainerProgressed).

Powered by Google App Engine
This is Rietveld 408576698