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

Side by Side Diff: ui/views/animation/flood_fill_ink_drop_ripple.cc

Issue 2615613003: Fix double ripple on activated flood fill ripple (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" 5 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 break; 253 break;
254 } 254 }
255 case InkDropState::ALTERNATE_ACTION_TRIGGERED: 255 case InkDropState::ALTERNATE_ACTION_TRIGGERED:
256 DCHECK(old_ink_drop_state == InkDropState::ALTERNATE_ACTION_PENDING); 256 DCHECK(old_ink_drop_state == InkDropState::ALTERNATE_ACTION_PENDING);
257 AnimateToOpacity(kHiddenOpacity, GetAnimationDuration( 257 AnimateToOpacity(kHiddenOpacity, GetAnimationDuration(
258 ALTERNATE_ACTION_TRIGGERED_FADE_OUT), 258 ALTERNATE_ACTION_TRIGGERED_FADE_OUT),
259 ui::LayerAnimator::ENQUEUE_NEW_ANIMATION, 259 ui::LayerAnimator::ENQUEUE_NEW_ANIMATION,
260 gfx::Tween::EASE_IN_OUT, animation_observer); 260 gfx::Tween::EASE_IN_OUT, animation_observer);
261 break; 261 break;
262 case InkDropState::ACTIVATED: { 262 case InkDropState::ACTIVATED: {
263 if (old_ink_drop_state == InkDropState::ACTION_PENDING) {
bruthig 2017/01/04 22:52:07 I believe this will cause the ACTIVATED |animation
mohsen 2017/01/05 20:14:37 Right. Done.
264 // The final state of pending animation is the same as the final state
265 // of activated animation. Nothing more to do here.
266 break;
267 }
263 AnimateToOpacity(visible_opacity_, 268 AnimateToOpacity(visible_opacity_,
264 GetAnimationDuration(ACTIVATED_FADE_IN), 269 GetAnimationDuration(ACTIVATED_FADE_IN),
265 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET, 270 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
266 gfx::Tween::EASE_IN, animation_observer); 271 gfx::Tween::EASE_IN, animation_observer);
267 AnimateToTransform(GetMaxSizeTargetTransform(), 272 AnimateToTransform(GetMaxSizeTargetTransform(),
268 GetAnimationDuration(ACTIVATED_TRANSFORM), 273 GetAnimationDuration(ACTIVATED_TRANSFORM),
269 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET, 274 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
270 gfx::Tween::EASE_IN_OUT, animation_observer); 275 gfx::Tween::EASE_IN_OUT, animation_observer);
271 break; 276 break;
272 } 277 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 (bounds.bottom_right() - point).Length(); 373 (bounds.bottom_right() - point).Length();
369 374
370 float largest_distance = 375 float largest_distance =
371 std::max(distance_to_top_left, distance_to_top_right); 376 std::max(distance_to_top_left, distance_to_top_right);
372 largest_distance = std::max(largest_distance, distance_to_bottom_left); 377 largest_distance = std::max(largest_distance, distance_to_bottom_left);
373 largest_distance = std::max(largest_distance, distance_to_bottom_right); 378 largest_distance = std::max(largest_distance, distance_to_bottom_right);
374 return largest_distance; 379 return largest_distance;
375 } 380 }
376 381
377 } // namespace views 382 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698