Bug 1700051: part 48) Slightly simplify `mozInlineSpellWordUtil::FindRealWordContaini...
[gecko.git] / layout / style / CSSFontFeatureValuesRule.h
blob7cfe295466a8d920d1e901ffd7ee24863c5ca10b
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 {
16 namespace dom {
18 class CSSFontFeatureValuesRule final : public css::Rule {
19 public:
20 CSSFontFeatureValuesRule(RefPtr<RawServoFontFeatureValuesRule> aRawRule,
21 StyleSheet* aSheet, css::Rule* aParentRule,
22 uint32_t aLine, uint32_t aColumn)
23 : css::Rule(aSheet, aParentRule, aLine, aColumn),
24 mRawRule(std::move(aRawRule)) {}
26 virtual bool IsCCLeaf() const override;
28 RawServoFontFeatureValuesRule* Raw() const { return mRawRule; }
30 // WebIDL interfaces
31 uint16_t Type() const final {
32 return CSSRule_Binding::FONT_FEATURE_VALUES_RULE;
35 void GetCssText(nsACString& aCssText) const override;
36 void GetFontFamily(nsACString& aFamily);
37 void SetFontFamily(const nsACString& aFamily, mozilla::ErrorResult& aRv);
38 void GetValueText(nsACString& aValueText);
39 void SetValueText(const nsACString& aValueText, mozilla::ErrorResult& aRv);
41 size_t SizeOfIncludingThis(
42 mozilla::MallocSizeOf aMallocSizeOf) const override;
44 #ifdef DEBUG
45 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
46 #endif
48 JSObject* WrapObject(JSContext* aCx,
49 JS::Handle<JSObject*> aGivenProto) override;
51 private:
52 ~CSSFontFeatureValuesRule() = default;
54 RefPtr<RawServoFontFeatureValuesRule> mRawRule;
57 } // namespace dom
58 } // namespace mozilla
60 #endif // mozilla_dom_CSSFontFeatureValuesRule_h