OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "core/css/resolver/StyleResolver.h" | 29 #include "core/css/resolver/StyleResolver.h" |
30 | 30 |
31 #include "core/CSSPropertyNames.h" | 31 #include "core/CSSPropertyNames.h" |
32 #include "core/HTMLNames.h" | 32 #include "core/HTMLNames.h" |
33 #include "core/MediaTypeNames.h" | 33 #include "core/MediaTypeNames.h" |
34 #include "core/StylePropertyShorthand.h" | 34 #include "core/StylePropertyShorthand.h" |
35 #include "core/animation/AnimationTimeline.h" | 35 #include "core/animation/AnimationTimeline.h" |
36 #include "core/animation/ElementAnimations.h" | 36 #include "core/animation/ElementAnimations.h" |
37 #include "core/animation/InterpolationEnvironment.h" | 37 #include "core/animation/InterpolationEnvironment.h" |
38 #include "core/animation/InvalidatableInterpolation.h" | |
39 #include "core/animation/KeyframeEffect.h" | 38 #include "core/animation/KeyframeEffect.h" |
| 39 #include "core/animation/StackableInterpolation.h" |
40 #include "core/animation/StyleInterpolation.h" | 40 #include "core/animation/StyleInterpolation.h" |
41 #include "core/animation/animatable/AnimatableValue.h" | 41 #include "core/animation/animatable/AnimatableValue.h" |
42 #include "core/animation/css/CSSAnimatableValueFactory.h" | 42 #include "core/animation/css/CSSAnimatableValueFactory.h" |
43 #include "core/animation/css/CSSAnimations.h" | 43 #include "core/animation/css/CSSAnimations.h" |
44 #include "core/css/CSSCalculationValue.h" | 44 #include "core/css/CSSCalculationValue.h" |
45 #include "core/css/CSSCustomIdentValue.h" | 45 #include "core/css/CSSCustomIdentValue.h" |
46 #include "core/css/CSSDefaultStyleSheets.h" | 46 #include "core/css/CSSDefaultStyleSheets.h" |
47 #include "core/css/CSSFontSelector.h" | 47 #include "core/css/CSSFontSelector.h" |
48 #include "core/css/CSSKeyframeRule.h" | 48 #include "core/css/CSSKeyframeRule.h" |
49 #include "core/css/CSSKeyframesRule.h" | 49 #include "core/css/CSSKeyframesRule.h" |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 template <CSSPropertyPriority priority> | 1170 template <CSSPropertyPriority priority> |
1171 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Act
iveInterpolationsMap& activeInterpolationsMap) | 1171 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Act
iveInterpolationsMap& activeInterpolationsMap) |
1172 { | 1172 { |
1173 // TODO(alancutter): Don't apply presentation attribute animations here, | 1173 // TODO(alancutter): Don't apply presentation attribute animations here, |
1174 // they should instead apply in SVGElement::collectStyleForPresentationAttri
bute(). | 1174 // they should instead apply in SVGElement::collectStyleForPresentationAttri
bute(). |
1175 for (const auto& entry : activeInterpolationsMap) { | 1175 for (const auto& entry : activeInterpolationsMap) { |
1176 CSSPropertyID property = entry.key.isCSSProperty() ? entry.key.cssProper
ty() : entry.key.presentationAttribute(); | 1176 CSSPropertyID property = entry.key.isCSSProperty() ? entry.key.cssProper
ty() : entry.key.presentationAttribute(); |
1177 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property)) | 1177 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property)) |
1178 continue; | 1178 continue; |
1179 const Interpolation& interpolation = *entry.value.first(); | 1179 const Interpolation& interpolation = *entry.value.first(); |
1180 if (interpolation.isInvalidatableInterpolation()) { | 1180 if (interpolation.isStyleInterpolation()) { |
1181 InterpolationEnvironment environment(state); | |
1182 InvalidatableInterpolation::applyStack(entry.value, environment); | |
1183 } else { | |
1184 // TODO(alancutter): Remove this old code path once animations have
completely migrated to InterpolationTypes. | 1181 // TODO(alancutter): Remove this old code path once animations have
completely migrated to InterpolationTypes. |
1185 toStyleInterpolation(interpolation).apply(state); | 1182 toStyleInterpolation(interpolation).apply(state); |
| 1183 } else { |
| 1184 InterpolationEnvironment environment(state); |
| 1185 StackableInterpolation::applyStack(entry.value, environment); |
1186 } | 1186 } |
1187 } | 1187 } |
1188 } | 1188 } |
1189 | 1189 |
1190 static inline bool isValidCueStyleProperty(CSSPropertyID id) | 1190 static inline bool isValidCueStyleProperty(CSSPropertyID id) |
1191 { | 1191 { |
1192 switch (id) { | 1192 switch (id) { |
1193 case CSSPropertyBackground: | 1193 case CSSPropertyBackground: |
1194 case CSSPropertyBackgroundAttachment: | 1194 case CSSPropertyBackgroundAttachment: |
1195 case CSSPropertyBackgroundClip: | 1195 case CSSPropertyBackgroundClip: |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 visitor->trace(m_siblingRuleSet); | 1746 visitor->trace(m_siblingRuleSet); |
1747 visitor->trace(m_uncommonAttributeRuleSet); | 1747 visitor->trace(m_uncommonAttributeRuleSet); |
1748 visitor->trace(m_watchedSelectorsRules); | 1748 visitor->trace(m_watchedSelectorsRules); |
1749 visitor->trace(m_treeBoundaryCrossingScopes); | 1749 visitor->trace(m_treeBoundaryCrossingScopes); |
1750 visitor->trace(m_styleSharingLists); | 1750 visitor->trace(m_styleSharingLists); |
1751 visitor->trace(m_pendingStyleSheets); | 1751 visitor->trace(m_pendingStyleSheets); |
1752 visitor->trace(m_document); | 1752 visitor->trace(m_document); |
1753 } | 1753 } |
1754 | 1754 |
1755 } // namespace blink | 1755 } // namespace blink |
OLD | NEW |