tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CSSFontFeatureValuesRule.h (1921B)


      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/. */
      6 
      7 #ifndef mozilla_dom_CSSFontFeatureValuesRule_h
      8 #define mozilla_dom_CSSFontFeatureValuesRule_h
      9 
     10 #include "mozilla/ServoBindingTypes.h"
     11 #include "mozilla/css/Rule.h"
     12 #include "nsICSSDeclaration.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 class CSSFontFeatureValuesRule final : public css::Rule {
     17 public:
     18  CSSFontFeatureValuesRule(RefPtr<StyleFontFeatureValuesRule> aRawRule,
     19                           StyleSheet* aSheet, css::Rule* aParentRule,
     20                           uint32_t aLine, uint32_t aColumn)
     21      : css::Rule(aSheet, aParentRule, aLine, aColumn),
     22        mRawRule(std::move(aRawRule)) {}
     23 
     24  virtual bool IsCCLeaf() const override;
     25 
     26  StyleFontFeatureValuesRule* Raw() const { return mRawRule; }
     27  void SetRawAfterClone(RefPtr<StyleFontFeatureValuesRule> aRaw);
     28 
     29  // WebIDL interfaces
     30  StyleCssRuleType Type() const final;
     31 
     32  void GetCssText(nsACString& aCssText) const override;
     33  void GetFontFamily(nsACString& aFamily);
     34  void SetFontFamily(const nsACString& aFamily, mozilla::ErrorResult& aRv);
     35  void GetValueText(nsACString& aValueText);
     36  void SetValueText(const nsACString& aValueText, mozilla::ErrorResult& aRv);
     37 
     38  size_t SizeOfIncludingThis(
     39      mozilla::MallocSizeOf aMallocSizeOf) const override;
     40 
     41 #ifdef DEBUG
     42  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
     43 #endif
     44 
     45  JSObject* WrapObject(JSContext* aCx,
     46                       JS::Handle<JSObject*> aGivenProto) override;
     47 
     48 private:
     49  ~CSSFontFeatureValuesRule() = default;
     50 
     51  RefPtr<StyleFontFeatureValuesRule> mRawRule;
     52 };
     53 
     54 }  // namespace mozilla::dom
     55 
     56 #endif  // mozilla_dom_CSSFontFeatureValuesRule_h