Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: Source/core/animation/StringKeyframe.cpp

Issue 1196163003: Fix animations not starting on detached elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test tweaks Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "core/animation/StringKeyframe.h" 6 #include "core/animation/StringKeyframe.h"
7 7
8 #include "core/animation/AngleSVGInterpolation.h" 8 #include "core/animation/AngleSVGInterpolation.h"
9 #include "core/animation/ColorStyleInterpolation.h" 9 #include "core/animation/ColorStyleInterpolation.h"
10 #include "core/animation/CompositorAnimations.h" 10 #include "core/animation/CompositorAnimations.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 StringKeyframe::CSSPropertySpecificKeyframe::CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, CSSValue* value) 111 StringKeyframe::CSSPropertySpecificKeyframe::CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, CSSValue* value)
112 : Keyframe::PropertySpecificKeyframe(offset, easing, EffectModel::CompositeR eplace) 112 : Keyframe::PropertySpecificKeyframe(offset, easing, EffectModel::CompositeR eplace)
113 , m_value(value) 113 , m_value(value)
114 { 114 {
115 ASSERT(!isNull(m_offset)); 115 ASSERT(!isNull(m_offset));
116 } 116 }
117 117
118 void StringKeyframe::CSSPropertySpecificKeyframe::populateAnimatableValue(CSSPro pertyID property, Element& element, const ComputedStyle* baseStyle) const 118 void StringKeyframe::CSSPropertySpecificKeyframe::populateAnimatableValue(CSSPro pertyID property, Element& element, const ComputedStyle* baseStyle) const
119 { 119 {
120 if (!m_animatableValueCache && (baseStyle || !m_value->isInheritedValue())) 120 if (!m_animatableValueCache && (baseStyle || !DeferredLegacyStyleInterpolati on::interpolationRequiresStyleResolve(*m_value)))
121 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(el ement, baseStyle, property, m_value.get()); 121 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(el ement, baseStyle, property, m_value.get());
122 } 122 }
123 123
124 namespace { 124 namespace {
125 InterpolationRange setRange(CSSPropertyID id) 125 InterpolationRange setRange(CSSPropertyID id)
126 { 126 {
127 switch (id) { 127 switch (id) {
128 case CSSPropertyOrphans: 128 case CSSPropertyOrphans:
129 case CSSPropertyWebkitColumnCount: 129 case CSSPropertyWebkitColumnCount:
130 case CSSPropertyWidows: 130 case CSSPropertyWidows:
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
551 551
552 if (!fromValue || !toValue) 552 if (!fromValue || !toValue)
553 return nullptr; 553 return nullptr;
554 554
555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
556 } 556 }
557 557
558 } // namespace blink 558 } // namespace blink
OLDNEW
« Source/core/animation/EffectInput.cpp ('K') | « Source/core/animation/EffectInput.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698