| 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 "core/animation/StringKeyframe.h" | 5 #include "core/animation/StringKeyframe.h" |
| 6 | 6 |
| 7 #include "core/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
| 8 #include "core/animation/css/CSSAnimations.h" | 8 #include "core/animation/css/CSSAnimations.h" |
| 9 #include "core/css/CSSCustomPropertyDeclaration.h" | 9 #include "core/css/CSSCustomPropertyDeclaration.h" |
| 10 #include "core/css/CSSPropertyMetadata.h" | 10 #include "core/css/CSSPropertyMetadata.h" |
| 11 #include "core/css/resolver/StyleResolver.h" | 11 #include "core/css/resolver/StyleResolver.h" |
| 12 #include "core/style/ComputedStyle.h" | 12 #include "core/style/ComputedStyle.h" |
| 13 #include "core/svg/SVGElement.h" | 13 #include "core/svg/SVGElement.h" |
| 14 #include "platform/RuntimeEnabledFeatures.h" | 14 #include "platform/RuntimeEnabledFeatures.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 StringKeyframe::StringKeyframe(const StringKeyframe& copyFrom) | 18 StringKeyframe::StringKeyframe(const StringKeyframe& copyFrom) |
| 19 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing), | 19 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing), |
| 20 m_cssPropertyMap(copyFrom.m_cssPropertyMap->mutableCopy()), | 20 m_cssPropertyMap(copyFrom.m_cssPropertyMap->mutableCopy()), |
| 21 m_presentationAttributeMap( | 21 m_presentationAttributeMap( |
| 22 copyFrom.m_presentationAttributeMap->mutableCopy()), | 22 copyFrom.m_presentationAttributeMap->mutableCopy()), |
| 23 m_svgAttributeMap(copyFrom.m_svgAttributeMap) {} | 23 m_svgAttributeMap(copyFrom.m_svgAttributeMap) {} |
| 24 | 24 |
| 25 MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue( | 25 MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue( |
| 26 const AtomicString& propertyName, | 26 const AtomicString& propertyName, |
| 27 const PropertyRegistry* registry, |
| 27 const String& value, | 28 const String& value, |
| 28 StyleSheetContents* styleSheetContents) { | 29 StyleSheetContents* styleSheetContents) { |
| 29 bool isAnimationTainted = true; | 30 bool isAnimationTainted = true; |
| 30 return m_cssPropertyMap->setProperty(propertyName, value, false, | 31 return m_cssPropertyMap->setProperty(propertyName, registry, value, false, |
| 31 styleSheetContents, isAnimationTainted); | 32 styleSheetContents, isAnimationTainted); |
| 32 } | 33 } |
| 33 | 34 |
| 34 MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue( | 35 MutableStylePropertySet::SetResult StringKeyframe::setCSSPropertyValue( |
| 35 CSSPropertyID property, | 36 CSSPropertyID property, |
| 36 const String& value, | 37 const String& value, |
| 37 StyleSheetContents* styleSheetContents) { | 38 StyleSheetContents* styleSheetContents) { |
| 38 DCHECK_NE(property, CSSPropertyInvalid); | 39 DCHECK_NE(property, CSSPropertyInvalid); |
| 39 if (CSSAnimations::isAnimationAffectingProperty(property)) { | 40 if (CSSAnimations::isAnimationAffectingProperty(property)) { |
| 40 bool didParse = true; | 41 bool didParse = true; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 149 } |
| 149 | 150 |
| 150 PassRefPtr<Keyframe::PropertySpecificKeyframe> | 151 PassRefPtr<Keyframe::PropertySpecificKeyframe> |
| 151 SVGPropertySpecificKeyframe::neutralKeyframe( | 152 SVGPropertySpecificKeyframe::neutralKeyframe( |
| 152 double offset, | 153 double offset, |
| 153 PassRefPtr<TimingFunction> easing) const { | 154 PassRefPtr<TimingFunction> easing) const { |
| 154 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd); | 155 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd); |
| 155 } | 156 } |
| 156 | 157 |
| 157 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |