OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "core/inspector/InspectorAnimationAgent.h" | 7 #include "core/inspector/InspectorAnimationAgent.h" |
8 | 8 |
9 #include "core/animation/Animation.h" | 9 #include "core/animation/Animation.h" |
10 #include "core/animation/AnimationEffect.h" | 10 #include "core/animation/AnimationEffect.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 static PassRefPtr<TypeBuilder::Animation::KeyframesRule> buildObjectForKeyframes
Rule(const AnimationPlayer& player) | 167 static PassRefPtr<TypeBuilder::Animation::KeyframesRule> buildObjectForKeyframes
Rule(const AnimationPlayer& player) |
168 { | 168 { |
169 const Element* element = toAnimation(player.source())->target(); | 169 const Element* element = toAnimation(player.source())->target(); |
170 StyleResolver& styleResolver = element->ownerDocument()->ensureStyleResolver
(); | 170 StyleResolver& styleResolver = element->ownerDocument()->ensureStyleResolver
(); |
171 CSSAnimations& cssAnimations = element->activeAnimations()->cssAnimations(); | 171 CSSAnimations& cssAnimations = element->activeAnimations()->cssAnimations(); |
172 const AtomicString animationName = cssAnimations.getAnimationNameForInspecto
r(player); | 172 const AtomicString animationName = cssAnimations.getAnimationNameForInspecto
r(player); |
173 RefPtr<TypeBuilder::Animation::KeyframesRule> keyframeRule; | 173 RefPtr<TypeBuilder::Animation::KeyframesRule> keyframeRule; |
174 | 174 |
175 if (!animationName.isNull()) { | 175 if (!animationName.isNull()) { |
176 // CSS Animations | 176 // CSS Animations |
177 const StyleRuleKeyframes* keyframes = styleResolver.findKeyframesRule(el
ement, animationName); | 177 const StyleRuleKeyframes* keyframes = styleResolver.findKeyframesRule(el
ement, animationName).get(); |
178 keyframeRule = buildObjectForStyleRuleKeyframes(keyframes); | 178 keyframeRule = buildObjectForStyleRuleKeyframes(keyframes); |
179 } else { | 179 } else { |
180 // Web Animations | 180 // Web Animations |
181 keyframeRule = buildObjectForAnimationKeyframes(toAnimation(player.sourc
e())); | 181 keyframeRule = buildObjectForAnimationKeyframes(toAnimation(player.sourc
e())); |
182 } | 182 } |
183 | 183 |
184 return keyframeRule; | 184 return keyframeRule; |
185 } | 185 } |
186 | 186 |
187 PassRefPtr<TypeBuilder::Array<TypeBuilder::Animation::AnimationPlayer> > Inspect
orAnimationAgent::buildArrayForAnimationPlayers(Element& element, const WillBeHe
apVector<RefPtrWillBeMember<AnimationPlayer> > players) | 187 PassRefPtr<TypeBuilder::Array<TypeBuilder::Animation::AnimationPlayer> > Inspect
orAnimationAgent::buildArrayForAnimationPlayers(Element& element, const WillBeHe
apVector<RefPtrWillBeMember<AnimationPlayer> > players) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 { | 294 { |
295 #if ENABLE(OILPAN) | 295 #if ENABLE(OILPAN) |
296 visitor->trace(m_idToAnimationPlayer); | 296 visitor->trace(m_idToAnimationPlayer); |
297 visitor->trace(m_domAgent); | 297 visitor->trace(m_domAgent); |
298 visitor->trace(m_element); | 298 visitor->trace(m_element); |
299 #endif | 299 #endif |
300 InspectorBaseAgent::trace(visitor); | 300 InspectorBaseAgent::trace(visitor); |
301 } | 301 } |
302 | 302 |
303 } | 303 } |
OLD | NEW |