Chromium Code Reviews| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace | 194 } // namespace |
| 195 | 195 |
| 196 PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState) | 196 PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState) |
| 197 { | 197 { |
| 198 if (!element) | 198 if (!element) |
| 199 return nullptr; | 199 return nullptr; |
| 200 | 200 |
| 201 // TODO(alancutter): Remove this once composited animations no longer depend on AnimatableValues. | 201 // TODO(alancutter): Remove this once composited animations no longer depend on AnimatableValues. |
| 202 if (!element->inActiveDocument()) | 202 if (element->inActiveDocument()) |
| 203 return nullptr; | 203 element->document().updateLayoutTreeForNodeIfNeeded(element); |
|
shans
2015/06/22 11:51:39
doesn't this prevent elements that aren't in the d
alancutter (OOO until 2018)
2015/06/23 03:47:04
Correct, this patch fixes that.
| |
| 204 element->document().updateLayoutTreeForNodeIfNeeded(element); | |
| 205 | 204 |
| 206 StyleSheetContents* styleSheetContents = element->document().elementSheet(). contents(); | 205 StyleSheetContents* styleSheetContents = element->document().elementSheet(). contents(); |
| 207 StringKeyframeVector keyframes; | 206 StringKeyframeVector keyframes; |
| 208 double lastOffset = 0; | 207 double lastOffset = 0; |
| 209 | 208 |
| 210 for (const auto& keyframeDictionary : keyframeDictionaryVector) { | 209 for (const auto& keyframeDictionary : keyframeDictionaryVector) { |
| 211 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); | 210 RefPtrWillBeRawPtr<StringKeyframe> keyframe = StringKeyframe::create(); |
| 212 | 211 |
| 213 ScriptValue scriptValue; | 212 ScriptValue scriptValue; |
| 214 bool frameHasOffset = DictionaryHelper::get(keyframeDictionary, "offset" , scriptValue) && !scriptValue.isNull(); | 213 bool frameHasOffset = DictionaryHelper::get(keyframeDictionary, "offset" , scriptValue) && !scriptValue.isNull(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const EffectModelOrDictionarySequence& effectInput, ExceptionState& exceptionState) | 293 PassRefPtrWillBeRawPtr<EffectModel> EffectInput::convert(Element* element, const EffectModelOrDictionarySequence& effectInput, ExceptionState& exceptionState) |
| 295 { | 294 { |
| 296 if (effectInput.isEffectModel()) | 295 if (effectInput.isEffectModel()) |
| 297 return effectInput.getAsEffectModel(); | 296 return effectInput.getAsEffectModel(); |
| 298 if (effectInput.isDictionarySequence()) | 297 if (effectInput.isDictionarySequence()) |
| 299 return convert(element, effectInput.getAsDictionarySequence(), exception State); | 298 return convert(element, effectInput.getAsDictionarySequence(), exception State); |
| 300 return nullptr; | 299 return nullptr; |
| 301 } | 300 } |
| 302 | 301 |
| 303 } // namespace blink | 302 } // namespace blink |
| OLD | NEW |