Bug 1879449 [wpt PR 44489] - [wptrunner] Add `infrastructure/expected-fail/` test...
[gecko.git] / layout / style / CSSFontPaletteValuesRule.h
blob9020a2b35fc281ca4a02122baf709a5250dd0861
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_CSSFontPaletteValuesRule_h
8 #define mozilla_dom_CSSFontPaletteValuesRule_h
10 #include "mozilla/css/Rule.h"
11 #include "mozilla/ServoBindingTypes.h"
13 #include "nsICSSDeclaration.h"
15 namespace mozilla::dom {
17 class CSSFontPaletteValuesRule final : public css::Rule {
18 public:
19 CSSFontPaletteValuesRule(RefPtr<StyleFontPaletteValuesRule> aRawRule,
20 StyleSheet* aSheet, css::Rule* aParentRule,
21 uint32_t aLine, uint32_t aColumn)
22 : css::Rule(aSheet, aParentRule, aLine, aColumn),
23 mRawRule(std::move(aRawRule)) {}
25 bool IsCCLeaf() const final;
27 StyleFontPaletteValuesRule* Raw() const { return mRawRule; }
28 void SetRawAfterClone(RefPtr<StyleFontPaletteValuesRule> aRaw);
30 // WebIDL interfaces
31 StyleCssRuleType Type() const final;
33 void GetCssText(nsACString& aCssText) const final;
35 void GetFontFamily(nsACString& aFamily) const;
37 void GetName(nsACString& aName) const;
39 void GetBasePalette(nsACString& aPalette) const;
41 void GetOverrideColors(nsACString& aColors) const;
43 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
45 #ifdef DEBUG
46 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
47 #endif
49 JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
51 private:
52 ~CSSFontPaletteValuesRule() = default;
54 RefPtr<StyleFontPaletteValuesRule> mRawRule;
57 } // namespace mozilla::dom
59 #endif // mozilla_dom_CSSFontPaletteValuesRule_h