Bug 1874684 - Part 37: Fix unified compilation. r=allstarschh
[gecko.git] / layout / style / CSSContainerRule.h
blob683a17604ec1aea30dfe08af199c116ac070416b
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_CSSContainerRule_h
8 #define mozilla_dom_CSSContainerRule_h
10 #include "mozilla/css/GroupRule.h"
11 #include "mozilla/ServoBindingTypes.h"
13 namespace mozilla::dom {
15 class CSSContainerRule final : public css::ConditionRule {
16 public:
17 CSSContainerRule(RefPtr<StyleContainerRule> aRawRule, StyleSheet* aSheet,
18 css::Rule* aParentRule, uint32_t aLine, uint32_t aColumn);
20 NS_DECL_ISUPPORTS_INHERITED
22 #ifdef DEBUG
23 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
24 #endif
26 StyleContainerRule* Raw() const { return mRawRule; }
27 void SetRawAfterClone(RefPtr<StyleContainerRule>);
29 already_AddRefed<StyleLockedCssRules> GetOrCreateRawRules() final;
31 // WebIDL interface
32 StyleCssRuleType Type() const override;
33 // WebIDL interface
34 void GetCssText(nsACString& aCssText) const final;
35 void GetConditionText(nsACString& aConditionText) final;
37 void GetContainerName(nsACString&) const;
38 void GetContainerQuery(nsACString&) const;
40 size_t SizeOfIncludingThis(MallocSizeOf) const override;
42 JSObject* WrapObject(JSContext* aCx,
43 JS::Handle<JSObject*> aGivenProto) override;
45 Element* QueryContainerFor(const Element&) const;
47 private:
48 virtual ~CSSContainerRule();
50 RefPtr<StyleContainerRule> mRawRule;
53 } // namespace mozilla::dom
55 #endif // mozilla_dom_CSSContainerRule_h