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

Side by Side Diff: Source/core/animation/AnimatableValue.h

Issue 194673002: Web Animations: Refactor KeyframeEffectModel to work via an InterpolationEffect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 9 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 { 55 {
56 return isSameType(value) && equalTo(value); 56 return isSameType(value) && equalTo(value);
57 } 57 }
58 bool equals(const AnimatableValue& value) const 58 bool equals(const AnimatableValue& value) const
59 { 59 {
60 return equals(&value); 60 return equals(&value);
61 } 61 }
62 62
63 virtual bool dependsOnUnderlyingValue() const OVERRIDE FINAL { return false; } 63 virtual bool dependsOnUnderlyingValue() const OVERRIDE FINAL { return false; }
64 virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue*) co nst OVERRIDE FINAL { return takeConstRef(this); } 64 virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue*) co nst OVERRIDE FINAL { return takeConstRef(this); }
65 virtual bool isAnimatableValue() const { return true; }
65 66
66 bool isClipPathOperation() const { return type() == TypeClipPathOperation; } 67 bool isClipPathOperation() const { return type() == TypeClipPathOperation; }
67 bool isColor() const { return type() == TypeColor; } 68 bool isColor() const { return type() == TypeColor; }
68 bool isDouble() const { return type() == TypeDouble; } 69 bool isDouble() const { return type() == TypeDouble; }
69 bool isFilterOperations() const { return type() == TypeFilterOperations; } 70 bool isFilterOperations() const { return type() == TypeFilterOperations; }
70 bool isImage() const { return type() == TypeImage; } 71 bool isImage() const { return type() == TypeImage; }
71 bool isLength() const { return type() == TypeLength; } 72 bool isLength() const { return type() == TypeLength; }
72 bool isLengthBox() const { return type() == TypeLengthBox; } 73 bool isLengthBox() const { return type() == TypeLengthBox; }
73 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; } 74 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; }
74 bool isLengthPoint() const { return type() == TypeLengthPoint; } 75 bool isLengthPoint() const { return type() == TypeLengthPoint; }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual AnimatableType type() const = 0; 132 virtual AnimatableType type() const = 0;
132 // Implementations can assume that the object being compared has the same ty pe as the object this is called on 133 // Implementations can assume that the object being compared has the same ty pe as the object this is called on
133 virtual bool equalTo(const AnimatableValue*) const = 0; 134 virtual bool equalTo(const AnimatableValue*) const = 0;
134 135
135 friend class KeyframeEffectModel; 136 friend class KeyframeEffectModel;
136 }; 137 };
137 138
138 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ 139 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \
139 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value. predicate) 140 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value. predicate)
140 141
142 DEFINE_TYPE_CASTS(AnimatableValue, AnimationEffect::CompositableValue, value, va lue->isAnimatableValue(), value.isAnimatableValue());
143
141 } // namespace WebCore 144 } // namespace WebCore
142 145
143 #endif // AnimatableValue_h 146 #endif // AnimatableValue_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/Animation.h » ('j') | Source/core/animation/AnimationEffect.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698