tor-browser

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

CSSImportRule.h (1874B)


      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_CSSImportRule_h
      8 #define mozilla_dom_CSSImportRule_h
      9 
     10 #include "mozilla/css/Rule.h"
     11 
     12 namespace mozilla {
     13 
     14 class StyleSheet;
     15 
     16 namespace dom {
     17 
     18 class CSSImportRule final : public css::Rule {
     19 public:
     20  CSSImportRule(RefPtr<StyleLockedImportRule> aRawRule, StyleSheet* aSheet,
     21                css::Rule* aParentRule, uint32_t aLine, uint32_t aColumn);
     22 
     23  NS_DECL_ISUPPORTS_INHERITED
     24  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSImportRule, css::Rule)
     25 
     26  bool IsCCLeaf() const final;
     27 
     28 #ifdef DEBUG
     29  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
     30 #endif
     31 
     32  size_t SizeOfIncludingThis(MallocSizeOf) const override;
     33 
     34  // WebIDL interface
     35  StyleCssRuleType Type() const final;
     36  void GetCssText(nsACString& aCssText) const override;
     37  void GetHref(nsAString& aHref) const;
     38  dom::MediaList* GetMedia();
     39  StyleSheet* GetStyleSheet() const { return mChildSheet; }
     40  StyleSheet* GetStyleSheetForBindings();
     41  void GetLayerName(nsACString&) const;
     42  void GetSupportsText(nsACString&) const;
     43 
     44  // Clear the mSheet pointer on this rule and descendants.
     45  void DropSheetReference() final;
     46 
     47  JSObject* WrapObject(JSContext* aCx,
     48                       JS::Handle<JSObject*> aGivenProto) override;
     49 
     50  const StyleLockedImportRule* Raw() const { return mRawRule.get(); }
     51  void SetRawAfterClone(RefPtr<StyleLockedImportRule>);
     52 
     53 private:
     54  ~CSSImportRule();
     55 
     56  RefPtr<StyleLockedImportRule> mRawRule;
     57  RefPtr<StyleSheet> mChildSheet;
     58 };
     59 
     60 }  // namespace dom
     61 }  // namespace mozilla
     62 
     63 #endif  // mozilla_dom_CSSImportRule_h