2004-08-05 22:26:14 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
// vim:cindent:ts=2:et:sw=2:
|
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/. */
|
2006-03-25 08:47:31 +03:00
|
|
|
|
|
|
|
/* rules in a CSS stylesheet other than style rules (e.g., @import rules) */
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
#ifndef nsCSSRules_h_
|
|
|
|
#define nsCSSRules_h_
|
|
|
|
|
2015-10-20 02:16:20 +03:00
|
|
|
#include "Declaration.h"
|
|
|
|
#include "StyleRule.h"
|
|
|
|
#include "gfxFontFeatures.h"
|
2011-11-21 10:21:16 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-06-23 16:03:39 +04:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2015-10-20 02:16:20 +03:00
|
|
|
#include "mozilla/Move.h"
|
|
|
|
#include "mozilla/SheetType.h"
|
2010-08-08 09:28:33 +04:00
|
|
|
#include "mozilla/css/GroupRule.h"
|
2014-10-02 06:32:06 +04:00
|
|
|
#include "mozilla/dom/FontFace.h"
|
2015-10-20 02:16:20 +03:00
|
|
|
#include "nsAutoPtr.h"
|
2016-08-17 04:37:48 +03:00
|
|
|
#include "nsCSSPropertyID.h"
|
2015-10-20 02:16:20 +03:00
|
|
|
#include "nsCSSValue.h"
|
|
|
|
#include "nsDOMCSSDeclaration.h"
|
2012-11-27 09:30:30 +04:00
|
|
|
#include "nsIDOMCSSConditionRule.h"
|
2014-06-12 05:10:00 +04:00
|
|
|
#include "nsIDOMCSSCounterStyleRule.h"
|
2012-08-02 04:32:12 +04:00
|
|
|
#include "nsIDOMCSSFontFaceRule.h"
|
2013-05-20 06:59:20 +04:00
|
|
|
#include "nsIDOMCSSFontFeatureValuesRule.h"
|
2012-11-27 09:30:30 +04:00
|
|
|
#include "nsIDOMCSSGroupingRule.h"
|
2004-08-05 22:26:14 +04:00
|
|
|
#include "nsIDOMCSSMediaRule.h"
|
|
|
|
#include "nsIDOMCSSMozDocumentRule.h"
|
2015-10-20 02:16:20 +03:00
|
|
|
#include "nsIDOMCSSPageRule.h"
|
2012-08-02 04:32:12 +04:00
|
|
|
#include "nsIDOMCSSSupportsRule.h"
|
2016-03-13 22:46:13 +03:00
|
|
|
#include "nsIDOMCSSKeyframeRule.h"
|
|
|
|
#include "nsIDOMCSSKeyframesRule.h"
|
2011-04-12 10:18:43 +04:00
|
|
|
#include "nsTArray.h"
|
2004-08-05 22:26:14 +04:00
|
|
|
|
2005-03-30 04:36:57 +04:00
|
|
|
class nsMediaList;
|
2004-08-05 22:26:14 +04:00
|
|
|
|
2011-03-18 08:18:08 +03:00
|
|
|
namespace mozilla {
|
2013-03-03 04:31:48 +04:00
|
|
|
|
|
|
|
class ErrorResult;
|
|
|
|
|
2011-03-18 08:18:08 +03:00
|
|
|
namespace css {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class MediaRule final : public GroupRule,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsIDOMCSSMediaRule
|
2004-08-05 22:26:14 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
MediaRule(uint32_t aLineNumber, uint32_t aColumnNumber);
|
2011-03-18 08:18:08 +03:00
|
|
|
private:
|
|
|
|
MediaRule(const MediaRule& aCopy);
|
|
|
|
~MediaRule();
|
|
|
|
public:
|
2004-08-05 22:26:14 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
2004-08-05 22:26:14 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2004-08-05 22:26:14 +04:00
|
|
|
#endif
|
2016-11-23 02:26:20 +03:00
|
|
|
virtual void SetStyleSheet(mozilla::StyleSheet* aSheet) override; //override GroupRule
|
|
|
|
mozilla::CSSStyleSheet* GetStyleSheet() const
|
|
|
|
{
|
|
|
|
mozilla::StyleSheet* sheet = GroupRule::GetStyleSheet();
|
|
|
|
return sheet ? sheet->AsGecko() : nullptr;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<Rule> Clone() const override;
|
|
|
|
virtual nsIDOMCSSRule* GetDOMRule() override
|
2008-10-22 18:31:14 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIDOMCSSRule* GetExistingDOMRule() override
|
2012-10-08 06:39:08 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2004-08-05 22:26:14 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
2012-11-27 09:30:30 +04:00
|
|
|
// nsIDOMCSSGroupingRule interface
|
|
|
|
NS_DECL_NSIDOMCSSGROUPINGRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSConditionRule interface
|
|
|
|
NS_DECL_NSIDOMCSSCONDITIONRULE
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
// nsIDOMCSSMediaRule interface
|
|
|
|
NS_DECL_NSIDOMCSSMEDIARULE
|
|
|
|
|
2010-08-08 09:28:33 +04:00
|
|
|
// rest of GroupRule
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsMediaQueryResultCacheKey& aKey) override;
|
2004-08-05 22:26:14 +04:00
|
|
|
|
|
|
|
// @media rule methods
|
2005-03-30 04:36:57 +04:00
|
|
|
nsresult SetMedia(nsMediaList* aMedia);
|
2004-08-05 22:26:14 +04:00
|
|
|
|
2013-06-23 16:03:39 +04:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
2015-03-21 19:28:04 +03:00
|
|
|
const override MOZ_MUST_OVERRIDE;
|
2012-01-03 06:19:14 +04:00
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
protected:
|
2012-11-27 09:30:30 +04:00
|
|
|
void AppendConditionText(nsAString& aOutput);
|
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsMediaList> mMedia;
|
2004-08-05 22:26:14 +04:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class DocumentRule final : public GroupRule,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsIDOMCSSMozDocumentRule
|
2004-08-05 22:26:14 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
DocumentRule(uint32_t aLineNumber, uint32_t aColumnNumber);
|
2011-03-18 08:18:08 +03:00
|
|
|
private:
|
|
|
|
DocumentRule(const DocumentRule& aCopy);
|
|
|
|
~DocumentRule();
|
|
|
|
public:
|
2004-08-05 22:26:14 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
2004-08-05 22:26:14 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2004-08-05 22:26:14 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<Rule> Clone() const override;
|
|
|
|
virtual nsIDOMCSSRule* GetDOMRule() override
|
2008-10-22 18:31:14 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIDOMCSSRule* GetExistingDOMRule() override
|
2012-10-08 06:39:08 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2004-08-05 22:26:14 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
2012-11-27 09:30:30 +04:00
|
|
|
// nsIDOMCSSGroupingRule interface
|
|
|
|
NS_DECL_NSIDOMCSSGROUPINGRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSConditionRule interface
|
|
|
|
NS_DECL_NSIDOMCSSCONDITIONRULE
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
// nsIDOMCSSMozDocumentRule interface
|
|
|
|
NS_DECL_NSIDOMCSSMOZDOCUMENTRULE
|
|
|
|
|
2010-08-08 09:28:33 +04:00
|
|
|
// rest of GroupRule
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsMediaQueryResultCacheKey& aKey) override;
|
2004-08-05 22:26:14 +04:00
|
|
|
|
2015-06-26 06:52:47 +03:00
|
|
|
bool UseForPresentation(nsPresContext* aPresContext);
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
enum Function {
|
|
|
|
eURL,
|
|
|
|
eURLPrefix,
|
2011-04-28 21:21:37 +04:00
|
|
|
eDomain,
|
|
|
|
eRegExp
|
2004-08-05 22:26:14 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct URL {
|
2004-08-05 22:44:42 +04:00
|
|
|
Function func;
|
2004-08-05 22:26:14 +04:00
|
|
|
nsCString url;
|
|
|
|
URL *next;
|
|
|
|
|
2012-07-30 18:20:58 +04:00
|
|
|
URL() : next(nullptr) {}
|
2004-08-05 22:26:14 +04:00
|
|
|
URL(const URL& aOther)
|
|
|
|
: func(aOther.func)
|
|
|
|
, url(aOther.url)
|
2012-07-30 18:20:58 +04:00
|
|
|
, next(aOther.next ? new URL(*aOther.next) : nullptr)
|
2004-08-05 22:26:14 +04:00
|
|
|
{
|
|
|
|
}
|
2009-01-17 02:33:57 +03:00
|
|
|
~URL();
|
2004-08-05 22:26:14 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
void SetURLs(URL *aURLs) { mURLs = aURLs; }
|
|
|
|
|
2013-06-23 16:03:39 +04:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
2015-03-21 19:28:04 +03:00
|
|
|
const override MOZ_MUST_OVERRIDE;
|
2012-01-03 06:19:14 +04:00
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
protected:
|
2012-11-27 09:30:30 +04:00
|
|
|
void AppendConditionText(nsAString& aOutput);
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
nsAutoPtr<URL> mURLs; // linked list of |struct URL| above.
|
|
|
|
};
|
|
|
|
|
2011-03-18 08:18:08 +03:00
|
|
|
} // namespace css
|
2014-09-25 03:25:40 +04:00
|
|
|
|
|
|
|
struct CSSFontFaceDescriptors
|
|
|
|
{
|
|
|
|
#define CSS_FONT_DESC(name_, method_) nsCSSValue m##method_;
|
|
|
|
#include "nsCSSFontDescList.h"
|
|
|
|
#undef CSS_FONT_DESC
|
|
|
|
|
|
|
|
const nsCSSValue& Get(nsCSSFontDesc aFontDescID) const;
|
|
|
|
nsCSSValue& Get(nsCSSFontDesc aFontDescID);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static nsCSSValue CSSFontFaceDescriptors::* const Fields[];
|
|
|
|
};
|
|
|
|
|
2011-03-18 08:18:08 +03:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
// A nsCSSFontFaceStyleDecl is always embedded in a nsCSSFontFaceRule.
|
|
|
|
class nsCSSFontFaceRule;
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSFontFaceStyleDecl final : public nsICSSDeclaration
|
2008-08-08 03:15:40 +04:00
|
|
|
{
|
|
|
|
public:
|
2012-08-06 06:16:30 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2012-10-01 20:49:41 +04:00
|
|
|
NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER
|
2012-08-06 06:14:47 +04:00
|
|
|
NS_DECL_NSICSSDECLARATION
|
2012-10-01 20:49:41 +04:00
|
|
|
virtual already_AddRefed<mozilla::dom::CSSValue>
|
|
|
|
GetPropertyCSSValue(const nsAString& aProp, mozilla::ErrorResult& aRv)
|
2015-03-21 19:28:04 +03:00
|
|
|
override;
|
2012-10-01 20:49:41 +04:00
|
|
|
using nsICSSDeclaration::GetPropertyCSSValue;
|
2012-08-06 06:14:47 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsINode *GetParentObject() override;
|
|
|
|
virtual void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName) override;
|
2008-08-08 03:15:40 +04:00
|
|
|
|
|
|
|
nsresult GetPropertyValue(nsCSSFontDesc aFontDescID,
|
2012-07-07 00:14:07 +04:00
|
|
|
nsAString & aResult) const;
|
2008-08-08 03:15:40 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
|
2012-08-24 08:08:09 +04:00
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
~nsCSSFontFaceStyleDecl() {}
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
friend class nsCSSFontFaceRule;
|
|
|
|
|
|
|
|
inline nsCSSFontFaceRule* ContainingRule();
|
|
|
|
inline const nsCSSFontFaceRule* ContainingRule() const;
|
|
|
|
|
2014-09-25 03:25:40 +04:00
|
|
|
mozilla::CSSFontFaceDescriptors mDescriptors;
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
private:
|
|
|
|
// NOT TO BE IMPLEMENTED
|
|
|
|
// This object cannot be allocated on its own, only as part of
|
|
|
|
// nsCSSFontFaceRule.
|
|
|
|
void* operator new(size_t size) CPP_THROW_NEW;
|
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSFontFaceRule final : public mozilla::css::Rule,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsIDOMCSSFontFaceRule
|
2008-08-08 03:15:40 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
nsCSSFontFaceRule(uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::Rule(aLineNumber, aColumnNumber) {}
|
2010-10-07 08:25:47 +04:00
|
|
|
|
|
|
|
nsCSSFontFaceRule(const nsCSSFontFaceRule& aCopy)
|
|
|
|
// copy everything except our reference count
|
2011-03-07 06:59:03 +03:00
|
|
|
: mozilla::css::Rule(aCopy), mDecl(aCopy.mDecl) {}
|
2010-10-07 08:25:47 +04:00
|
|
|
|
2012-08-06 06:16:30 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSFontFaceRule,
|
|
|
|
mozilla::css::Rule)
|
2008-08-08 03:15:40 +04:00
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
2008-08-08 03:15:40 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2008-08-08 03:15:40 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2008-08-08 03:15:40 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSFontFaceRule interface
|
|
|
|
NS_DECL_NSIDOMCSSFONTFACERULE
|
|
|
|
|
|
|
|
void SetDesc(nsCSSFontDesc aDescID, nsCSSValue const & aValue);
|
|
|
|
void GetDesc(nsCSSFontDesc aDescID, nsCSSValue & aValue);
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-01-03 06:19:14 +04:00
|
|
|
|
2014-10-02 06:32:08 +04:00
|
|
|
void GetDescriptors(mozilla::CSSFontFaceDescriptors& aDescriptors) const
|
|
|
|
{ aDescriptors = mDecl.mDescriptors; }
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
~nsCSSFontFaceRule() {}
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
friend class nsCSSFontFaceStyleDecl;
|
|
|
|
nsCSSFontFaceStyleDecl mDecl;
|
|
|
|
};
|
|
|
|
|
2013-05-20 06:59:20 +04:00
|
|
|
// nsFontFaceRuleContainer - used for associating sheet type with
|
2008-11-27 06:50:16 +03:00
|
|
|
// specific @font-face rules
|
|
|
|
struct nsFontFaceRuleContainer {
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsCSSFontFaceRule> mRule;
|
2015-10-20 02:16:20 +03:00
|
|
|
mozilla::SheetType mSheetType;
|
2008-11-27 06:50:16 +03:00
|
|
|
};
|
|
|
|
|
2008-08-08 03:15:40 +04:00
|
|
|
inline nsCSSFontFaceRule*
|
|
|
|
nsCSSFontFaceStyleDecl::ContainingRule()
|
|
|
|
{
|
|
|
|
return reinterpret_cast<nsCSSFontFaceRule*>
|
|
|
|
(reinterpret_cast<char*>(this) - offsetof(nsCSSFontFaceRule, mDecl));
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const nsCSSFontFaceRule*
|
|
|
|
nsCSSFontFaceStyleDecl::ContainingRule() const
|
|
|
|
{
|
|
|
|
return reinterpret_cast<const nsCSSFontFaceRule*>
|
|
|
|
(reinterpret_cast<const char*>(this) - offsetof(nsCSSFontFaceRule, mDecl));
|
|
|
|
}
|
2004-08-05 22:26:14 +04:00
|
|
|
|
2015-03-27 21:52:19 +03:00
|
|
|
class nsCSSFontFeatureValuesRule final : public mozilla::css::Rule,
|
|
|
|
public nsIDOMCSSFontFeatureValuesRule
|
2013-05-20 06:59:20 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
nsCSSFontFeatureValuesRule(uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::Rule(aLineNumber, aColumnNumber) {}
|
2013-05-20 06:59:20 +04:00
|
|
|
|
|
|
|
nsCSSFontFeatureValuesRule(const nsCSSFontFeatureValuesRule& aCopy)
|
|
|
|
// copy everything except our reference count
|
|
|
|
: mozilla::css::Rule(aCopy),
|
|
|
|
mFamilyList(aCopy.mFamilyList),
|
|
|
|
mFeatureValues(aCopy.mFeatureValues) {}
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
2013-05-20 06:59:20 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2013-05-20 06:59:20 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2013-05-20 06:59:20 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSFontFaceRule interface
|
|
|
|
NS_DECL_NSIDOMCSSFONTFEATUREVALUESRULE
|
|
|
|
|
2014-06-06 10:09:23 +04:00
|
|
|
const mozilla::FontFamilyList& GetFamilyList() { return mFamilyList; }
|
|
|
|
void SetFamilyList(const mozilla::FontFamilyList& aFamilyList);
|
2013-05-20 06:59:20 +04:00
|
|
|
|
|
|
|
void AddValueList(int32_t aVariantAlternate,
|
|
|
|
nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList);
|
|
|
|
|
|
|
|
const nsTArray<gfxFontFeatureValueSet::FeatureValues>& GetFeatureValues()
|
|
|
|
{
|
|
|
|
return mFeatureValues;
|
|
|
|
}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2013-05-20 06:59:20 +04:00
|
|
|
|
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
~nsCSSFontFeatureValuesRule() {}
|
|
|
|
|
2014-06-06 10:09:23 +04:00
|
|
|
mozilla::FontFamilyList mFamilyList;
|
2013-05-20 06:59:20 +04:00
|
|
|
nsTArray<gfxFontFeatureValueSet::FeatureValues> mFeatureValues;
|
|
|
|
};
|
|
|
|
|
2011-04-12 10:18:43 +04:00
|
|
|
class nsCSSKeyframeRule;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSKeyframeStyleDeclaration final : public nsDOMCSSDeclaration
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsCSSKeyframeStyleDeclaration(nsCSSKeyframeRule *aRule);
|
2011-04-12 10:18:43 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
2012-07-30 18:20:58 +04:00
|
|
|
void DropReference() { mRule = nullptr; }
|
2016-11-03 06:41:02 +03:00
|
|
|
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
|
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
|
|
|
virtual nsIDocument* DocToUpdate() override;
|
2011-04-12 10:18:43 +04:00
|
|
|
|
2012-08-06 06:16:30 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSKeyframeStyleDeclaration,
|
|
|
|
nsICSSDeclaration)
|
2011-04-12 10:18:43 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsINode* GetParentObject() override;
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
virtual ~nsCSSKeyframeStyleDeclaration();
|
|
|
|
|
2011-04-12 10:18:43 +04:00
|
|
|
// This reference is not reference-counted. The rule object tells us
|
|
|
|
// when it's about to go away.
|
2015-06-16 15:12:00 +03:00
|
|
|
nsCSSKeyframeRule* MOZ_NON_OWNING_REF mRule;
|
2011-04-12 10:18:43 +04:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSKeyframeRule final : public mozilla::css::Rule,
|
2016-03-13 22:46:13 +03:00
|
|
|
public nsIDOMCSSKeyframeRule
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-11-21 09:30:54 +03:00
|
|
|
// Steals the contents of aKeys, and takes the reference in Declaration
|
2015-11-21 09:30:54 +03:00
|
|
|
nsCSSKeyframeRule(InfallibleTArray<float>&& aKeys,
|
2015-11-21 09:30:54 +03:00
|
|
|
already_AddRefed<mozilla::css::Declaration>&& aDeclaration,
|
2014-07-15 02:57:54 +04:00
|
|
|
uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::Rule(aLineNumber, aColumnNumber)
|
2015-11-21 09:30:54 +03:00
|
|
|
, mKeys(mozilla::Move(aKeys))
|
2015-11-21 09:30:54 +03:00
|
|
|
, mDeclaration(mozilla::Move(aDeclaration))
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
2015-11-05 11:44:08 +03:00
|
|
|
mDeclaration->SetOwningRule(this);
|
2011-04-12 10:18:43 +04:00
|
|
|
}
|
2011-04-08 05:23:46 +04:00
|
|
|
private:
|
2011-04-12 10:18:43 +04:00
|
|
|
nsCSSKeyframeRule(const nsCSSKeyframeRule& aCopy);
|
|
|
|
~nsCSSKeyframeRule();
|
2011-04-08 05:23:46 +04:00
|
|
|
public:
|
2013-01-19 08:32:12 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2015-11-05 11:44:10 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCSSKeyframeRule, mozilla::css::Rule)
|
2011-04-12 10:18:43 +04:00
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
2011-04-12 10:18:43 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2011-04-12 10:18:43 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
2016-03-13 22:46:13 +03:00
|
|
|
// nsIDOMCSSKeyframeRule interface
|
|
|
|
NS_DECL_NSIDOMCSSKEYFRAMERULE
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
const nsTArray<float>& GetKeys() const { return mKeys; }
|
|
|
|
mozilla::css::Declaration* Declaration() { return mDeclaration; }
|
|
|
|
|
|
|
|
void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-01-03 06:19:14 +04:00
|
|
|
|
2012-11-20 23:55:14 +04:00
|
|
|
void DoGetKeyText(nsAString &aKeyText) const;
|
|
|
|
|
2011-04-12 10:18:43 +04:00
|
|
|
private:
|
2012-11-29 20:14:14 +04:00
|
|
|
nsTArray<float> mKeys;
|
2015-11-05 11:44:08 +03:00
|
|
|
RefPtr<mozilla::css::Declaration> mDeclaration;
|
2011-04-12 10:18:43 +04:00
|
|
|
// lazily created when needed:
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsCSSKeyframeStyleDeclaration> mDOMDeclaration;
|
2011-04-12 10:18:43 +04:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSKeyframesRule final : public mozilla::css::GroupRule,
|
2016-03-13 22:46:13 +03:00
|
|
|
public nsIDOMCSSKeyframesRule
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
nsCSSKeyframesRule(const nsSubstring& aName,
|
|
|
|
uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::GroupRule(aLineNumber, aColumnNumber)
|
|
|
|
, mName(aName)
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
}
|
2011-04-08 05:23:46 +04:00
|
|
|
private:
|
2011-04-12 10:18:43 +04:00
|
|
|
nsCSSKeyframesRule(const nsCSSKeyframesRule& aCopy);
|
|
|
|
~nsCSSKeyframesRule();
|
2011-04-08 05:23:46 +04:00
|
|
|
public:
|
2011-04-12 10:18:43 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
2011-04-12 10:18:43 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2011-04-12 10:18:43 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
|
|
|
virtual nsIDOMCSSRule* GetDOMRule() override
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIDOMCSSRule* GetExistingDOMRule() override
|
2012-10-08 06:39:08 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
2016-03-13 22:46:13 +03:00
|
|
|
// nsIDOMCSSKeyframesRule interface
|
|
|
|
NS_DECL_NSIDOMCSSKEYFRAMESRULE
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
// rest of GroupRule
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsMediaQueryResultCacheKey& aKey) override;
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
const nsString& GetName() { return mName; }
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-01-03 06:19:14 +04:00
|
|
|
|
2011-04-12 10:18:43 +04:00
|
|
|
private:
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t FindRuleIndexForKey(const nsAString& aKey);
|
2011-04-12 10:18:43 +04:00
|
|
|
|
|
|
|
nsString mName;
|
|
|
|
};
|
|
|
|
|
2012-09-01 01:21:28 +04:00
|
|
|
class nsCSSPageRule;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSPageStyleDeclaration final : public nsDOMCSSDeclaration
|
2012-09-01 01:21:28 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsCSSPageStyleDeclaration(nsCSSPageRule *aRule);
|
2012-09-01 01:21:28 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
2012-09-01 01:21:28 +04:00
|
|
|
void DropReference() { mRule = nullptr; }
|
2016-11-03 06:41:02 +03:00
|
|
|
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
|
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
|
|
|
virtual nsIDocument* DocToUpdate() override;
|
2012-09-01 01:21:28 +04:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSPageStyleDeclaration,
|
|
|
|
nsICSSDeclaration)
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsINode *GetParentObject() override;
|
2012-09-01 01:21:28 +04:00
|
|
|
|
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
virtual ~nsCSSPageStyleDeclaration();
|
|
|
|
|
2012-09-01 01:21:28 +04:00
|
|
|
// This reference is not reference-counted. The rule object tells us
|
|
|
|
// when it's about to go away.
|
2015-06-16 15:12:00 +03:00
|
|
|
nsCSSPageRule* MOZ_NON_OWNING_REF mRule;
|
2012-09-01 01:21:28 +04:00
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSPageRule final : public mozilla::css::Rule,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsIDOMCSSPageRule
|
2012-09-01 01:21:28 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-11-05 11:44:08 +03:00
|
|
|
nsCSSPageRule(mozilla::css::Declaration* aDeclaration,
|
2014-07-15 02:57:54 +04:00
|
|
|
uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::Rule(aLineNumber, aColumnNumber)
|
2015-11-05 11:44:08 +03:00
|
|
|
, mDeclaration(aDeclaration)
|
2012-09-01 01:21:28 +04:00
|
|
|
{
|
2015-11-05 11:44:08 +03:00
|
|
|
mDeclaration->SetOwningRule(this);
|
2012-09-01 01:21:28 +04:00
|
|
|
}
|
|
|
|
private:
|
|
|
|
nsCSSPageRule(const nsCSSPageRule& aCopy);
|
|
|
|
~nsCSSPageRule();
|
|
|
|
public:
|
2013-06-14 02:13:13 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCSSPageRule, nsIDOMCSSPageRule)
|
2012-09-01 01:21:28 +04:00
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
2012-09-01 01:21:28 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2012-09-01 01:21:28 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2012-09-01 01:21:28 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSPageRule interface
|
|
|
|
NS_DECL_NSIDOMCSSPAGERULE
|
|
|
|
|
|
|
|
mozilla::css::Declaration* Declaration() { return mDeclaration; }
|
|
|
|
|
|
|
|
void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-09-01 01:21:28 +04:00
|
|
|
private:
|
2015-11-05 11:44:08 +03:00
|
|
|
RefPtr<mozilla::css::Declaration> mDeclaration;
|
2012-09-01 01:21:28 +04:00
|
|
|
// lazily created when needed:
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsCSSPageStyleDeclaration> mDOMDeclaration;
|
2012-09-01 01:21:28 +04:00
|
|
|
};
|
|
|
|
|
2012-08-02 04:32:12 +04:00
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class CSSSupportsRule : public css::GroupRule,
|
|
|
|
public nsIDOMCSSSupportsRule
|
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
CSSSupportsRule(bool aConditionMet, const nsString& aCondition,
|
|
|
|
uint32_t aLineNumber, uint32_t aColumnNumber);
|
2012-08-02 04:32:12 +04:00
|
|
|
CSSSupportsRule(const CSSSupportsRule& aCopy);
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
2012-08-02 04:32:12 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2012-08-02 04:32:12 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2012-08-02 04:32:12 +04:00
|
|
|
virtual bool UseForPresentation(nsPresContext* aPresContext,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsMediaQueryResultCacheKey& aKey) override;
|
|
|
|
virtual nsIDOMCSSRule* GetDOMRule() override
|
2012-08-02 04:32:12 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIDOMCSSRule* GetExistingDOMRule() override
|
2012-10-08 06:39:08 +04:00
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2012-08-02 04:32:12 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
2012-11-27 09:30:30 +04:00
|
|
|
// nsIDOMCSSGroupingRule interface
|
|
|
|
NS_DECL_NSIDOMCSSGROUPINGRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSConditionRule interface
|
|
|
|
NS_DECL_NSIDOMCSSCONDITIONRULE
|
|
|
|
|
2012-08-02 04:32:12 +04:00
|
|
|
// nsIDOMCSSSupportsRule interface
|
|
|
|
NS_DECL_NSIDOMCSSSUPPORTSRULE
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-08-02 04:32:12 +04:00
|
|
|
|
|
|
|
protected:
|
2014-07-09 01:23:18 +04:00
|
|
|
virtual ~CSSSupportsRule();
|
|
|
|
|
2012-08-02 04:32:12 +04:00
|
|
|
bool mUseGroup;
|
|
|
|
nsString mCondition;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsCSSCounterStyleRule final : public mozilla::css::Rule,
|
2015-03-27 21:52:19 +03:00
|
|
|
public nsIDOMCSSCounterStyleRule
|
2014-06-12 05:10:00 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-15 02:57:54 +04:00
|
|
|
explicit nsCSSCounterStyleRule(const nsAString& aName,
|
|
|
|
uint32_t aLineNumber, uint32_t aColumnNumber)
|
|
|
|
: mozilla::css::Rule(aLineNumber, aColumnNumber)
|
|
|
|
, mName(aName)
|
|
|
|
, mGeneration(0)
|
2014-06-12 05:10:00 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
nsCSSCounterStyleRule(const nsCSSCounterStyleRule& aCopy);
|
|
|
|
~nsCSSCounterStyleRule();
|
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2015-11-05 11:44:10 +03:00
|
|
|
// Rule methods
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
2014-06-12 05:10:00 +04:00
|
|
|
#ifdef DEBUG
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
|
2014-06-12 05:10:00 +04:00
|
|
|
#endif
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual int32_t GetType() const override;
|
|
|
|
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
|
2014-06-12 05:10:00 +04:00
|
|
|
|
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
|
|
|
|
|
|
|
// nsIDOMCSSCounterStyleRule
|
|
|
|
NS_DECL_NSIDOMCSSCOUNTERSTYLERULE
|
|
|
|
|
|
|
|
// This function is only used to check whether a non-empty value, which has
|
|
|
|
// been accepted by parser, is valid for the given system and descriptor.
|
|
|
|
static bool CheckDescValue(int32_t aSystem,
|
|
|
|
nsCSSCounterDesc aDescID,
|
|
|
|
const nsCSSValue& aValue);
|
|
|
|
|
|
|
|
const nsString& GetName() const { return mName; }
|
|
|
|
|
|
|
|
uint32_t GetGeneration() const { return mGeneration; }
|
|
|
|
|
|
|
|
int32_t GetSystem() const;
|
|
|
|
const nsCSSValue& GetSystemArgument() const;
|
|
|
|
|
|
|
|
const nsCSSValue& GetDesc(nsCSSCounterDesc aDescID) const
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(aDescID >= 0 && aDescID < eCSSCounterDesc_COUNT,
|
|
|
|
"descriptor ID out of range");
|
2014-06-12 05:10:00 +04:00
|
|
|
return mValues[aDescID];
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetDesc(nsCSSCounterDesc aDescID, const nsCSSValue& aValue);
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2014-06-12 05:10:00 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
typedef NS_STDCALL_FUNCPROTO(nsresult, Getter, nsCSSCounterStyleRule,
|
|
|
|
GetSymbols, (nsAString&));
|
|
|
|
static const Getter kGetters[];
|
|
|
|
|
|
|
|
nsresult GetDescriptor(nsCSSCounterDesc aDescID, nsAString& aValue);
|
|
|
|
nsresult SetDescriptor(nsCSSCounterDesc aDescID, const nsAString& aValue);
|
|
|
|
|
|
|
|
nsString mName;
|
|
|
|
nsCSSValue mValues[eCSSCounterDesc_COUNT];
|
|
|
|
uint32_t mGeneration;
|
|
|
|
};
|
|
|
|
|
2004-08-05 22:26:14 +04:00
|
|
|
#endif /* !defined(nsCSSRules_h_) */
|