Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / css / StyleRuleKeyframe.h
blob04dd56a3bd93197a9f39235e8420d539c570531c
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
3 // found in the LICENSE file.
5 #ifndef StyleRuleKeyframe_h
6 #define StyleRuleKeyframe_h
8 #include "core/css/StyleRule.h"
10 namespace blink {
12 class MutableStylePropertySet;
13 class StylePropertySet;
15 class StyleRuleKeyframe final : public StyleRuleBase {
16 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleRuleKeyframe);
17 public:
18 static PassRefPtrWillBeRawPtr<StyleRuleKeyframe> create(PassOwnPtr<Vector<double>> keys, PassRefPtrWillBeRawPtr<StylePropertySet> properties)
20 return adoptRefWillBeNoop(new StyleRuleKeyframe(keys, properties));
23 // Exposed to JavaScript.
24 String keyText() const;
25 bool setKeyText(const String&);
27 // Used by StyleResolver.
28 const Vector<double>& keys() const;
30 const StylePropertySet& properties() const { return *m_properties; }
31 MutableStylePropertySet& mutableProperties();
33 String cssText() const;
35 DECLARE_TRACE_AFTER_DISPATCH();
37 private:
38 StyleRuleKeyframe(PassOwnPtr<Vector<double>>, PassRefPtrWillBeRawPtr<StylePropertySet>);
40 RefPtrWillBeMember<StylePropertySet> m_properties;
41 Vector<double> m_keys;
44 DEFINE_STYLE_RULE_TYPE_CASTS(Keyframe);
46 } // namespace blink
48 #endif // StyleRuleKeyframe_h