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