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

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

Issue 2047293002: Code cleanup: Replace Element with Document in element.animate() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_killForceConversionsToAnimatableValues
Patch Set: Rebased Created 4 years, 5 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
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 #ifndef StringKeyframe_h 5 #ifndef StringKeyframe_h
6 #define StringKeyframe_h 6 #define StringKeyframe_h
7 7
8 #include "core/animation/Keyframe.h" 8 #include "core/animation/Keyframe.h"
9 #include "core/css/StylePropertySet.h" 9 #include "core/css/StylePropertySet.h"
10 10
11 #include "wtf/HashMap.h" 11 #include "wtf/HashMap.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class StyleSheetContents; 15 class StyleSheetContents;
16 16
17 // A specialization of Keyframe that associates user specified keyframe properti es with either CSS properties or SVG attributes. 17 // A specialization of Keyframe that associates user specified keyframe properti es with either CSS properties or SVG attributes.
18 class StringKeyframe : public Keyframe { 18 class StringKeyframe : public Keyframe {
19 public: 19 public:
20 static PassRefPtr<StringKeyframe> create() 20 static PassRefPtr<StringKeyframe> create()
21 { 21 {
22 return adoptRef(new StringKeyframe); 22 return adoptRef(new StringKeyframe);
23 } 23 }
24 24
25 void setCSSPropertyValue(CSSPropertyID, const String& value, Element*, Style SheetContents*); 25 void setCSSPropertyValue(CSSPropertyID, const String& value, StyleSheetConte nts*);
26 void setCSSPropertyValue(CSSPropertyID, CSSValue*); 26 void setCSSPropertyValue(CSSPropertyID, CSSValue*);
27 void setPresentationAttributeValue(CSSPropertyID, const String& value, Eleme nt*, StyleSheetContents*); 27 void setPresentationAttributeValue(CSSPropertyID, const String& value, Style SheetContents*);
28 void setSVGAttributeValue(const QualifiedName&, const String& value); 28 void setSVGAttributeValue(const QualifiedName&, const String& value);
29 29
30 CSSValue* cssPropertyValue(CSSPropertyID property) const 30 CSSValue* cssPropertyValue(CSSPropertyID property) const
31 { 31 {
32 int index = m_cssPropertyMap->findPropertyIndex(property); 32 int index = m_cssPropertyMap->findPropertyIndex(property);
33 RELEASE_ASSERT(index >= 0); 33 RELEASE_ASSERT(index >= 0);
34 return m_cssPropertyMap->propertyAt(static_cast<unsigned>(index)).value( ); 34 return m_cssPropertyMap->propertyAt(static_cast<unsigned>(index)).value( );
35 } 35 }
36 36
37 CSSValue* presentationAttributeValue(CSSPropertyID property) const 37 CSSValue* presentationAttributeValue(CSSPropertyID property) const
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe; 127 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe;
128 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe; 128 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe;
129 129
130 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe()); 130 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe());
131 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey frame()); 131 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey frame());
132 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey frame()); 132 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey frame());
133 133
134 } // namespace blink 134 } // namespace blink
135 135
136 #endif 136 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698