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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if (compositeString == "add") | 88 if (compositeString == "add") |
89 keyframe->setComposite(AnimationEffect::CompositeAdd); | 89 keyframe->setComposite(AnimationEffect::CompositeAdd); |
90 | 90 |
91 String timingFunctionString; | 91 String timingFunctionString; |
92 if (DictionaryHelper::get(keyframeDictionaryVector[i], "easing", timingF
unctionString)) { | 92 if (DictionaryHelper::get(keyframeDictionaryVector[i], "easing", timingF
unctionString)) { |
93 if (RefPtr<TimingFunction> timingFunction = AnimationInputHelpers::p
arseTimingFunction(timingFunctionString)) | 93 if (RefPtr<TimingFunction> timingFunction = AnimationInputHelpers::p
arseTimingFunction(timingFunctionString)) |
94 keyframe->setEasing(timingFunction); | 94 keyframe->setEasing(timingFunction); |
95 } | 95 } |
96 | 96 |
97 Vector<String> keyframeProperties; | 97 Vector<String> keyframeProperties; |
98 keyframeDictionaryVector[i].getOwnPropertyNames(keyframeProperties); | 98 keyframeDictionaryVector[i].getPropertyNames(keyframeProperties); |
99 for (size_t j = 0; j < keyframeProperties.size(); ++j) { | 99 for (size_t j = 0; j < keyframeProperties.size(); ++j) { |
100 String property = keyframeProperties[j]; | 100 String property = keyframeProperties[j]; |
101 CSSPropertyID id = AnimationInputHelpers::keyframeAttributeToCSSProp
ertyID(property); | 101 CSSPropertyID id = AnimationInputHelpers::keyframeAttributeToCSSProp
ertyID(property); |
102 if (id == CSSPropertyInvalid) | 102 if (id == CSSPropertyInvalid) |
103 continue; | 103 continue; |
104 String value; | 104 String value; |
105 DictionaryHelper::get(keyframeDictionaryVector[i], property, value); | 105 DictionaryHelper::get(keyframeDictionaryVector[i], property, value); |
106 keyframe->setPropertyValue(id, value, styleSheetContents); | 106 keyframe->setPropertyValue(id, value, styleSheetContents); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 RefPtrWillBeRawPtr<StringKeyframeEffectModel> keyframeEffectModel = StringKe
yframeEffectModel::create(keyframes); | 110 RefPtrWillBeRawPtr<StringKeyframeEffectModel> keyframeEffectModel = StringKe
yframeEffectModel::create(keyframes); |
111 if (!keyframeEffectModel->isReplaceOnly()) { | 111 if (!keyframeEffectModel->isReplaceOnly()) { |
112 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a
re not supported."); | 112 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a
re not supported."); |
113 return nullptr; | 113 return nullptr; |
114 } | 114 } |
115 keyframeEffectModel->forceConversionsToAnimatableValues(element); | 115 keyframeEffectModel->forceConversionsToAnimatableValues(element); |
116 | 116 |
117 return keyframeEffectModel; | 117 return keyframeEffectModel; |
118 } | 118 } |
119 | 119 |
120 } // namespace blink | 120 } // namespace blink |
OLD | NEW |