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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #include "wtf/StdLibExtras.h" | 88 #include "wtf/StdLibExtras.h" |
89 | 89 |
90 namespace { | 90 namespace { |
91 | 91 |
92 using namespace blink; | 92 using namespace blink; |
93 | 93 |
94 void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element) | 94 void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element) |
95 { | 95 { |
96 // If any changes to CSS Animations were detected, stash the update away for
application after the | 96 // If any changes to CSS Animations were detected, stash the update away for
application after the |
97 // layout object is updated if we're in the appropriate scope. | 97 // layout object is updated if we're in the appropriate scope. |
98 if (state.animationUpdate()) | 98 if (!state.animationUpdate().isEmpty()) |
99 element.ensureElementAnimations().cssAnimations().setPendingUpdate(state
.takeAnimationUpdate()); | 99 element.ensureElementAnimations().cssAnimations().setPendingUpdate(state
.animationUpdate()); |
100 } | 100 } |
101 | 101 |
102 } // namespace | 102 } // namespace |
103 | 103 |
104 namespace blink { | 104 namespace blink { |
105 | 105 |
106 using namespace HTMLNames; | 106 using namespace HTMLNames; |
107 | 107 |
108 ComputedStyle* StyleResolver::s_styleNotYetAvailable; | 108 ComputedStyle* StyleResolver::s_styleNotYetAvailable; |
109 | 109 |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 914 |
915 // The animating element may be this element, or its pseudo element. It is | 915 // The animating element may be this element, or its pseudo element. It is |
916 // null when calculating the style for a potential pseudo element that has | 916 // null when calculating the style for a potential pseudo element that has |
917 // yet to be created. | 917 // yet to be created. |
918 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); | 918 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); |
919 | 919 |
920 if (!(animatingElement && animatingElement->hasAnimations()) | 920 if (!(animatingElement && animatingElement->hasAnimations()) |
921 && !state.style()->transitions() && !state.style()->animations()) | 921 && !state.style()->transitions() && !state.style()->animations()) |
922 return false; | 922 return false; |
923 | 923 |
924 state.setAnimationUpdate(CSSAnimations::calculateUpdate(animatingElement, *e
lement, *state.style(), state.parentStyle(), this)); | 924 CSSAnimations::calculateUpdate(animatingElement, *element, state, this); |
925 if (!state.animationUpdate()) | 925 if (state.animationUpdate().isEmpty()) |
926 return false; | 926 return false; |
927 | 927 |
928 const ActiveInterpolationMap& activeInterpolationsForAnimations = state.anim
ationUpdate()->activeInterpolationsForAnimations(); | 928 const ActiveInterpolationMap& activeInterpolationsForAnimations = state.anim
ationUpdate().activeInterpolationsForAnimations(); |
929 const ActiveInterpolationMap& activeInterpolationsForTransitions = state.ani
mationUpdate()->activeInterpolationsForTransitions(); | 929 const ActiveInterpolationMap& activeInterpolationsForTransitions = state.ani
mationUpdate().activeInterpolationsForTransitions(); |
930 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Animations); | 930 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Animations); |
931 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Transitions); | 931 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Transitions); |
932 | 932 |
933 updateFont(state); | 933 updateFont(state); |
934 | 934 |
935 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForA
nimations); | 935 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForA
nimations); |
936 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForT
ransitions); | 936 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForT
ransitions); |
937 | 937 |
938 // Start loading resources used by animations. | 938 // Start loading resources used by animations. |
939 loadPendingResources(state); | 939 loadPendingResources(state); |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 visitor->trace(m_watchedSelectorsRules); | 1442 visitor->trace(m_watchedSelectorsRules); |
1443 visitor->trace(m_treeBoundaryCrossingRules); | 1443 visitor->trace(m_treeBoundaryCrossingRules); |
1444 visitor->trace(m_styleResourceLoader); | 1444 visitor->trace(m_styleResourceLoader); |
1445 visitor->trace(m_styleSharingLists); | 1445 visitor->trace(m_styleSharingLists); |
1446 visitor->trace(m_pendingStyleSheets); | 1446 visitor->trace(m_pendingStyleSheets); |
1447 visitor->trace(m_document); | 1447 visitor->trace(m_document); |
1448 #endif | 1448 #endif |
1449 } | 1449 } |
1450 | 1450 |
1451 } // namespace blink | 1451 } // namespace blink |
OLD | NEW |