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

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

Issue 2524303002: Emit console warning when element.animate() keyframe value fails to parse (Closed)
Patch Set: Review changes Created 4 years 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 17 // A specialization of Keyframe that associates user specified keyframe
18 // properties with either CSS properties or SVG attributes. 18 // properties with either CSS properties or SVG attributes.
19 class StringKeyframe : public Keyframe { 19 class StringKeyframe : public Keyframe {
20 public: 20 public:
21 static PassRefPtr<StringKeyframe> create() { 21 static PassRefPtr<StringKeyframe> create() {
22 return adoptRef(new StringKeyframe); 22 return adoptRef(new StringKeyframe);
23 } 23 }
24 24
25 void setCSSPropertyValue(const AtomicString& propertyName, 25 MutableStylePropertySet::SetResult setCSSPropertyValue(
26 const String& value, 26 const AtomicString& propertyName,
27 StyleSheetContents*); 27 const String& value,
28 void setCSSPropertyValue(CSSPropertyID, 28 StyleSheetContents*);
29 const String& value, 29 MutableStylePropertySet::SetResult setCSSPropertyValue(CSSPropertyID,
30 StyleSheetContents*); 30 const String& value,
31 StyleSheetContents*);
31 void setCSSPropertyValue(CSSPropertyID, const CSSValue&); 32 void setCSSPropertyValue(CSSPropertyID, const CSSValue&);
32 void setPresentationAttributeValue(CSSPropertyID, 33 void setPresentationAttributeValue(CSSPropertyID,
33 const String& value, 34 const String& value,
34 StyleSheetContents*); 35 StyleSheetContents*);
35 void setSVGAttributeValue(const QualifiedName&, const String& value); 36 void setSVGAttributeValue(const QualifiedName&, const String& value);
36 37
37 const CSSValue& cssPropertyValue(const PropertyHandle& property) const { 38 const CSSValue& cssPropertyValue(const PropertyHandle& property) const {
38 int index = -1; 39 int index = -1;
39 if (property.isCSSCustomProperty()) 40 if (property.isCSSCustomProperty())
40 index = 41 index =
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 value.isCSSPropertySpecificKeyframe()); 180 value.isCSSPropertySpecificKeyframe());
180 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, 181 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe,
181 Keyframe::PropertySpecificKeyframe, 182 Keyframe::PropertySpecificKeyframe,
182 value, 183 value,
183 value->isSVGPropertySpecificKeyframe(), 184 value->isSVGPropertySpecificKeyframe(),
184 value.isSVGPropertySpecificKeyframe()); 185 value.isSVGPropertySpecificKeyframe());
185 186
186 } // namespace blink 187 } // namespace blink
187 188
188 #endif 189 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/EffectInput.cpp ('k') | third_party/WebKit/Source/core/animation/StringKeyframe.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698