OLD | NEW |
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 StyleRuleKeyframe_h | 5 #ifndef StyleRuleKeyframe_h |
6 #define StyleRuleKeyframe_h | 6 #define StyleRuleKeyframe_h |
7 | 7 |
8 #include "core/css/StyleRule.h" | 8 #include "core/css/StyleRule.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class CSSParserValueList; | |
13 class MutableStylePropertySet; | 12 class MutableStylePropertySet; |
14 class StylePropertySet; | 13 class StylePropertySet; |
15 | 14 |
16 class StyleRuleKeyframe final : public StyleRuleBase { | 15 class StyleRuleKeyframe final : public StyleRuleBase { |
17 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleRuleKeyframe); | 16 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleRuleKeyframe); |
18 public: | 17 public: |
19 static PassRefPtrWillBeRawPtr<StyleRuleKeyframe> create(PassOwnPtr<Vector<do
uble>> keys, PassRefPtrWillBeRawPtr<StylePropertySet> properties) | 18 static PassRefPtrWillBeRawPtr<StyleRuleKeyframe> create(PassOwnPtr<Vector<do
uble>> keys, PassRefPtrWillBeRawPtr<StylePropertySet> properties) |
20 { | 19 { |
21 return adoptRefWillBeNoop(new StyleRuleKeyframe(keys, properties)); | 20 return adoptRefWillBeNoop(new StyleRuleKeyframe(keys, properties)); |
22 } | 21 } |
23 | 22 |
24 // Exposed to JavaScript. | 23 // Exposed to JavaScript. |
25 String keyText() const; | 24 String keyText() const; |
26 bool setKeyText(const String&); | 25 bool setKeyText(const String&); |
27 | 26 |
28 // Used by StyleResolver. | 27 // Used by StyleResolver. |
29 const Vector<double>& keys() const; | 28 const Vector<double>& keys() const; |
30 | 29 |
31 const StylePropertySet& properties() const { return *m_properties; } | 30 const StylePropertySet& properties() const { return *m_properties; } |
32 MutableStylePropertySet& mutableProperties(); | 31 MutableStylePropertySet& mutableProperties(); |
33 | 32 |
34 String cssText() const; | 33 String cssText() const; |
35 | 34 |
36 DECLARE_TRACE_AFTER_DISPATCH(); | 35 DECLARE_TRACE_AFTER_DISPATCH(); |
37 | 36 |
38 static PassOwnPtr<Vector<double>> createKeyList(CSSParserValueList*); | |
39 | |
40 private: | 37 private: |
41 StyleRuleKeyframe(PassOwnPtr<Vector<double>>, PassRefPtrWillBeRawPtr<StylePr
opertySet>); | 38 StyleRuleKeyframe(PassOwnPtr<Vector<double>>, PassRefPtrWillBeRawPtr<StylePr
opertySet>); |
42 | 39 |
43 RefPtrWillBeMember<StylePropertySet> m_properties; | 40 RefPtrWillBeMember<StylePropertySet> m_properties; |
44 Vector<double> m_keys; | 41 Vector<double> m_keys; |
45 }; | 42 }; |
46 | 43 |
47 DEFINE_STYLE_RULE_TYPE_CASTS(Keyframe); | 44 DEFINE_STYLE_RULE_TYPE_CASTS(Keyframe); |
48 | 45 |
49 } // namespace blink | 46 } // namespace blink |
50 | 47 |
51 #endif // StyleRuleKeyframe_h | 48 #endif // StyleRuleKeyframe_h |
OLD | NEW |