OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 ElementAnimations::ElementAnimations() | 38 ElementAnimations::ElementAnimations() |
39 : m_animationStyleChange(false) | 39 : m_animationStyleChange(false) |
40 { | 40 { |
41 } | 41 } |
42 | 42 |
43 ElementAnimations::~ElementAnimations() | 43 ElementAnimations::~ElementAnimations() |
44 { | 44 { |
| 45 } |
| 46 |
| 47 void ElementAnimations::dispose() |
| 48 { |
45 #if !ENABLE(OILPAN) | 49 #if !ENABLE(OILPAN) |
46 for (KeyframeEffect* effect : m_effects) | 50 for (KeyframeEffect* effect : m_effects) |
47 effect->notifyElementDestroyed(); | 51 effect->notifyElementDestroyed(); |
48 m_effects.clear(); | 52 m_effects.clear(); |
49 #endif | 53 #endif |
50 } | 54 } |
51 | 55 |
52 void ElementAnimations::updateAnimationFlags(ComputedStyle& style) | 56 void ElementAnimations::updateAnimationFlags(ComputedStyle& style) |
53 { | 57 { |
54 for (const auto& entry : m_animations) { | 58 for (const auto& entry : m_animations) { |
(...skipping 21 matching lines...) Expand all Loading... |
76 } | 80 } |
77 | 81 |
78 void ElementAnimations::restartAnimationOnCompositor() | 82 void ElementAnimations::restartAnimationOnCompositor() |
79 { | 83 { |
80 for (const auto& entry : m_animations) | 84 for (const auto& entry : m_animations) |
81 entry.key->restartAnimationOnCompositor(); | 85 entry.key->restartAnimationOnCompositor(); |
82 } | 86 } |
83 | 87 |
84 DEFINE_TRACE(ElementAnimations) | 88 DEFINE_TRACE(ElementAnimations) |
85 { | 89 { |
86 #if ENABLE(OILPAN) | |
87 visitor->trace(m_cssAnimations); | 90 visitor->trace(m_cssAnimations); |
88 visitor->trace(m_defaultStack); | 91 visitor->trace(m_defaultStack); |
| 92 #if ENABLE(OILPAN) |
89 visitor->trace(m_animations); | 93 visitor->trace(m_animations); |
90 #endif | 94 #endif |
| 95 #if !ENABLE(OILPAN) |
| 96 visitor->trace(m_effects); |
| 97 #endif |
91 } | 98 } |
92 | 99 |
93 const ComputedStyle* ElementAnimations::baseComputedStyle() const | 100 const ComputedStyle* ElementAnimations::baseComputedStyle() const |
94 { | 101 { |
95 #if !ENABLE(ASSERT) | 102 #if !ENABLE(ASSERT) |
96 if (isAnimationStyleChange()) | 103 if (isAnimationStyleChange()) |
97 return m_baseComputedStyle.get(); | 104 return m_baseComputedStyle.get(); |
98 #endif | 105 #endif |
99 return nullptr; | 106 return nullptr; |
100 } | 107 } |
(...skipping 21 matching lines...) Expand all Loading... |
122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing | 129 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing |
123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache | 130 // a style recalc (see crbug.com/471079). ComputedStyle objects created with
different cache |
124 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence | 131 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence |
125 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for | 132 // ComputedStyle::operator== will return false. We avoid using baseComputedS
tyle (the check for |
126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT | 133 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com
parison ASSERT |
127 // in updateBaseComputedStyle. | 134 // in updateBaseComputedStyle. |
128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); | 135 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl
e->font().isFallbackValid()); |
129 } | 136 } |
130 | 137 |
131 } // namespace blink | 138 } // namespace blink |
OLD | NEW |