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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 Animation& animation = *runningAnimation->animation; | 234 Animation& animation = *runningAnimation->animation; |
235 if (animation.effect() && animation.effect()->isKeyframeEffect()) { | 235 if (animation.effect() && animation.effect()->isKeyframeEffect()) { |
236 EffectModel* model = toKeyframeEffect(animation.effect())->model(); | 236 EffectModel* model = toKeyframeEffect(animation.effect())->model(); |
237 if (model && model->isKeyframeEffectModel()) { | 237 if (model && model->isKeyframeEffectModel()) { |
238 KeyframeEffectModelBase* keyframeEffect = toKeyframeEffectModelB ase(model); | 238 KeyframeEffectModelBase* keyframeEffect = toKeyframeEffectModelB ase(model); |
239 if (keyframeEffect->hasSyntheticKeyframes() && keyframeEffect->s napshotNeutralCompositorKeyframes(element, oldStyle, style)) | 239 if (keyframeEffect->hasSyntheticKeyframes() && keyframeEffect->s napshotNeutralCompositorKeyframes(element, oldStyle, style)) |
240 update.updateCompositorKeyframes(&animation); | 240 update.updateCompositorKeyframes(&animation); |
241 } | 241 } |
242 } | 242 } |
243 } | 243 } |
244 | |
245 if (oldStyle.effectiveZoom() != style.effectiveZoom()) { | |
dstockwell
2015/09/17 04:07:13
early out if !oldStyle.isRunningTransformAnimation
alancutter (OOO until 2018)
2015/09/17 04:21:45
Done. Added early out of entire function for when
| |
246 for (auto& entry : elementAnimations->animations()) { | |
247 Animation& animation = *entry.key; | |
248 if (animation.effect() && animation.effect()->isKeyframeEffect()) { | |
249 EffectModel* model = toKeyframeEffect(animation.effect())->model (); | |
250 if (model && model->isKeyframeEffectModel()) { | |
251 KeyframeEffectModelBase* keyframeEffect = toKeyframeEffectMo delBase(model); | |
252 if (keyframeEffect->affects(PropertyHandle(CSSPropertyTransf orm)) && keyframeEffect->snapshotAllCompositorKeyframes(element, &style)) | |
253 update.updateCompositorKeyframes(&animation); | |
254 } | |
255 } | |
256 } | |
257 } | |
244 } | 258 } |
245 | 259 |
246 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update, const E lement* animatingElement, Element& element, const ComputedStyle& style, Computed Style* parentStyle, StyleResolver* resolver) | 260 void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update, const E lement* animatingElement, Element& element, const ComputedStyle& style, Computed Style* parentStyle, StyleResolver* resolver) |
247 { | 261 { |
248 const ElementAnimations* elementAnimations = animatingElement ? animatingEle ment->elementAnimations() : nullptr; | 262 const ElementAnimations* elementAnimations = animatingElement ? animatingEle ment->elementAnimations() : nullptr; |
249 | 263 |
250 bool isAnimationStyleChange = elementAnimations && elementAnimations->isAnim ationStyleChange(); | 264 bool isAnimationStyleChange = elementAnimations && elementAnimations->isAnim ationStyleChange(); |
251 | 265 |
252 #if !ENABLE(ASSERT) | 266 #if !ENABLE(ASSERT) |
253 // If we're in an animation style change, no animations can have started, be en cancelled or changed play state. | 267 // If we're in an animation style change, no animations can have started, be en cancelled or changed play state. |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 } | 810 } |
797 | 811 |
798 DEFINE_TRACE(CSSAnimations) | 812 DEFINE_TRACE(CSSAnimations) |
799 { | 813 { |
800 visitor->trace(m_transitions); | 814 visitor->trace(m_transitions); |
801 visitor->trace(m_pendingUpdate); | 815 visitor->trace(m_pendingUpdate); |
802 visitor->trace(m_animations); | 816 visitor->trace(m_animations); |
803 } | 817 } |
804 | 818 |
805 } // namespace blink | 819 } // namespace blink |
OLD | NEW |