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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 | 919 |
920 // The animating element may be this element, or its pseudo element. It is | 920 // The animating element may be this element, or its pseudo element. It is |
921 // null when calculating the style for a potential pseudo element that has | 921 // null when calculating the style for a potential pseudo element that has |
922 // yet to be created. | 922 // yet to be created. |
923 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); | 923 ASSERT(animatingElement == element || !animatingElement || animatingElement-
>parentOrShadowHostElement() == element); |
924 | 924 |
925 if (!(animatingElement && animatingElement->hasAnimations()) | 925 if (!(animatingElement && animatingElement->hasAnimations()) |
926 && !state.style()->transitions() && !state.style()->animations()) | 926 && !state.style()->transitions() && !state.style()->animations()) |
927 return false; | 927 return false; |
928 | 928 |
929 state.setAnimationUpdate(CSSAnimations::calculateUpdate(animatingElement, *e
lement, *state.style(), state.parentStyle(), this)); | 929 CSSAnimations::calculateUpdate(animatingElement, *element, *state.style(), s
tate.parentStyle(), state.animationUpdate(), this); |
930 if (!state.animationUpdate()) | 930 if (state.animationUpdate().isEmpty()) |
931 return false; | 931 return false; |
932 | 932 |
933 const ActiveInterpolationMap& activeInterpolationsForAnimations = state.anim
ationUpdate()->activeInterpolationsForAnimations(); | 933 const ActiveInterpolationMap& activeInterpolationsForAnimations = state.anim
ationUpdate().activeInterpolationsForAnimations(); |
934 const ActiveInterpolationMap& activeInterpolationsForTransitions = state.ani
mationUpdate()->activeInterpolationsForTransitions(); | 934 const ActiveInterpolationMap& activeInterpolationsForTransitions = state.ani
mationUpdate().activeInterpolationsForTransitions(); |
935 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Animations); | 935 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Animations); |
936 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Transitions); | 936 applyAnimatedProperties<HighPropertyPriority>(state, activeInterpolationsFor
Transitions); |
937 | 937 |
938 updateFont(state); | 938 updateFont(state); |
939 | 939 |
940 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForA
nimations); | 940 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForA
nimations); |
941 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForT
ransitions); | 941 applyAnimatedProperties<LowPropertyPriority>(state, activeInterpolationsForT
ransitions); |
942 | 942 |
943 // Start loading resources used by animations. | 943 // Start loading resources used by animations. |
944 loadPendingResources(state); | 944 loadPendingResources(state); |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 visitor->trace(m_watchedSelectorsRules); | 1447 visitor->trace(m_watchedSelectorsRules); |
1448 visitor->trace(m_treeBoundaryCrossingRules); | 1448 visitor->trace(m_treeBoundaryCrossingRules); |
1449 visitor->trace(m_styleResourceLoader); | 1449 visitor->trace(m_styleResourceLoader); |
1450 visitor->trace(m_styleSharingLists); | 1450 visitor->trace(m_styleSharingLists); |
1451 visitor->trace(m_pendingStyleSheets); | 1451 visitor->trace(m_pendingStyleSheets); |
1452 visitor->trace(m_document); | 1452 visitor->trace(m_document); |
1453 #endif | 1453 #endif |
1454 } | 1454 } |
1455 | 1455 |
1456 } // namespace blink | 1456 } // namespace blink |
OLD | NEW |