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

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableTransform.cpp

Issue 2893313004: Remove unused AnimatableValue types (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/animation/animatable/AnimatableTransform.h" 31 #include "core/animation/animatable/AnimatableTransform.h"
32 32
33 #include "platform/animation/AnimationUtilities.h" 33 #include "platform/animation/AnimationUtilities.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 PassRefPtr<AnimatableTransform> AnimatableTransform::Create(
38 const TransformOperations& transform,
39 double zoom) {
40 return AdoptRef(new AnimatableTransform(transform, zoom));
41 }
42
43 PassRefPtr<AnimatableValue> AnimatableTransform::InterpolateTo( 37 PassRefPtr<AnimatableValue> AnimatableTransform::InterpolateTo(
44 const AnimatableValue* value, 38 const AnimatableValue* value,
45 double fraction) const { 39 double fraction) const {
46 const AnimatableTransform& transform = ToAnimatableTransform(*value); 40 const AnimatableTransform& transform = ToAnimatableTransform(*value);
47 return AnimatableTransform::Create( 41 return AnimatableTransform::Create(
48 transform.transform_.Blend(transform_, fraction), 42 transform.transform_.Blend(transform_, fraction),
49 Blend(zoom_, transform.zoom_, fraction)); 43 Blend(zoom_, transform.zoom_, fraction));
50 } 44 }
51 45
52 bool AnimatableTransform::EqualTo(const AnimatableValue* value) const {
53 return transform_ == ToAnimatableTransform(value)->transform_;
54 }
55
56 } // namespace blink 46 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698