| 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" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // This is not used in time-critical code, so we probably don't need to | 72 // This is not used in time-critical code, so we probably don't need to |
| 73 // worry about caching this result. | 73 // worry about caching this result. |
| 74 PropertyHandleSet properties; | 74 PropertyHandleSet properties; |
| 75 for (unsigned i = 0; i < m_cssPropertyMap->propertyCount(); ++i) { | 75 for (unsigned i = 0; i < m_cssPropertyMap->propertyCount(); ++i) { |
| 76 StylePropertySet::PropertyReference propertyReference = | 76 StylePropertySet::PropertyReference propertyReference = |
| 77 m_cssPropertyMap->propertyAt(i); | 77 m_cssPropertyMap->propertyAt(i); |
| 78 DCHECK(!isShorthandProperty(propertyReference.id())) | 78 DCHECK(!isShorthandProperty(propertyReference.id())) |
| 79 << "Web Animations: Encountered unexpanded shorthand CSS property (" | 79 << "Web Animations: Encountered unexpanded shorthand CSS property (" |
| 80 << propertyReference.id() << ")."; | 80 << propertyReference.id() << ")."; |
| 81 if (propertyReference.id() == CSSPropertyVariable) | 81 if (propertyReference.id() == CSSPropertyVariable) |
| 82 properties.add(PropertyHandle( | 82 properties.insert(PropertyHandle( |
| 83 toCSSCustomPropertyDeclaration(propertyReference.value()).name())); | 83 toCSSCustomPropertyDeclaration(propertyReference.value()).name())); |
| 84 else | 84 else |
| 85 properties.add(PropertyHandle(propertyReference.id(), false)); | 85 properties.insert(PropertyHandle(propertyReference.id(), false)); |
| 86 } | 86 } |
| 87 | 87 |
| 88 for (unsigned i = 0; i < m_presentationAttributeMap->propertyCount(); ++i) | 88 for (unsigned i = 0; i < m_presentationAttributeMap->propertyCount(); ++i) |
| 89 properties.add( | 89 properties.insert( |
| 90 PropertyHandle(m_presentationAttributeMap->propertyAt(i).id(), true)); | 90 PropertyHandle(m_presentationAttributeMap->propertyAt(i).id(), true)); |
| 91 | 91 |
| 92 for (const auto& key : m_svgAttributeMap.keys()) | 92 for (const auto& key : m_svgAttributeMap.keys()) |
| 93 properties.add(PropertyHandle(*key)); | 93 properties.insert(PropertyHandle(*key)); |
| 94 | 94 |
| 95 return properties; | 95 return properties; |
| 96 } | 96 } |
| 97 | 97 |
| 98 PassRefPtr<Keyframe> StringKeyframe::clone() const { | 98 PassRefPtr<Keyframe> StringKeyframe::clone() const { |
| 99 return adoptRef(new StringKeyframe(*this)); | 99 return adoptRef(new StringKeyframe(*this)); |
| 100 } | 100 } |
| 101 | 101 |
| 102 PassRefPtr<Keyframe::PropertySpecificKeyframe> | 102 PassRefPtr<Keyframe::PropertySpecificKeyframe> |
| 103 StringKeyframe::createPropertySpecificKeyframe( | 103 StringKeyframe::createPropertySpecificKeyframe( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 PassRefPtr<Keyframe::PropertySpecificKeyframe> | 152 PassRefPtr<Keyframe::PropertySpecificKeyframe> |
| 153 SVGPropertySpecificKeyframe::neutralKeyframe( | 153 SVGPropertySpecificKeyframe::neutralKeyframe( |
| 154 double offset, | 154 double offset, |
| 155 PassRefPtr<TimingFunction> easing) const { | 155 PassRefPtr<TimingFunction> easing) const { |
| 156 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd); | 156 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace blink | 159 } // namespace blink |
| OLD | NEW |