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
{
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
);
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
;
46 void List(FILE* out
= stdout
, int32_t aIndent
= 0) const final
;
49 JSObject
* WrapObject(JSContext
* aCx
, JS::Handle
<JSObject
*> aGivenProto
) final
;
52 ~CSSFontPaletteValuesRule() = default;
54 RefPtr
<StyleFontPaletteValuesRule
> mRawRule
;
57 } // namespace mozilla::dom
59 #endif // mozilla_dom_CSSFontPaletteValuesRule_h