/work/obj-fuzz/dist/include/mozilla/dom/CSSKeyframeRule.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef mozilla_dom_CSSKeyframeRule_h |
8 | | #define mozilla_dom_CSSKeyframeRule_h |
9 | | |
10 | | #include "mozilla/css/Rule.h" |
11 | | #include "mozilla/ServoBindingTypes.h" |
12 | | |
13 | | class nsICSSDeclaration; |
14 | | class DeclarationBlock; |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | class CSSKeyframeDeclaration; |
20 | | |
21 | | class CSSKeyframeRule final : public css::Rule |
22 | | { |
23 | | public: |
24 | | CSSKeyframeRule(already_AddRefed<RawServoKeyframe> aRaw, |
25 | | StyleSheet* aSheet, |
26 | | css::Rule* aParentRule, |
27 | | uint32_t aLine, |
28 | | uint32_t aColumn); |
29 | | |
30 | | NS_DECL_ISUPPORTS_INHERITED |
31 | | NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSKeyframeRule, |
32 | | css::Rule) |
33 | | bool IsCCLeaf() const final; |
34 | | |
35 | | #ifdef DEBUG |
36 | | void List(FILE* out = stdout, int32_t aIndent = 0) const final; |
37 | | #endif |
38 | | |
39 | 0 | RawServoKeyframe* Raw() const { return mRaw; } |
40 | | |
41 | | // WebIDL interface |
42 | 0 | uint16_t Type() const final { return CSSRule_Binding::KEYFRAME_RULE; } |
43 | | void GetCssText(nsAString& aCssText) const final; |
44 | | void GetKeyText(nsAString& aKey); |
45 | | void SetKeyText(const nsAString& aKey); |
46 | | nsICSSDeclaration* Style(); |
47 | | |
48 | | size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final; |
49 | | |
50 | | JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final; |
51 | | |
52 | | private: |
53 | | virtual ~CSSKeyframeRule(); |
54 | | |
55 | | friend class CSSKeyframeDeclaration; |
56 | | |
57 | | template<typename Func> |
58 | | void UpdateRule(Func aCallback); |
59 | | |
60 | | RefPtr<RawServoKeyframe> mRaw; |
61 | | // lazily created when needed |
62 | | RefPtr<CSSKeyframeDeclaration> mDeclaration; |
63 | | }; |
64 | | |
65 | | } // namespace dom |
66 | | } // namespace mozilla |
67 | | |
68 | | #endif // mozilla_dom_CSSKeyframeRule_h |