| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); | 83 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); |
| 84 const Vector<double>& offsets = styleKeyframe->keys(); | 84 const Vector<double>& offsets = styleKeyframe->keys(); |
| 85 ASSERT(!offsets.isEmpty()); | 85 ASSERT(!offsets.isEmpty()); |
| 86 keyframe->setOffset(offsets[0]); | 86 keyframe->setOffset(offsets[0]); |
| 87 keyframe->setEasing(defaultTimingFunction); | 87 keyframe->setEasing(defaultTimingFunction); |
| 88 const StylePropertySet& properties = styleKeyframe->properties(); | 88 const StylePropertySet& properties = styleKeyframe->properties(); |
| 89 for (unsigned j = 0; j < properties.propertyCount(); j++) { | 89 for (unsigned j = 0; j < properties.propertyCount(); j++) { |
| 90 CSSPropertyID property = properties.propertyAt(j).id(); | 90 CSSPropertyID property = properties.propertyAt(j).id(); |
| 91 specifiedPropertiesForUseCounter.add(property); | 91 specifiedPropertiesForUseCounter.add(property); |
| 92 if (property == CSSPropertyAnimationTimingFunction) { | 92 if (property == CSSPropertyAnimationTimingFunction) { |
| 93 CSSValue* value = properties.propertyAt(j).value(); | 93 CSSValue value = properties.propertyAt(j).value(); |
| 94 RefPtr<TimingFunction> timingFunction; | 94 RefPtr<TimingFunction> timingFunction; |
| 95 if (value->isInheritedValue() && parentStyle->animations()) { | 95 if (value.isInheritedValue() && parentStyle->animations()) { |
| 96 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; | 96 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; |
| 97 } else if (value->isValueList()) { | 97 } else if (value.isValueList()) { |
| 98 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value)->item(0)); | 98 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value).item(0)); |
| 99 } else { | 99 } else { |
| 100 ASSERT(value->isCSSWideKeyword()); | 100 ASSERT(value.isCSSWideKeyword()); |
| 101 timingFunction = CSSTimingData::initialTimingFunction(); | 101 timingFunction = CSSTimingData::initialTimingFunction(); |
| 102 } | 102 } |
| 103 keyframe->setEasing(timingFunction.release()); | 103 keyframe->setEasing(timingFunction.release()); |
| 104 } else if (CSSPropertyMetadata::isAnimatableProperty(property)) { | 104 } else if (CSSPropertyMetadata::isAnimatableProperty(property)) { |
| 105 keyframe->setPropertyValue(property, properties.propertyAt(j).va
lue()); | 105 keyframe->setPropertyValue(property, properties.propertyAt(j).va
lue()); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 keyframes.append(keyframe); | 108 keyframes.append(keyframe); |
| 109 // The last keyframe specified at a given offset is used. | 109 // The last keyframe specified at a given offset is used. |
| 110 for (size_t j = 1; j < offsets.size(); ++j) { | 110 for (size_t j = 1; j < offsets.size(); ++j) { |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 visitor->trace(m_activeInterpolationsForAnimations); | 803 visitor->trace(m_activeInterpolationsForAnimations); |
| 804 visitor->trace(m_activeInterpolationsForTransitions); | 804 visitor->trace(m_activeInterpolationsForTransitions); |
| 805 visitor->trace(m_newAnimations); | 805 visitor->trace(m_newAnimations); |
| 806 visitor->trace(m_suppressedAnimations); | 806 visitor->trace(m_suppressedAnimations); |
| 807 visitor->trace(m_animationsWithUpdates); | 807 visitor->trace(m_animationsWithUpdates); |
| 808 visitor->trace(m_animationsWithStyleUpdates); | 808 visitor->trace(m_animationsWithStyleUpdates); |
| 809 #endif | 809 #endif |
| 810 } | 810 } |
| 811 | 811 |
| 812 } // namespace blink | 812 } // namespace blink |
| OLD | NEW |