tor-browser

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

StylePropertyMap.h (1782B)


      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 LAYOUT_STYLE_TYPEDOM_STYLEPROPERTYMAP_H_
      8 #define LAYOUT_STYLE_TYPEDOM_STYLEPROPERTYMAP_H_
      9 
     10 #include "js/TypeDecls.h"
     11 #include "mozilla/MemoryReporting.h"
     12 #include "mozilla/dom/StylePropertyMapReadOnly.h"
     13 #include "nsStringFwd.h"
     14 
     15 template <class T>
     16 class nsCOMPtr;
     17 class nsISupports;
     18 
     19 namespace mozilla {
     20 
     21 class ErrorResult;
     22 
     23 namespace dom {
     24 
     25 class OwningCSSStyleValueOrUTF8String;
     26 template <typename T>
     27 class Sequence;
     28 
     29 class StylePropertyMap final : public StylePropertyMapReadOnly {
     30 public:
     31  StylePropertyMap(Element* aElement, bool aComputed);
     32  explicit StylePropertyMap(CSSStyleRule* aRule);
     33 
     34  JSObject* WrapObject(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
     35 
     36  // start of StylePropertyMap Web IDL declarations
     37 
     38  // https://drafts.css-houdini.org/css-typed-om/#dom-stylepropertymap-set
     39  void Set(const nsACString& aProperty,
     40           const Sequence<OwningCSSStyleValueOrUTF8String>& aValues,
     41           ErrorResult& aRv);
     42 
     43  void Append(const nsACString& aProperty,
     44              const Sequence<OwningCSSStyleValueOrUTF8String>& aValues,
     45              ErrorResult& aRv);
     46 
     47  void Delete(const nsACString& aProperty, ErrorResult& aRv);
     48 
     49  void Clear();
     50 
     51  // end of StylePropertyMap Web IDL declarations
     52 
     53  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
     54 
     55 private:
     56  virtual ~StylePropertyMap() = default;
     57 };
     58 
     59 }  // namespace dom
     60 }  // namespace mozilla
     61 
     62 #endif  // LAYOUT_STYLE_TYPEDOM_STYLEPROPERTYMAP_H_