/work/obj-fuzz/dist/include/mozilla/dom/CSSKeyframesRule.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_CSSKeyframesRule_h |
8 | | #define mozilla_dom_CSSKeyframesRule_h |
9 | | |
10 | | #include "mozilla/css/Rule.h" |
11 | | #include "mozilla/dom/CSSKeyframeRule.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | class CSSKeyframeList; |
17 | | |
18 | | class CSSKeyframesRule final : public css::Rule |
19 | | { |
20 | | public: |
21 | | CSSKeyframesRule(RefPtr<RawServoKeyframesRule> aRawRule, |
22 | | StyleSheet* aSheet, |
23 | | css::Rule* aParentRule, |
24 | | uint32_t aLine, |
25 | | uint32_t aColumn); |
26 | | |
27 | | NS_DECL_ISUPPORTS_INHERITED |
28 | | NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSKeyframesRule, |
29 | | css::Rule) |
30 | | |
31 | | bool IsCCLeaf() const final; |
32 | | |
33 | | #ifdef DEBUG |
34 | | void List(FILE* out = stdout, int32_t aIndent = 0) const final; |
35 | | #endif |
36 | | |
37 | | void DropSheetReference() final; |
38 | | |
39 | | // WebIDL interface |
40 | 0 | uint16_t Type() const final { return CSSRule_Binding::KEYFRAMES_RULE; } |
41 | | void GetCssText(nsAString& aCssText) const final; |
42 | | void GetName(nsAString& aName) const; |
43 | | void SetName(const nsAString& aName); |
44 | | CSSRuleList* CssRules(); |
45 | | void AppendRule(const nsAString& aRule); |
46 | | void DeleteRule(const nsAString& aKey); |
47 | | CSSKeyframeRule* FindRule(const nsAString& aKey); |
48 | | |
49 | | size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final; |
50 | | |
51 | | JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final; |
52 | | |
53 | | private: |
54 | | uint32_t FindRuleIndexForKey(const nsAString& aKey); |
55 | | |
56 | | template<typename Func> |
57 | | void UpdateRule(Func aCallback); |
58 | | |
59 | | virtual ~CSSKeyframesRule(); |
60 | | |
61 | | RefPtr<RawServoKeyframesRule> mRawRule; |
62 | | RefPtr<CSSKeyframeList> mKeyframeList; // lazily constructed |
63 | | }; |
64 | | |
65 | | } // namespace dom |
66 | | } // namespace mozilla |
67 | | |
68 | | #endif // mozilla_dom_CSSKeyframesRule_h |