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

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

Issue 2379983002: Remove unused Element parameter in StringKeyframe (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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"
11 #include "core/style/ComputedStyle.h" 11 #include "core/style/ComputedStyle.h"
12 #include "core/svg/SVGElement.h" 12 #include "core/svg/SVGElement.h"
13 #include "platform/RuntimeEnabledFeatures.h" 13 #include "platform/RuntimeEnabledFeatures.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 StringKeyframe::StringKeyframe(const StringKeyframe& copyFrom) 17 StringKeyframe::StringKeyframe(const StringKeyframe& copyFrom)
18 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing) 18 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing)
19 , m_cssPropertyMap(copyFrom.m_cssPropertyMap->mutableCopy()) 19 , m_cssPropertyMap(copyFrom.m_cssPropertyMap->mutableCopy())
20 , m_presentationAttributeMap(copyFrom.m_presentationAttributeMap->mutableCop y()) 20 , m_presentationAttributeMap(copyFrom.m_presentationAttributeMap->mutableCop y())
21 , m_svgAttributeMap(copyFrom.m_svgAttributeMap) 21 , m_svgAttributeMap(copyFrom.m_svgAttributeMap)
22 { 22 {
23 } 23 }
24 24
25 void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const String& v alue, Element* element, StyleSheetContents* styleSheetContents) 25 void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const String& v alue, StyleSheetContents* styleSheetContents)
26 { 26 {
27 DCHECK_NE(property, CSSPropertyInvalid); 27 DCHECK_NE(property, CSSPropertyInvalid);
28 if (CSSAnimations::isAnimatableProperty(property)) 28 if (CSSAnimations::isAnimatableProperty(property))
29 m_cssPropertyMap->setProperty(property, value, false, styleSheetContents ); 29 m_cssPropertyMap->setProperty(property, value, false, styleSheetContents );
30 } 30 }
31 31
32 void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const CSSValue& value) 32 void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const CSSValue& value)
33 { 33 {
34 DCHECK_NE(property, CSSPropertyInvalid); 34 DCHECK_NE(property, CSSPropertyInvalid);
35 DCHECK(CSSAnimations::isAnimatableProperty(property)); 35 DCHECK(CSSAnimations::isAnimatableProperty(property));
36 m_cssPropertyMap->setProperty(property, value, false); 36 m_cssPropertyMap->setProperty(property, value, false);
37 } 37 }
38 38
39 void StringKeyframe::setPresentationAttributeValue(CSSPropertyID property, const String& value, Element* element, StyleSheetContents* styleSheetContents) 39 void StringKeyframe::setPresentationAttributeValue(CSSPropertyID property, const String& value, StyleSheetContents* styleSheetContents)
40 { 40 {
41 DCHECK_NE(property, CSSPropertyInvalid); 41 DCHECK_NE(property, CSSPropertyInvalid);
42 if (CSSAnimations::isAnimatableProperty(property)) 42 if (CSSAnimations::isAnimatableProperty(property))
43 m_presentationAttributeMap->setProperty(property, value, false, styleShe etContents); 43 m_presentationAttributeMap->setProperty(property, value, false, styleShe etContents);
44 } 44 }
45 45
46 void StringKeyframe::setSVGAttributeValue(const QualifiedName& attributeName, co nst String& value) 46 void StringKeyframe::setSVGAttributeValue(const QualifiedName& attributeName, co nst String& value)
47 { 47 {
48 m_svgAttributeMap.set(&attributeName, value); 48 m_svgAttributeMap.set(&attributeName, value);
49 } 49 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 { 108 {
109 return create(offset, m_easing, m_value, m_composite); 109 return create(offset, m_easing, m_value, m_composite);
110 } 110 }
111 111
112 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
113 { 113 {
114 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd ); 114 return create(offset, std::move(easing), String(), EffectModel::CompositeAdd );
115 } 115 }
116 116
117 } // namespace blink 117 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698