tor-browser

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

CSSCustomMediaRule.h (1687B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=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_CSSCustomMediaRule_h
      8 #define mozilla_dom_CSSCustomMediaRule_h
      9 
     10 #include "mozilla/ServoBindingTypes.h"
     11 #include "mozilla/css/Rule.h"
     12 #include "mozilla/dom/CSSCustomMediaRuleBindingFwd.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 class CSSCustomMediaRule final : public css::Rule {
     17 public:
     18  CSSCustomMediaRule(RefPtr<StyleCustomMediaRule> aRawRule, StyleSheet* aSheet,
     19                     css::Rule* aParentRule, uint32_t aLine, uint32_t aColumn);
     20 
     21  NS_DECL_ISUPPORTS_INHERITED
     22  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSCustomMediaRule, css::Rule)
     23 
     24  void DropSheetReference() final;
     25  bool IsCCLeaf() const final;
     26 
     27  StyleCustomMediaRule* Raw() const { return mRawRule; }
     28  void SetRawAfterClone(RefPtr<StyleCustomMediaRule>);
     29 
     30  // WebIDL interfaces
     31  StyleCssRuleType Type() const final;
     32  void GetCssText(nsACString& aCssText) const final;
     33 
     34  void GetName(nsACString&) const;
     35  void GetQuery(OwningCustomMediaQuery&);
     36 
     37  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
     38 
     39 #ifdef DEBUG
     40  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
     41 #endif
     42 
     43  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
     44 
     45 private:
     46  ~CSSCustomMediaRule();
     47 
     48  RefPtr<StyleCustomMediaRule> mRawRule;
     49  RefPtr<dom::MediaList> mMediaList;
     50 };
     51 
     52 }  // namespace mozilla::dom
     53 
     54 #endif  // mozilla_dom_CSSCustomMediaRule_h