| 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/CSSPropertyMetadata.h" | 9 #include "core/css/CSSPropertyMetadata.h" |
| 10 #include "core/css/resolver/StyleResolver.h" | 10 #include "core/css/resolver/StyleResolver.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 m_svgAttributeMap.set(&attributeName, value); | 48 m_svgAttributeMap.set(&attributeName, value); |
| 49 } | 49 } |
| 50 | 50 |
| 51 PropertyHandleSet StringKeyframe::properties() const | 51 PropertyHandleSet StringKeyframe::properties() const |
| 52 { | 52 { |
| 53 // This is not used in time-critical code, so we probably don't need to | 53 // This is not used in time-critical code, so we probably don't need to |
| 54 // worry about caching this result. | 54 // worry about caching this result. |
| 55 PropertyHandleSet properties; | 55 PropertyHandleSet properties; |
| 56 for (unsigned i = 0; i < m_cssPropertyMap->propertyCount(); ++i) { | 56 for (unsigned i = 0; i < m_cssPropertyMap->propertyCount(); ++i) { |
| 57 StylePropertySet::PropertyReference propertyReference = m_cssPropertyMap
->propertyAt(i); | 57 StylePropertySet::PropertyReference propertyReference = m_cssPropertyMap
->propertyAt(i); |
| 58 DCHECK( | 58 DCHECK(!isShorthandProperty(propertyReference.id())) |
| 59 !isShorthandProperty(propertyReference.id()) || propertyReference.va
lue().isVariableReferenceValue()) | |
| 60 << "Web Animations: Encountered unexpanded shorthand CSS property ("
<< propertyReference.id() << ")."; | 59 << "Web Animations: Encountered unexpanded shorthand CSS property ("
<< propertyReference.id() << ")."; |
| 61 properties.add(PropertyHandle(propertyReference.id(), false)); | 60 properties.add(PropertyHandle(propertyReference.id(), false)); |
| 62 } | 61 } |
| 63 | 62 |
| 64 for (unsigned i = 0; i < m_presentationAttributeMap->propertyCount(); ++i) | 63 for (unsigned i = 0; i < m_presentationAttributeMap->propertyCount(); ++i) |
| 65 properties.add(PropertyHandle(m_presentationAttributeMap->propertyAt(i).
id(), true)); | 64 properties.add(PropertyHandle(m_presentationAttributeMap->propertyAt(i).
id(), true)); |
| 66 | 65 |
| 67 for (const auto& key: m_svgAttributeMap.keys()) | 66 for (const auto& key: m_svgAttributeMap.keys()) |
| 68 properties.add(PropertyHandle(*key)); | 67 properties.add(PropertyHandle(*key)); |
| 69 | 68 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 { | 108 { |
| 110 return create(offset, m_easing, m_value, m_composite); | 109 return create(offset, m_easing, m_value, m_composite); |
| 111 } | 110 } |
| 112 | 111 |
| 113 PassRefPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKeyframe::neut
ralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const | 112 PassRefPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKeyframe::neut
ralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const |
| 114 { | 113 { |
| 115 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd
); | 114 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd
); |
| 116 } | 115 } |
| 117 | 116 |
| 118 } // namespace blink | 117 } // namespace blink |
| OLD | NEW |