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/. */
8 * style sheet and style rule processor representing style attributes
11 #ifndef nsHTMLCSSStyleSheet_h_
12 #define nsHTMLCSSStyleSheet_h_
14 #include "mozilla/Attributes.h"
15 #include "mozilla/MemoryReporting.h"
17 #include "nsTHashMap.h"
23 enum class PseudoStyleType
: uint8_t;
27 } // namespace mozilla
29 class nsHTMLCSSStyleSheet final
{
31 nsHTMLCSSStyleSheet();
33 NS_INLINE_DECL_REFCOUNTING(nsHTMLCSSStyleSheet
)
35 void CacheStyleAttr(const nsAString
& aSerialized
, MiscContainer
* aValue
);
36 void EvictStyleAttr(const nsAString
& aSerialized
, MiscContainer
* aValue
);
37 MiscContainer
* LookupStyleAttr(const nsAString
& aSerialized
);
40 ~nsHTMLCSSStyleSheet();
42 nsHTMLCSSStyleSheet(const nsHTMLCSSStyleSheet
& aCopy
) = delete;
43 nsHTMLCSSStyleSheet
& operator=(const nsHTMLCSSStyleSheet
& aCopy
) = delete;
46 nsTHashMap
<nsStringHashKey
, MiscContainer
*> mCachedStyleAttrs
;
49 #endif /* !defined(nsHTMLCSSStyleSheet_h_) */