| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 bool exhaustDictionaryIterator(DictionaryIterator& iterator, ExecutionContext* e
xecutionContext, ExceptionState& exceptionState, Vector<Dictionary>& result) | 132 bool exhaustDictionaryIterator(DictionaryIterator& iterator, ExecutionContext* e
xecutionContext, ExceptionState& exceptionState, Vector<Dictionary>& result) |
| 133 { | 133 { |
| 134 while (iterator.next(executionContext, exceptionState)) { | 134 while (iterator.next(executionContext, exceptionState)) { |
| 135 Dictionary dictionary; | 135 Dictionary dictionary; |
| 136 if (!iterator.valueAsDictionary(dictionary, exceptionState)) { | 136 if (!iterator.valueAsDictionary(dictionary, exceptionState)) { |
| 137 exceptionState.throwTypeError("Keyframes must be objects."); | 137 exceptionState.throwTypeError("Keyframes must be objects."); |
| 138 return false; | 138 return false; |
| 139 } | 139 } |
| 140 result.append(dictionary); | 140 result.append(dictionary); |
| 141 } | 141 } |
| 142 return true; | 142 return !exceptionState.hadException(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace | 145 } // namespace |
| 146 | 146 |
| 147 // Spec: http://w3c.github.io/web-animations/#processing-a-frames-argument | 147 // Spec: http://w3c.github.io/web-animations/#processing-a-frames-argument |
| 148 EffectModel* EffectInput::convert(Element* element, const EffectModelOrDictionar
ySequenceOrDictionary& effectInput, ExecutionContext* executionContext, Exceptio
nState& exceptionState) | 148 EffectModel* EffectInput::convert(Element* element, const EffectModelOrDictionar
ySequenceOrDictionary& effectInput, ExecutionContext* executionContext, Exceptio
nState& exceptionState) |
| 149 { | 149 { |
| 150 if (effectInput.isEffectModel()) | 150 if (effectInput.isEffectModel()) |
| 151 return effectInput.getAsEffectModel(); | 151 return effectInput.getAsEffectModel(); |
| 152 | 152 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); | 296 std::sort(keyframes.begin(), keyframes.end(), compareKeyframes); |
| 297 | 297 |
| 298 ASSERT(!exceptionState.hadException()); | 298 ASSERT(!exceptionState.hadException()); |
| 299 | 299 |
| 300 return createEffectModelFromKeyframes(element, keyframes, encounteredComposi
tableProperty, exceptionState); | 300 return createEffectModelFromKeyframes(element, keyframes, encounteredComposi
tableProperty, exceptionState); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace blink | 303 } // namespace blink |
| OLD | NEW |