| 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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 | 1076 |
| 1077 if (!(animatingElement && animatingElement->hasActiveAnimations()) | 1077 if (!(animatingElement && animatingElement->hasActiveAnimations()) |
| 1078 && !(state.style()->transitions() && !state.style()->transitions()->isEm
pty()) | 1078 && !(state.style()->transitions() && !state.style()->transitions()->isEm
pty()) |
| 1079 && !(state.style()->animations() && !state.style()->animations()->isEmpt
y())) | 1079 && !(state.style()->animations() && !state.style()->animations()->isEmpt
y())) |
| 1080 return; | 1080 return; |
| 1081 | 1081 |
| 1082 state.setAnimationUpdate(CSSAnimations::calculateUpdate(animatingElement, *e
lement, *state.style(), state.parentStyle(), this)); | 1082 state.setAnimationUpdate(CSSAnimations::calculateUpdate(animatingElement, *e
lement, *state.style(), state.parentStyle(), this)); |
| 1083 if (!state.animationUpdate()) | 1083 if (!state.animationUpdate()) |
| 1084 return; | 1084 return; |
| 1085 | 1085 |
| 1086 const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsFo
rAnimations = state.animationUpdate()->activeInterpolationsForAnimations(); | 1086 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >&
activeInterpolationsForAnimations = state.animationUpdate()->activeInterpolation
sForAnimations(); |
| 1087 const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsFo
rTransitions = state.animationUpdate()->activeInterpolationsForTransitions(); | 1087 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >&
activeInterpolationsForTransitions = state.animationUpdate()->activeInterpolatio
nsForTransitions(); |
| 1088 applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsF
orAnimations); | 1088 applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsF
orAnimations); |
| 1089 applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsF
orTransitions); | 1089 applyAnimatedProperties<HighPriorityProperties>(state, activeInterpolationsF
orTransitions); |
| 1090 applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsFo
rAnimations); | 1090 applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsFo
rAnimations); |
| 1091 applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsFo
rTransitions); | 1091 applyAnimatedProperties<LowPriorityProperties>(state, activeInterpolationsFo
rTransitions); |
| 1092 | 1092 |
| 1093 // If the animations/transitions change opacity or transform, we need to upd
ate | 1093 // If the animations/transitions change opacity or transform, we need to upd
ate |
| 1094 // the style to impose the stacking rules. Note that this is also | 1094 // the style to impose the stacking rules. Note that this is also |
| 1095 // done in StyleResolver::adjustRenderStyle(). | 1095 // done in StyleResolver::adjustRenderStyle(). |
| 1096 RenderStyle* style = state.style(); | 1096 RenderStyle* style = state.style(); |
| 1097 if (style->hasAutoZIndex() && (style->opacity() < 1.0f || style->hasTransfor
m())) | 1097 if (style->hasAutoZIndex() && (style->opacity() < 1.0f || style->hasTransfor
m())) |
| 1098 style->setZIndex(0); | 1098 style->setZIndex(0); |
| 1099 | 1099 |
| 1100 // Start loading resources used by animations. | 1100 // Start loading resources used by animations. |
| 1101 loadPendingResources(state); | 1101 loadPendingResources(state); |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 template <StyleResolver::StyleApplicationPass pass> | 1104 template <StyleResolver::StyleApplicationPass pass> |
| 1105 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Has
hMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolations) | 1105 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Wil
lBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >& activeInterpo
lations) |
| 1106 { | 1106 { |
| 1107 ASSERT(pass != AnimationProperties); | 1107 ASSERT(pass != AnimationProperties); |
| 1108 | 1108 |
| 1109 for (HashMap<CSSPropertyID, RefPtr<Interpolation> >::const_iterator iter = a
ctiveInterpolations.begin(); iter != activeInterpolations.end(); ++iter) { | 1109 for (WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >::c
onst_iterator iter = activeInterpolations.begin(); iter != activeInterpolations.
end(); ++iter) { |
| 1110 CSSPropertyID property = iter->key; | 1110 CSSPropertyID property = iter->key; |
| 1111 if (!isPropertyForPass<pass>(property)) | 1111 if (!isPropertyForPass<pass>(property)) |
| 1112 continue; | 1112 continue; |
| 1113 const StyleInterpolation *interpolation = toStyleInterpolation(iter->val
ue.get()); | 1113 const StyleInterpolation *interpolation = toStyleInterpolation(iter->val
ue.get()); |
| 1114 interpolation->apply(state); | 1114 interpolation->apply(state); |
| 1115 } | 1115 } |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 static inline bool isValidCueStyleProperty(CSSPropertyID id) | 1118 static inline bool isValidCueStyleProperty(CSSPropertyID id) |
| 1119 { | 1119 { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 bool StyleResolver::mediaQueryAffectedByViewportChange() const | 1419 bool StyleResolver::mediaQueryAffectedByViewportChange() const |
| 1420 { | 1420 { |
| 1421 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 1421 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
| 1422 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) | 1422 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) |
| 1423 return true; | 1423 return true; |
| 1424 } | 1424 } |
| 1425 return false; | 1425 return false; |
| 1426 } | 1426 } |
| 1427 | 1427 |
| 1428 } // namespace WebCore | 1428 } // namespace WebCore |
| OLD | NEW |