2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-12-31 18:56:32 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* style sheet and style rule processor representing style attributes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsHTMLCSSStyleSheet_h_
|
|
|
|
#define nsHTMLCSSStyleSheet_h_
|
|
|
|
|
2011-12-16 23:42:07 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-06-23 16:03:39 +04:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2011-12-16 23:42:07 +04:00
|
|
|
|
2021-03-10 13:47:47 +03:00
|
|
|
#include "nsTHashMap.h"
|
2009-12-31 18:56:32 +03:00
|
|
|
|
2014-09-13 17:17:36 +04:00
|
|
|
class nsRuleWalker;
|
2012-09-30 20:40:24 +04:00
|
|
|
struct MiscContainer;
|
|
|
|
|
2014-09-13 17:17:36 +04:00
|
|
|
namespace mozilla {
|
2019-02-19 16:44:33 +03:00
|
|
|
enum class PseudoStyleType : uint8_t;
|
2014-09-13 17:17:36 +04:00
|
|
|
namespace dom {
|
|
|
|
class Element;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-09-13 17:17:36 +04:00
|
|
|
|
2018-02-01 07:04:04 +03:00
|
|
|
class nsHTMLCSSStyleSheet final {
|
2009-12-31 18:56:32 +03:00
|
|
|
public:
|
2013-06-14 09:34:37 +04:00
|
|
|
nsHTMLCSSStyleSheet();
|
2009-12-31 18:56:32 +03:00
|
|
|
|
2018-02-01 07:04:04 +03:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(nsHTMLCSSStyleSheet)
|
2014-09-13 17:17:36 +04:00
|
|
|
|
2012-09-30 20:40:24 +04:00
|
|
|
void CacheStyleAttr(const nsAString& aSerialized, MiscContainer* aValue);
|
|
|
|
void EvictStyleAttr(const nsAString& aSerialized, MiscContainer* aValue);
|
|
|
|
MiscContainer* LookupStyleAttr(const nsAString& aSerialized);
|
|
|
|
|
2009-12-31 18:56:32 +03:00
|
|
|
private:
|
2014-06-24 02:40:01 +04:00
|
|
|
~nsHTMLCSSStyleSheet();
|
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
nsHTMLCSSStyleSheet(const nsHTMLCSSStyleSheet& aCopy) = delete;
|
|
|
|
nsHTMLCSSStyleSheet& operator=(const nsHTMLCSSStyleSheet& aCopy) = delete;
|
2009-12-31 18:56:32 +03:00
|
|
|
|
|
|
|
protected:
|
2021-03-10 13:47:47 +03:00
|
|
|
nsTHashMap<nsStringHashKey, MiscContainer*> mCachedStyleAttrs;
|
2009-12-31 18:56:32 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* !defined(nsHTMLCSSStyleSheet_h_) */
|