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

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

Issue 1305893005: Web Animations API: Don't allow quirky CSS values in keyframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/web-animations-api/quirky-keyframes.html ('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 #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
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 private: 88 private:
89 SVGPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, const String&); 89 SVGPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, const String&);
90 90
91 bool isSVGPropertySpecificKeyframe() const override { return true; } 91 bool isSVGPropertySpecificKeyframe() const override { return true; }
92 92
93 String m_value; 93 String m_value;
94 }; 94 };
95 95
96 private: 96 private:
97 StringKeyframe() 97 StringKeyframe()
98 : m_propertySet(MutableStylePropertySet::create(HTMLQuirksMode)) 98 : m_propertySet(MutableStylePropertySet::create(HTMLStandardMode))
99 { } 99 { }
100 100
101 StringKeyframe(const StringKeyframe& copyFrom); 101 StringKeyframe(const StringKeyframe& copyFrom);
102 102
103 PassRefPtrWillBeRawPtr<Keyframe> clone() const override; 103 PassRefPtrWillBeRawPtr<Keyframe> clone() const override;
104 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPropertySpe cificKeyframe(PropertyHandle) const override; 104 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPropertySpe cificKeyframe(PropertyHandle) const override;
105 105
106 bool isStringKeyframe() const override { return true; } 106 bool isStringKeyframe() const override { return true; }
107 107
108 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; 108 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet;
109 HashMap<const QualifiedName*, String> m_svgPropertyMap; 109 HashMap<const QualifiedName*, String> m_svgPropertyMap;
110 }; 110 };
111 111
112 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe; 112 using CSSPropertySpecificKeyframe = StringKeyframe::CSSPropertySpecificKeyframe;
113 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe; 113 using SVGPropertySpecificKeyframe = StringKeyframe::SVGPropertySpecificKeyframe;
114 114
115 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe()); 115 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe());
116 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey frame()); 116 DEFINE_TYPE_CASTS(CSSPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isCSSPropertySpecificKeyframe(), value.isCSSPropertySpecificKey frame());
117 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey frame()); 117 DEFINE_TYPE_CASTS(SVGPropertySpecificKeyframe, Keyframe::PropertySpecificKeyfram e, value, value->isSVGPropertySpecificKeyframe(), value.isSVGPropertySpecificKey frame());
118 118
119 } 119 }
120 120
121 #endif 121 #endif
OLDNEW
« no previous file with comments | « LayoutTests/web-animations-api/quirky-keyframes.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698