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

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

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 class StringKeyframe : public Keyframe { 17 class StringKeyframe : public Keyframe {
18 public: 18 public:
19 static PassRefPtrWillBeRawPtr<StringKeyframe> create() 19 static PassRefPtrWillBeRawPtr<StringKeyframe> create()
20 { 20 {
21 return adoptRefWillBeNoop(new StringKeyframe); 21 return adoptRefWillBeNoop(new StringKeyframe);
22 } 22 }
23 23
24 void setPropertyValue(CSSPropertyID, const String& value, Element*, StyleShe etContents*); 24 void setPropertyValue(CSSPropertyID, const String& value, Element*, StyleShe etContents*);
25 void setPropertyValue(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>); 25 void setPropertyValue(CSSPropertyID, PassRefPtr<CSSValue>);
26 void setPropertyValue(const QualifiedName&, const String& value, Element*); 26 void setPropertyValue(const QualifiedName&, const String& value, Element*);
27 CSSValue* cssPropertyValue(CSSPropertyID property) const 27 CSSValue* cssPropertyValue(CSSPropertyID property) const
28 { 28 {
29 int index = m_propertySet->findPropertyIndex(property); 29 int index = m_propertySet->findPropertyIndex(property);
30 RELEASE_ASSERT(index >= 0); 30 RELEASE_ASSERT(index >= 0);
31 return m_propertySet->propertyAt(static_cast<unsigned>(index)).value(); 31 return m_propertySet->propertyAt(static_cast<unsigned>(index)).value();
32 } 32 }
33 String svgPropertyValue(const QualifiedName& attributeName) const 33 String svgPropertyValue(const QualifiedName& attributeName) const
34 { 34 {
35 return m_svgPropertyMap.get(&attributeName); 35 return m_svgPropertyMap.get(&attributeName);
(...skipping 23 matching lines...) Expand all
59 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, CSSValue*); 59 CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, CSSValue*);
60 60
61 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone WithOffset(double offset) const; 61 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone WithOffset(double offset) const;
62 bool isCSSPropertySpecificKeyframe() const override { return true; } 62 bool isCSSPropertySpecificKeyframe() const override { return true; }
63 63
64 PassRefPtrWillBeRawPtr<Interpolation> createLegacyStyleInterpolation(CSS PropertyID, Keyframe::PropertySpecificKeyframe& end, Element*, const ComputedSty le* baseStyle) const; 64 PassRefPtrWillBeRawPtr<Interpolation> createLegacyStyleInterpolation(CSS PropertyID, Keyframe::PropertySpecificKeyframe& end, Element*, const ComputedSty le* baseStyle) const;
65 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector <RefPtrWillBeMember<Interpolation>>>& interpolations); 65 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector <RefPtrWillBeMember<Interpolation>>>& interpolations);
66 66
67 void populateAnimatableValueCaches(CSSPropertyID, Keyframe::PropertySpec ificKeyframe&, Element*, CSSValue& fromCSSValue, CSSValue& toCSSValue) const; 67 void populateAnimatableValueCaches(CSSPropertyID, Keyframe::PropertySpec ificKeyframe&, Element*, CSSValue& fromCSSValue, CSSValue& toCSSValue) const;
68 68
69 RefPtrWillBeMember<CSSValue> m_value; 69 RefPtr<CSSValue> m_value;
70 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache; 70 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache;
71 }; 71 };
72 72
73 class SVGPropertySpecificKeyframe : public Keyframe::PropertySpecificKeyfram e { 73 class SVGPropertySpecificKeyframe : public Keyframe::PropertySpecificKeyfram e {
74 public: 74 public:
75 SVGPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, const String&, EffectModel::CompositeOperation); 75 SVGPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> ea sing, const String&, EffectModel::CompositeOperation);
76 76
77 const String& value() const { return m_value; } 77 const String& value() const { return m_value; }
78 78
79 PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) const final; 79 PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) const final;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « Source/core/animation/ShadowStyleInterpolationTest.cpp ('k') | Source/core/animation/StringKeyframe.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698