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

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
« no previous file with comments | « no previous file | Source/core/animation/Animation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 { 56 {
57 return isSameType(value) && equalTo(value); 57 return isSameType(value) && equalTo(value);
58 } 58 }
59 bool equals(const AnimatableValue& value) const 59 bool equals(const AnimatableValue& value) const
60 { 60 {
61 return equals(&value); 61 return equals(&value);
62 } 62 }
63 63
64 virtual bool dependsOnUnderlyingValue() const OVERRIDE FINAL { return false; } 64 virtual bool dependsOnUnderlyingValue() const OVERRIDE FINAL { return false; }
65 virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue*) co nst OVERRIDE FINAL { return takeConstRef(this); } 65 virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue*) co nst OVERRIDE FINAL { return takeConstRef(this); }
66 virtual bool isAnimatableValue() const { return true; }
66 67
67 bool isClipPathOperation() const { return type() == TypeClipPathOperation; } 68 bool isClipPathOperation() const { return type() == TypeClipPathOperation; }
68 bool isColor() const { return type() == TypeColor; } 69 bool isColor() const { return type() == TypeColor; }
69 bool isDouble() const { return type() == TypeDouble; } 70 bool isDouble() const { return type() == TypeDouble; }
70 bool isFilterOperations() const { return type() == TypeFilterOperations; } 71 bool isFilterOperations() const { return type() == TypeFilterOperations; }
71 bool isImage() const { return type() == TypeImage; } 72 bool isImage() const { return type() == TypeImage; }
72 bool isLength() const { return type() == TypeLength; } 73 bool isLength() const { return type() == TypeLength; }
73 bool isLengthBox() const { return type() == TypeLengthBox; } 74 bool isLengthBox() const { return type() == TypeLengthBox; }
74 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; } 75 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; }
75 bool isLengthPoint() const { return type() == TypeLengthPoint; } 76 bool isLengthPoint() const { return type() == TypeLengthPoint; }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual bool equalTo(const AnimatableValue*) const = 0; 135 virtual bool equalTo(const AnimatableValue*) const = 0;
135 136
136 virtual double distanceTo(const AnimatableValue*) const; 137 virtual double distanceTo(const AnimatableValue*) const;
137 138
138 friend class KeyframeEffectModel; 139 friend class KeyframeEffectModel;
139 }; 140 };
140 141
141 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ 142 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \
142 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value. predicate) 143 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value. predicate)
143 144
145 DEFINE_TYPE_CASTS(AnimatableValue, AnimationEffect::CompositableValue, value, va lue->isAnimatableValue(), value.isAnimatableValue());
146
144 } // namespace WebCore 147 } // namespace WebCore
145 148
146 #endif // AnimatableValue_h 149 #endif // AnimatableValue_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/Animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698