Bug 1700051: part 35) Reduce accessibility of `mSoftText.mDOMMapping` to `private...
[gecko.git] / layout / style / CSSImportRule.h
blob8732b81af3899451bccbbfe2262af3da62ba48c6
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_CSSImportRule_h
8 #define mozilla_dom_CSSImportRule_h
10 #include "mozilla/css/Rule.h"
12 namespace mozilla {
14 class StyleSheet;
16 namespace dom {
18 class CSSImportRule final : public css::Rule {
19 public:
20 CSSImportRule(RefPtr<RawServoImportRule> aRawRule, StyleSheet* aSheet,
21 css::Rule* aParentRule, uint32_t aLine, uint32_t aColumn);
23 NS_DECL_ISUPPORTS_INHERITED
24 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSImportRule, css::Rule)
26 bool IsCCLeaf() const final;
28 #ifdef DEBUG
29 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
30 #endif
32 size_t SizeOfIncludingThis(MallocSizeOf) const override;
34 // WebIDL interface
35 uint16_t Type() const final { return CSSRule_Binding::IMPORT_RULE; }
36 void GetCssText(nsACString& aCssText) const override;
37 void GetHref(nsAString& aHref) const;
38 dom::MediaList* GetMedia() const;
39 StyleSheet* GetStyleSheet() const { return mChildSheet; }
41 // Clear the mSheet pointer on this rule and descendants.
42 void DropSheetReference() final;
44 JSObject* WrapObject(JSContext* aCx,
45 JS::Handle<JSObject*> aGivenProto) override;
47 const RawServoImportRule* Raw() const { return mRawRule.get(); }
49 private:
50 ~CSSImportRule();
52 RefPtr<RawServoImportRule> mRawRule;
53 RefPtr<StyleSheet> mChildSheet;
56 } // namespace dom
57 } // namespace mozilla
59 #endif // mozilla_dom_CSSImportRule_h