Bug 1822393 - consistently use getGeckoViewDependency() in browser-engine-gecko....
[gecko.git] / layout / style / CSSFontFeatureValuesRule.h
blob517d2ebd3a52d7a9a23d51bc8f5aaddbc01d85cc
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_CSSFontFeatureValuesRule_h
8 #define mozilla_dom_CSSFontFeatureValuesRule_h
10 #include "mozilla/css/Rule.h"
11 #include "mozilla/ServoBindingTypes.h"
13 #include "nsICSSDeclaration.h"
15 namespace mozilla::dom {
17 class CSSFontFeatureValuesRule final : public css::Rule {
18 public:
19 CSSFontFeatureValuesRule(RefPtr<StyleFontFeatureValuesRule> 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 virtual bool IsCCLeaf() const override;
27 StyleFontFeatureValuesRule* Raw() const { return mRawRule; }
28 void SetRawAfterClone(RefPtr<StyleFontFeatureValuesRule> aRaw);
30 // WebIDL interfaces
31 StyleCssRuleType Type() const final;
33 void GetCssText(nsACString& aCssText) const override;
34 void GetFontFamily(nsACString& aFamily);
35 void SetFontFamily(const nsACString& aFamily, mozilla::ErrorResult& aRv);
36 void GetValueText(nsACString& aValueText);
37 void SetValueText(const nsACString& aValueText, mozilla::ErrorResult& aRv);
39 size_t SizeOfIncludingThis(
40 mozilla::MallocSizeOf aMallocSizeOf) const override;
42 #ifdef DEBUG
43 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
44 #endif
46 JSObject* WrapObject(JSContext* aCx,
47 JS::Handle<JSObject*> aGivenProto) override;
49 private:
50 ~CSSFontFeatureValuesRule() = default;
52 RefPtr<StyleFontFeatureValuesRule> mRawRule;
55 } // namespace mozilla::dom
57 #endif // mozilla_dom_CSSFontFeatureValuesRule_h