Bug 1874684 - Part 37: Fix unified compilation. r=allstarschh
[gecko.git] / layout / style / CSSStartingStyleRule.h
blob9ecccf505c2e2887213b4664ff3c83e4332ab8e9
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 CSSStaringStyleRule_h___
8 #define CSSStaringStyleRule_h___
10 #include "mozilla/css/GroupRule.h"
11 #include "mozilla/ServoBindingTypes.h"
13 namespace mozilla::dom {
15 class CSSStartingStyleRule final : public css::GroupRule {
16 public:
17 CSSStartingStyleRule(RefPtr<StyleStartingStyleRule> aRawRule,
18 StyleSheet* aSheet, css::Rule* aParentRule,
19 uint32_t aLine, uint32_t aColumn)
20 : css::GroupRule(aSheet, aParentRule, aLine, aColumn),
21 mRawRule(std::move(aRawRule)) {}
23 NS_DECL_ISUPPORTS_INHERITED
25 #ifdef DEBUG
26 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
27 #endif
29 StyleStartingStyleRule* Raw() const { return mRawRule; }
30 void SetRawAfterClone(RefPtr<StyleStartingStyleRule> aRaw) {
31 mRawRule = std::move(aRaw);
32 css::GroupRule::DidSetRawAfterClone();
35 already_AddRefed<StyleLockedCssRules> GetOrCreateRawRules() final;
37 // WebIDL interface
38 StyleCssRuleType Type() const final;
39 void GetCssText(nsACString& aCssText) const final;
41 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override {
42 return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
44 JSObject* WrapObject(JSContext*, JS::Handle<JSObject*>) override;
46 private:
47 ~CSSStartingStyleRule() = default;
49 RefPtr<StyleStartingStyleRule> mRawRule;
52 } // namespace mozilla::dom
54 #endif