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 15 matching lines...) Expand all Loading... |
26 * Boston, MA 02110-1301, USA. | 26 * Boston, MA 02110-1301, USA. |
27 */ | 27 */ |
28 | 28 |
29 #include "config.h" | 29 #include "config.h" |
30 #include "core/css/resolver/StyleResolver.h" | 30 #include "core/css/resolver/StyleResolver.h" |
31 | 31 |
32 #include "CSSPropertyNames.h" | 32 #include "CSSPropertyNames.h" |
33 #include "HTMLNames.h" | 33 #include "HTMLNames.h" |
34 #include "RuntimeEnabledFeatures.h" | 34 #include "RuntimeEnabledFeatures.h" |
35 #include "StylePropertyShorthand.h" | 35 #include "StylePropertyShorthand.h" |
36 #include "core/animation/AnimatableNumber.h" | 36 #include "core/animation/AnimatableLength.h" |
37 #include "core/animation/AnimatableValue.h" | 37 #include "core/animation/AnimatableValue.h" |
38 #include "core/animation/Animation.h" | 38 #include "core/animation/Animation.h" |
39 #include "core/animation/DocumentTimeline.h" | 39 #include "core/animation/DocumentTimeline.h" |
40 #include "core/animation/css/CSSAnimatableValueFactory.h" | 40 #include "core/animation/css/CSSAnimatableValueFactory.h" |
41 #include "core/animation/css/CSSAnimations.h" | 41 #include "core/animation/css/CSSAnimations.h" |
42 #include "core/css/CSSCalculationValue.h" | 42 #include "core/css/CSSCalculationValue.h" |
43 #include "core/css/CSSDefaultStyleSheets.h" | 43 #include "core/css/CSSDefaultStyleSheets.h" |
44 #include "core/css/CSSFontSelector.h" | 44 #include "core/css/CSSFontSelector.h" |
45 #include "core/css/CSSKeyframeRule.h" | 45 #include "core/css/CSSKeyframeRule.h" |
46 #include "core/css/CSSKeyframesRule.h" | 46 #include "core/css/CSSKeyframesRule.h" |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 if (update && update->isCancelled(animation->player())) | 1197 if (update && update->isCancelled(animation->player())) |
1198 continue; | 1198 continue; |
1199 const AnimationEffect::CompositableValueMap* compositableValues = animat
ion->compositableValues(); | 1199 const AnimationEffect::CompositableValueMap* compositableValues = animat
ion->compositableValues(); |
1200 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos
itableValues->begin(); iter != compositableValues->end(); ++iter) { | 1200 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos
itableValues->begin(); iter != compositableValues->end(); ++iter) { |
1201 CSSPropertyID property = iter->key; | 1201 CSSPropertyID property = iter->key; |
1202 if (!isPropertyForPass<pass>(property)) | 1202 if (!isPropertyForPass<pass>(property)) |
1203 continue; | 1203 continue; |
1204 RELEASE_ASSERT_WITH_MESSAGE(!iter->value->dependsOnUnderlyingValue()
, "Not yet implemented: An interface for compositing onto the underlying value."
); | 1204 RELEASE_ASSERT_WITH_MESSAGE(!iter->value->dependsOnUnderlyingValue()
, "Not yet implemented: An interface for compositing onto the underlying value."
); |
1205 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto
(0); | 1205 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto
(0); |
1206 if (pass == HighPriorityProperties && property == CSSPropertyLineHei
ght) | 1206 if (pass == HighPriorityProperties && property == CSSPropertyLineHei
ght) |
1207 state.setLineHeightValue(toAnimatableNumber(animatableValue.get(
))->toCSSValue().get()); | 1207 state.setLineHeightValue(toAnimatableLength(animatableValue.get(
))->toCSSValue().get()); |
1208 else | 1208 else |
1209 AnimatedStyleBuilder::applyProperty(property, state, animatableV
alue.get()); | 1209 AnimatedStyleBuilder::applyProperty(property, state, animatableV
alue.get()); |
1210 didApply = true; | 1210 didApply = true; |
1211 } | 1211 } |
1212 } | 1212 } |
1213 | 1213 |
1214 if (!update) | 1214 if (!update) |
1215 return didApply; | 1215 return didApply; |
1216 | 1216 |
1217 // FIXME: Remove this repetition by incorporating a merge of newAnimations w
ith AnimationStack. | 1217 // FIXME: Remove this repetition by incorporating a merge of newAnimations w
ith AnimationStack. |
1218 // Then resolve the stack before calling applyAnimatedProperties, eg. | 1218 // Then resolve the stack before calling applyAnimatedProperties, eg. |
1219 // CompositableValueMap* resolved = timeline->animationStack()->resolveW
ith(newAnimations); | 1219 // CompositableValueMap* resolved = timeline->animationStack()->resolveW
ith(newAnimations); |
1220 // applyAnimatedProperties(state, resolved); | 1220 // applyAnimatedProperties(state, resolved); |
1221 const Vector<CSSAnimationUpdate::NewAnimation>& newAnimations = update->newA
nimations(); | 1221 const Vector<CSSAnimationUpdate::NewAnimation>& newAnimations = update->newA
nimations(); |
1222 for (size_t i = 0; i < newAnimations.size(); ++i) { | 1222 for (size_t i = 0; i < newAnimations.size(); ++i) { |
1223 const HashSet<RefPtr<InertAnimation> >& animations = newAnimations.at(i)
.animations; | 1223 const HashSet<RefPtr<InertAnimation> >& animations = newAnimations.at(i)
.animations; |
1224 for (HashSet<RefPtr<InertAnimation> >::const_iterator animationsIter = a
nimations.begin(); animationsIter != animations.end(); ++animationsIter) { | 1224 for (HashSet<RefPtr<InertAnimation> >::const_iterator animationsIter = a
nimations.begin(); animationsIter != animations.end(); ++animationsIter) { |
1225 OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = (
*animationsIter)->sample(); | 1225 OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = (
*animationsIter)->sample(); |
1226 if (!compositableValues) | 1226 if (!compositableValues) |
1227 continue; | 1227 continue; |
1228 for (AnimationEffect::CompositableValueMap::const_iterator iter = co
mpositableValues->begin(); iter != compositableValues->end(); ++iter) { | 1228 for (AnimationEffect::CompositableValueMap::const_iterator iter = co
mpositableValues->begin(); iter != compositableValues->end(); ++iter) { |
1229 CSSPropertyID property = iter->key; | 1229 CSSPropertyID property = iter->key; |
1230 if (!isPropertyForPass<pass>(property)) | 1230 if (!isPropertyForPass<pass>(property)) |
1231 continue; | 1231 continue; |
1232 RefPtr<AnimatableValue> animatableValue = iter->value->composite
Onto(AnimatableValue::neutralValue()); | 1232 RefPtr<AnimatableValue> animatableValue = iter->value->composite
Onto(AnimatableValue::neutralValue()); |
1233 if (pass == HighPriorityProperties && property == CSSPropertyLin
eHeight) | 1233 if (pass == HighPriorityProperties && property == CSSPropertyLin
eHeight) |
1234 state.setLineHeightValue(toAnimatableNumber(animatableValue.
get())->toCSSValue().get()); | 1234 state.setLineHeightValue(toAnimatableLength(animatableValue.
get())->toCSSValue().get()); |
1235 else | 1235 else |
1236 AnimatedStyleBuilder::applyProperty(property, state, animata
bleValue.get()); | 1236 AnimatedStyleBuilder::applyProperty(property, state, animata
bleValue.get()); |
1237 didApply = true; | 1237 didApply = true; |
1238 } | 1238 } |
1239 } | 1239 } |
1240 } | 1240 } |
1241 return didApply; | 1241 return didApply; |
1242 } | 1242 } |
1243 | 1243 |
1244 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule | 1244 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); | 1605 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); |
1606 | 1606 |
1607 fprintf(stderr, "Total:\n"); | 1607 fprintf(stderr, "Total:\n"); |
1608 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, | 1608 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, |
1609 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); | 1609 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); |
1610 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); | 1610 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); |
1611 } | 1611 } |
1612 #endif | 1612 #endif |
1613 | 1613 |
1614 } // namespace WebCore | 1614 } // namespace WebCore |
OLD | NEW |