Bug 1692937 [wpt PR 27636] - new parameter --include-file for wptrunner, a=testonly
[gecko.git] / layout / style / CSSMozDocumentRule.h
blob9ae28567dbd32cf60cbadf6af7e64dfecbdeef66
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/. */
7 #ifndef mozilla_dom_CSSMozDocumentRule_h
8 #define mozilla_dom_CSSMozDocumentRule_h
10 #include "mozilla/css/GroupRule.h"
11 #include "mozilla/css/DocumentMatchingFunction.h"
12 #include "mozilla/ServoBindingTypes.h"
14 namespace mozilla {
15 namespace dom {
17 class CSSMozDocumentRule final : public css::ConditionRule {
18 public:
19 CSSMozDocumentRule(RefPtr<RawServoMozDocumentRule> aRawRule,
20 StyleSheet* aSheet, css::Rule* aParentRule, uint32_t aLine,
21 uint32_t aColumn);
23 NS_DECL_ISUPPORTS_INHERITED
25 static bool Match(const Document*, nsIURI* aDocURI,
26 const nsACString& aDocURISpec, const nsACString& aPattern,
27 css::DocumentMatchingFunction);
29 #ifdef DEBUG
30 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
31 #endif
33 RawServoMozDocumentRule* Raw() const { return mRawRule; }
35 // WebIDL interface
36 uint16_t Type() const final { return CSSRule_Binding::DOCUMENT_RULE; }
37 void GetCssText(nsACString& aCssText) const final;
38 void GetConditionText(nsACString& aConditionText) final;
39 void SetConditionText(const nsACString& aConditionText,
40 ErrorResult& aRv) final;
42 size_t SizeOfIncludingThis(MallocSizeOf) const override;
44 JSObject* WrapObject(JSContext* aCx,
45 JS::Handle<JSObject*> aGivenProto) override;
47 private:
48 ~CSSMozDocumentRule() = default;
50 RefPtr<RawServoMozDocumentRule> mRawRule;
53 } // namespace dom
54 } // namespace mozilla
56 #endif // mozilla_dom_CSSMozDocumentRule_h