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