| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 if (update && update->isCancelled(animation->player())) | 1250 if (update && update->isCancelled(animation->player())) |
| 1251 continue; | 1251 continue; |
| 1252 const AnimationEffect::CompositableValueMap* compositableValues = animat
ion->compositableValues(); | 1252 const AnimationEffect::CompositableValueMap* compositableValues = animat
ion->compositableValues(); |
| 1253 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos
itableValues->begin(); iter != compositableValues->end(); ++iter) { | 1253 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos
itableValues->begin(); iter != compositableValues->end(); ++iter) { |
| 1254 CSSPropertyID property = iter->key; | 1254 CSSPropertyID property = iter->key; |
| 1255 if (!isPropertyForPass<pass>(property)) | 1255 if (!isPropertyForPass<pass>(property)) |
| 1256 continue; | 1256 continue; |
| 1257 RELEASE_ASSERT_WITH_MESSAGE(!iter->value->dependsOnUnderlyingValue()
, "Not yet implemented: An interface for compositing onto the underlying value."
); | 1257 RELEASE_ASSERT_WITH_MESSAGE(!iter->value->dependsOnUnderlyingValue()
, "Not yet implemented: An interface for compositing onto the underlying value."
); |
| 1258 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto
(0); | 1258 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto
(0); |
| 1259 if (pass == HighPriorityProperties && property == CSSPropertyLineHei
ght) | 1259 if (pass == HighPriorityProperties && property == CSSPropertyLineHei
ght) |
| 1260 state.setLineHeightValue(toAnimatableNumber(animatableValue.get(
))->toCSSValue().get()); | 1260 state.setLineHeightValue(toAnimatableLength(animatableValue.get(
))->toCSSValue().get()); |
| 1261 else | 1261 else |
| 1262 AnimatedStyleBuilder::applyProperty(property, state, animatableV
alue.get()); | 1262 AnimatedStyleBuilder::applyProperty(property, state, animatableV
alue.get()); |
| 1263 didApply = true; | 1263 didApply = true; |
| 1264 } | 1264 } |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 if (!update) | 1267 if (!update) |
| 1268 return didApply; | 1268 return didApply; |
| 1269 | 1269 |
| 1270 // FIXME: Remove this repetition by incorporating a merge of newAnimations w
ith AnimationStack. | 1270 // FIXME: Remove this repetition by incorporating a merge of newAnimations w
ith AnimationStack. |
| 1271 // Then resolve the stack before calling applyAnimatedProperties, eg. | 1271 // Then resolve the stack before calling applyAnimatedProperties, eg. |
| 1272 // CompositableValueMap* resolved = timeline->animationStack()->resolveW
ith(newAnimations); | 1272 // CompositableValueMap* resolved = timeline->animationStack()->resolveW
ith(newAnimations); |
| 1273 // applyAnimatedProperties(state, resolved); | 1273 // applyAnimatedProperties(state, resolved); |
| 1274 const Vector<CSSAnimationUpdate::NewAnimation>& newAnimations = update->newA
nimations(); | 1274 const Vector<CSSAnimationUpdate::NewAnimation>& newAnimations = update->newA
nimations(); |
| 1275 for (size_t i = 0; i < newAnimations.size(); ++i) { | 1275 for (size_t i = 0; i < newAnimations.size(); ++i) { |
| 1276 const HashSet<RefPtr<InertAnimation> >& animations = newAnimations.at(i)
.animations; | 1276 const HashSet<RefPtr<InertAnimation> >& animations = newAnimations.at(i)
.animations; |
| 1277 for (HashSet<RefPtr<InertAnimation> >::const_iterator animationsIter = a
nimations.begin(); animationsIter != animations.end(); ++animationsIter) { | 1277 for (HashSet<RefPtr<InertAnimation> >::const_iterator animationsIter = a
nimations.begin(); animationsIter != animations.end(); ++animationsIter) { |
| 1278 OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = (
*animationsIter)->sample(); | 1278 OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = (
*animationsIter)->sample(); |
| 1279 if (!compositableValues) | 1279 if (!compositableValues) |
| 1280 continue; | 1280 continue; |
| 1281 for (AnimationEffect::CompositableValueMap::const_iterator iter = co
mpositableValues->begin(); iter != compositableValues->end(); ++iter) { | 1281 for (AnimationEffect::CompositableValueMap::const_iterator iter = co
mpositableValues->begin(); iter != compositableValues->end(); ++iter) { |
| 1282 CSSPropertyID property = iter->key; | 1282 CSSPropertyID property = iter->key; |
| 1283 if (!isPropertyForPass<pass>(property)) | 1283 if (!isPropertyForPass<pass>(property)) |
| 1284 continue; | 1284 continue; |
| 1285 RefPtr<AnimatableValue> animatableValue = iter->value->composite
Onto(AnimatableValue::neutralValue()); | 1285 RefPtr<AnimatableValue> animatableValue = iter->value->composite
Onto(AnimatableValue::neutralValue()); |
| 1286 if (pass == HighPriorityProperties && property == CSSPropertyLin
eHeight) | 1286 if (pass == HighPriorityProperties && property == CSSPropertyLin
eHeight) |
| 1287 state.setLineHeightValue(toAnimatableNumber(animatableValue.
get())->toCSSValue().get()); | 1287 state.setLineHeightValue(toAnimatableLength(animatableValue.
get())->toCSSValue().get()); |
| 1288 else | 1288 else |
| 1289 AnimatedStyleBuilder::applyProperty(property, state, animata
bleValue.get()); | 1289 AnimatedStyleBuilder::applyProperty(property, state, animata
bleValue.get()); |
| 1290 didApply = true; | 1290 didApply = true; |
| 1291 } | 1291 } |
| 1292 } | 1292 } |
| 1293 } | 1293 } |
| 1294 return didApply; | 1294 return didApply; |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule | 1297 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); | 1654 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); |
| 1655 | 1655 |
| 1656 fprintf(stderr, "Total:\n"); | 1656 fprintf(stderr, "Total:\n"); |
| 1657 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, | 1657 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, |
| 1658 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); | 1658 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); |
| 1659 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); | 1659 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); |
| 1660 } | 1660 } |
| 1661 #endif | 1661 #endif |
| 1662 | 1662 |
| 1663 } // namespace WebCore | 1663 } // namespace WebCore |
| OLD | NEW |