/work/obj-fuzz/dist/include/mozilla/dom/CSSMediaRule.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_CSSMediaRule_h |
8 | | #define mozilla_dom_CSSMediaRule_h |
9 | | |
10 | | #include "mozilla/css/GroupRule.h" |
11 | | #include "mozilla/ServoBindingTypes.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | class CSSMediaRule final : public css::ConditionRule |
17 | | { |
18 | | public: |
19 | | CSSMediaRule(RefPtr<RawServoMediaRule> aRawRule, |
20 | | StyleSheet* aSheet, |
21 | | css::Rule* aParentRule, |
22 | | uint32_t aLine, |
23 | | uint32_t aColumn); |
24 | | |
25 | | NS_DECL_ISUPPORTS_INHERITED |
26 | | NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSMediaRule, css::ConditionRule) |
27 | | |
28 | | void DropSheetReference() override; |
29 | | |
30 | | #ifdef DEBUG |
31 | | void List(FILE* out = stdout, int32_t aIndent = 0) const final; |
32 | | #endif |
33 | | |
34 | 0 | RawServoMediaRule* Raw() const { return mRawRule; } |
35 | | |
36 | | // WebIDL interface |
37 | 0 | uint16_t Type() const override { return CSSRule_Binding::MEDIA_RULE; } |
38 | | // WebIDL interface |
39 | | void GetCssText(nsAString& aCssText) const final; |
40 | | void GetConditionText(nsAString& aConditionText) final; |
41 | | void SetConditionText(const nsAString& aConditionText, |
42 | | ErrorResult& aRv) final; |
43 | | dom::MediaList* Media(); |
44 | | |
45 | | size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) |
46 | | const override; |
47 | | |
48 | | JSObject* WrapObject(JSContext* aCx, |
49 | | JS::Handle<JSObject*> aGivenProto) override; |
50 | | |
51 | | private: |
52 | | virtual ~CSSMediaRule(); |
53 | | |
54 | | RefPtr<RawServoMediaRule> mRawRule; |
55 | | RefPtr<dom::MediaList> mMediaList; |
56 | | }; |
57 | | |
58 | | } // namespace dom |
59 | | } // namespace mozilla |
60 | | |
61 | | #endif // mozilla_dom_CSSMediaRule_h |