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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute
ToSVGAttribute(property, element); | 95 const QualifiedName* svgAttribute = AnimationInputHelpers::keyframeAttribute
ToSVGAttribute(property, element); |
96 if (svgAttribute) | 96 if (svgAttribute) |
97 keyframe.setSVGAttributeValue(*svgAttribute, value); | 97 keyframe.setSVGAttributeValue(*svgAttribute, value); |
98 return false; | 98 return false; |
99 } | 99 } |
100 | 100 |
101 EffectModel* createEffectModelFromKeyframes(Element& element, const StringKeyfra
meVector& keyframes, bool encounteredCompositableProperty, ExceptionState& excep
tionState) | 101 EffectModel* createEffectModelFromKeyframes(Element& element, const StringKeyfra
meVector& keyframes, bool encounteredCompositableProperty, ExceptionState& excep
tionState) |
102 { | 102 { |
103 // TODO(alancutter): Remove this once composited animations no longer depend
on AnimatableValues. | 103 // TODO(alancutter): Remove this once composited animations no longer depend
on AnimatableValues. |
104 if (encounteredCompositableProperty && element.inActiveDocument()) | 104 if (encounteredCompositableProperty && element.inActiveDocument()) |
105 element.document().updateLayoutTreeForNode(&element); | 105 element.document().updateStyleAndLayoutTreeForNode(&element); |
106 | 106 |
107 StringKeyframeEffectModel* keyframeEffectModel = StringKeyframeEffectModel::
create(keyframes, LinearTimingFunction::shared()); | 107 StringKeyframeEffectModel* keyframeEffectModel = StringKeyframeEffectModel::
create(keyframes, LinearTimingFunction::shared()); |
108 if (!RuntimeEnabledFeatures::cssAdditiveAnimationsEnabled()) { | 108 if (!RuntimeEnabledFeatures::cssAdditiveAnimationsEnabled()) { |
109 for (const auto& keyframeGroup : keyframeEffectModel->getPropertySpecifi
cKeyframeGroups()) { | 109 for (const auto& keyframeGroup : keyframeEffectModel->getPropertySpecifi
cKeyframeGroups()) { |
110 PropertyHandle property = keyframeGroup.key; | 110 PropertyHandle property = keyframeGroup.key; |
111 if (!property.isCSSProperty()) | 111 if (!property.isCSSProperty()) |
112 continue; | 112 continue; |
113 | 113 |
114 for (const auto& keyframe : keyframeGroup.value->keyframes()) { | 114 for (const auto& keyframe : keyframeGroup.value->keyframes()) { |
115 if (keyframe->isNeutral()) { | 115 if (keyframe->isNeutral()) { |
(...skipping 178 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 |