OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); | 82 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); |
83 const Vector<double>& offsets = styleKeyframe->keys(); | 83 const Vector<double>& offsets = styleKeyframe->keys(); |
84 ASSERT(!offsets.isEmpty()); | 84 ASSERT(!offsets.isEmpty()); |
85 keyframe->setOffset(offsets[0]); | 85 keyframe->setOffset(offsets[0]); |
86 keyframe->setEasing(defaultTimingFunction); | 86 keyframe->setEasing(defaultTimingFunction); |
87 const StylePropertySet& properties = styleKeyframe->properties(); | 87 const StylePropertySet& properties = styleKeyframe->properties(); |
88 for (unsigned j = 0; j < properties.propertyCount(); j++) { | 88 for (unsigned j = 0; j < properties.propertyCount(); j++) { |
89 CSSPropertyID property = properties.propertyAt(j).id(); | 89 CSSPropertyID property = properties.propertyAt(j).id(); |
90 specifiedPropertiesForUseCounter.add(property); | 90 specifiedPropertiesForUseCounter.add(property); |
91 if (property == CSSPropertyAnimationTimingFunction) { | 91 if (property == CSSPropertyAnimationTimingFunction) { |
92 CSSValue* value = properties.propertyAt(j).value(); | 92 CSSValue value = properties.propertyAt(j).value(); |
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 (CSSAnimations::isAnimatableProperty(property)) { | 103 } else if (CSSAnimations::isAnimatableProperty(property)) { |
104 keyframe->setPropertyValue(property, properties.propertyAt(j).va
lue()); | 104 keyframe->setPropertyValue(property, properties.propertyAt(j).va
lue()); |
105 } | 105 } |
106 } | 106 } |
107 keyframes.append(keyframe); | 107 keyframes.append(keyframe); |
108 // The last keyframe specified at a given offset is used. | 108 // The last keyframe specified at a given offset is used. |
109 for (size_t j = 1; j < offsets.size(); ++j) { | 109 for (size_t j = 1; j < offsets.size(); ++j) { |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 visitor->trace(m_activeInterpolationsForAnimations); | 802 visitor->trace(m_activeInterpolationsForAnimations); |
803 visitor->trace(m_activeInterpolationsForTransitions); | 803 visitor->trace(m_activeInterpolationsForTransitions); |
804 visitor->trace(m_newAnimations); | 804 visitor->trace(m_newAnimations); |
805 visitor->trace(m_suppressedAnimations); | 805 visitor->trace(m_suppressedAnimations); |
806 visitor->trace(m_animationsWithUpdates); | 806 visitor->trace(m_animationsWithUpdates); |
807 visitor->trace(m_animationsWithStyleUpdates); | 807 visitor->trace(m_animationsWithStyleUpdates); |
808 #endif | 808 #endif |
809 } | 809 } |
810 | 810 |
811 } // namespace blink | 811 } // namespace blink |
OLD | NEW |