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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 RefPtr<StringKeyframe> keyframe = StringKeyframe::create(); | 84 RefPtr<StringKeyframe> keyframe = StringKeyframe::create(); |
85 const Vector<double>& offsets = styleKeyframe->keys(); | 85 const Vector<double>& offsets = styleKeyframe->keys(); |
86 ASSERT(!offsets.isEmpty()); | 86 ASSERT(!offsets.isEmpty()); |
87 keyframe->setOffset(offsets[0]); | 87 keyframe->setOffset(offsets[0]); |
88 keyframe->setEasing(defaultTimingFunction); | 88 keyframe->setEasing(defaultTimingFunction); |
89 const StylePropertySet& properties = styleKeyframe->properties(); | 89 const StylePropertySet& properties = styleKeyframe->properties(); |
90 for (unsigned j = 0; j < properties.propertyCount(); j++) { | 90 for (unsigned j = 0; j < properties.propertyCount(); j++) { |
91 CSSPropertyID property = properties.propertyAt(j).id(); | 91 CSSPropertyID property = properties.propertyAt(j).id(); |
92 specifiedPropertiesForUseCounter.add(property); | 92 specifiedPropertiesForUseCounter.add(property); |
93 if (property == CSSPropertyAnimationTimingFunction) { | 93 if (property == CSSPropertyAnimationTimingFunction) { |
94 CSSValue* value = properties.propertyAt(j).value(); | 94 const CSSValue* value = properties.propertyAt(j).value(); |
95 RefPtr<TimingFunction> timingFunction; | 95 RefPtr<TimingFunction> timingFunction; |
96 if (value->isInheritedValue() && parentStyle->animations()) { | 96 if (value->isInheritedValue() && parentStyle->animations()) { |
97 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; | 97 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; |
98 } else if (value->isValueList()) { | 98 } else if (value->isValueList()) { |
99 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value)->item(0)); | 99 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value)->item(0)); |
100 } else { | 100 } else { |
101 ASSERT(value->isCSSWideKeyword()); | 101 ASSERT(value->isCSSWideKeyword()); |
102 timingFunction = CSSTimingData::initialTimingFunction(); | 102 timingFunction = CSSTimingData::initialTimingFunction(); |
103 } | 103 } |
104 keyframe->setEasing(timingFunction.release()); | 104 keyframe->setEasing(timingFunction.release()); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 } | 897 } |
898 | 898 |
899 DEFINE_TRACE(CSSAnimations) | 899 DEFINE_TRACE(CSSAnimations) |
900 { | 900 { |
901 visitor->trace(m_transitions); | 901 visitor->trace(m_transitions); |
902 visitor->trace(m_pendingUpdate); | 902 visitor->trace(m_pendingUpdate); |
903 visitor->trace(m_runningAnimations); | 903 visitor->trace(m_runningAnimations); |
904 } | 904 } |
905 | 905 |
906 } // namespace blink | 906 } // namespace blink |
OLD | NEW |