| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 exceptionState.throwTypeError("Keyframes must be objects."); | 130 exceptionState.throwTypeError("Keyframes must be objects."); |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 result.append(dictionary); | 133 result.append(dictionary); |
| 134 } | 134 } |
| 135 return !exceptionState.hadException(); | 135 return !exceptionState.hadException(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace | 138 } // namespace |
| 139 | 139 |
| 140 // Spec: http://w3c.github.io/web-animations/#processing-a-frames-argument | 140 // Spec: http://w3c.github.io/web-animations/#processing-a-keyframes-argument |
| 141 EffectModel* EffectInput::convert(Element* element, const DictionarySequenceOrDi
ctionary& effectInput, ExecutionContext* executionContext, ExceptionState& excep
tionState) | 141 EffectModel* EffectInput::convert(Element* element, const DictionarySequenceOrDi
ctionary& effectInput, ExecutionContext* executionContext, ExceptionState& excep
tionState) |
| 142 { | 142 { |
| 143 if (effectInput.isNull() || !element) | 143 if (effectInput.isNull() || !element) |
| 144 return nullptr; | 144 return nullptr; |
| 145 | 145 |
| 146 if (effectInput.isDictionarySequence()) | 146 if (effectInput.isDictionarySequence()) |
| 147 return convertArrayForm(*element, effectInput.getAsDictionarySequence(),
exceptionState); | 147 return convertArrayForm(*element, effectInput.getAsDictionarySequence(),
exceptionState); |
| 148 | 148 |
| 149 const Dictionary& dictionary = effectInput.getAsDictionary(); | 149 const Dictionary& dictionary = effectInput.getAsDictionary(); |
| 150 DictionaryIterator iterator = dictionary.getIterator(executionContext); | 150 DictionaryIterator iterator = dictionary.getIterator(executionContext); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 | 283 |
| 284 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); | 284 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); |
| 285 | 285 |
| 286 DCHECK(!exceptionState.hadException()); | 286 DCHECK(!exceptionState.hadException()); |
| 287 | 287 |
| 288 return createEffectModelFromKeyframes(element, keyframes, exceptionState); | 288 return createEffectModelFromKeyframes(element, keyframes, exceptionState); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace blink | 291 } // namespace blink |
| OLD | NEW |