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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 1217983003: Allow animation of non-interpolable properties in CSS Animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/CSSValueInterpolationType.cpp ('k') | Source/core/css/CSSProperties.in » ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 RefPtr<TimingFunction> timingFunction; 93 RefPtr<TimingFunction> timingFunction;
94 if (value->isInheritedValue() && parentStyle->animations()) { 94 if (value->isInheritedValue() && parentStyle->animations()) {
95 timingFunction = parentStyle->animations()->timingFunctionLi st()[0]; 95 timingFunction = parentStyle->animations()->timingFunctionLi st()[0];
96 } else if (value->isValueList()) { 96 } else if (value->isValueList()) {
97 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t oCSSValueList(value)->item(0)); 97 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t oCSSValueList(value)->item(0));
98 } else { 98 } else {
99 ASSERT(value->isCSSWideKeyword()); 99 ASSERT(value->isCSSWideKeyword());
100 timingFunction = CSSTimingData::initialTimingFunction(); 100 timingFunction = CSSTimingData::initialTimingFunction();
101 } 101 }
102 keyframe->setEasing(timingFunction.release()); 102 keyframe->setEasing(timingFunction.release());
103 } else if (CSSPropertyMetadata::isInterpolableProperty(property)) { 103 } else if (CSSAnimations::isAnimatableProperty(property)) {
104 // TODO(alancutter): We should allow animation of non-interpolab le properties as well.
105 // https://lists.w3.org/Archives/Public/www-style/2012Nov/0261.h tml
106 keyframe->setPropertyValue(property, properties.propertyAt(j).va lue()); 104 keyframe->setPropertyValue(property, properties.propertyAt(j).va lue());
107 } 105 }
108 } 106 }
109 keyframes.append(keyframe); 107 keyframes.append(keyframe);
110 // The last keyframe specified at a given offset is used. 108 // The last keyframe specified at a given offset is used.
111 for (size_t j = 1; j < offsets.size(); ++j) { 109 for (size_t j = 1; j < offsets.size(); ++j) {
112 keyframes.append(toStringKeyframe(keyframe->cloneWithOffset(offsets[ j]).get())); 110 keyframes.append(toStringKeyframe(keyframe->cloneWithOffset(offsets[ j]).get()));
113 } 111 }
114 } 112 }
115 113
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 visitor->trace(m_activeInterpolationsForAnimations); 802 visitor->trace(m_activeInterpolationsForAnimations);
805 visitor->trace(m_activeInterpolationsForTransitions); 803 visitor->trace(m_activeInterpolationsForTransitions);
806 visitor->trace(m_newAnimations); 804 visitor->trace(m_newAnimations);
807 visitor->trace(m_suppressedAnimations); 805 visitor->trace(m_suppressedAnimations);
808 visitor->trace(m_animationsWithUpdates); 806 visitor->trace(m_animationsWithUpdates);
809 visitor->trace(m_animationsWithStyleUpdates); 807 visitor->trace(m_animationsWithStyleUpdates);
810 #endif 808 #endif
811 } 809 }
812 810
813 } // namespace blink 811 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/CSSValueInterpolationType.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698