| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 keyframes.append(keyframe); | 93 keyframes.append(keyframe); |
| 94 | 94 |
| 95 String compositeString; | 95 String compositeString; |
| 96 keyframeDictionaryVector[i].get("composite", compositeString); | 96 keyframeDictionaryVector[i].get("composite", compositeString); |
| 97 if (compositeString == "add") | 97 if (compositeString == "add") |
| 98 keyframe->setComposite(AnimationEffect::CompositeAdd); | 98 keyframe->setComposite(AnimationEffect::CompositeAdd); |
| 99 | 99 |
| 100 String timingFunctionString; | 100 String timingFunctionString; |
| 101 if (keyframeDictionaryVector[i].get("easing", timingFunctionString)) { | 101 if (keyframeDictionaryVector[i].get("easing", timingFunctionString)) { |
| 102 RefPtrWillBeRawPtr<CSSValue> timingFunctionValue = BisonCSSParser::p
arseAnimationTimingFunctionValue(timingFunctionString); | 102 if (RefPtrWillBeRawPtr<CSSValue> timingFunctionValue = BisonCSSParse
r::parseAnimationTimingFunctionValue(timingFunctionString)) |
| 103 if (timingFunctionValue) | |
| 104 keyframe->setEasing(CSSToStyleMap::mapAnimationTimingFunction(ti
mingFunctionValue.get(), true)); | 103 keyframe->setEasing(CSSToStyleMap::mapAnimationTimingFunction(ti
mingFunctionValue.get(), true)); |
| 105 } | 104 } |
| 106 | 105 |
| 107 Vector<String> keyframeProperties; | 106 Vector<String> keyframeProperties; |
| 108 keyframeDictionaryVector[i].getOwnPropertyNames(keyframeProperties); | 107 keyframeDictionaryVector[i].getOwnPropertyNames(keyframeProperties); |
| 109 for (size_t j = 0; j < keyframeProperties.size(); ++j) { | 108 for (size_t j = 0; j < keyframeProperties.size(); ++j) { |
| 110 String property = keyframeProperties[j]; | 109 String property = keyframeProperties[j]; |
| 111 CSSPropertyID id = camelCaseCSSPropertyNameToID(property); | 110 CSSPropertyID id = camelCaseCSSPropertyNameToID(property); |
| 112 if (id == CSSPropertyInvalid) | 111 if (id == CSSPropertyInvalid) |
| 113 continue; | 112 continue; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 129 if (!keyframeEffectModel->isReplaceOnly()) { | 128 if (!keyframeEffectModel->isReplaceOnly()) { |
| 130 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a
re not supported."); | 129 exceptionState.throwDOMException(NotSupportedError, "Partial keyframes a
re not supported."); |
| 131 return nullptr; | 130 return nullptr; |
| 132 } | 131 } |
| 133 keyframeEffectModel->forceConversionsToAnimatableValues(element); | 132 keyframeEffectModel->forceConversionsToAnimatableValues(element); |
| 134 | 133 |
| 135 return keyframeEffectModel; | 134 return keyframeEffectModel; |
| 136 } | 135 } |
| 137 | 136 |
| 138 } // namespace WebCore | 137 } // namespace WebCore |
| OLD | NEW |