Bumping manifests a=b2g-bump
[gecko.git] / layout / style / NameSpaceRule.h
blob21b5f30ca07f5b5695dc2d16f076adf4ece033af
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* class for CSS @namespace rules */
8 #ifndef mozilla_css_NameSpaceRule_h__
9 #define mozilla_css_NameSpaceRule_h__
11 #include "mozilla/Attributes.h"
12 #include "mozilla/MemoryReporting.h"
13 #include "mozilla/css/Rule.h"
15 #include "nsIDOMCSSRule.h"
17 class nsIAtom;
19 // IID for the NameSpaceRule class {f0b0dbe1-5031-4a21-b06a-dc141ef2af98}
20 #define NS_CSS_NAMESPACE_RULE_IMPL_CID \
21 {0xf0b0dbe1, 0x5031, 0x4a21, {0xb0, 0x6a, 0xdc, 0x14, 0x1e, 0xf2, 0xaf, 0x98}}
24 namespace mozilla {
25 namespace css {
27 class NameSpaceRule MOZ_FINAL : public Rule,
28 public nsIDOMCSSRule
30 public:
31 NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec,
32 uint32_t aLineNumber, uint32_t aColumnNumber);
33 private:
34 // for |Clone|
35 NameSpaceRule(const NameSpaceRule& aCopy);
36 ~NameSpaceRule();
37 public:
38 NS_DECLARE_STATIC_IID_ACCESSOR(NS_CSS_NAMESPACE_RULE_IMPL_CID)
40 NS_DECL_ISUPPORTS
42 DECL_STYLE_RULE_INHERIT
44 // nsIStyleRule methods
45 #ifdef DEBUG
46 virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
47 #endif
49 // Rule methods
50 virtual int32_t GetType() const;
51 virtual already_AddRefed<Rule> Clone() const;
53 nsIAtom* GetPrefix() const { return mPrefix; }
55 void GetURLSpec(nsString& aURLSpec) const { aURLSpec = mURLSpec; }
57 virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
58 MOZ_MUST_OVERRIDE;
60 // nsIDOMCSSRule interface
61 NS_DECL_NSIDOMCSSRULE
63 private:
64 nsCOMPtr<nsIAtom> mPrefix;
65 nsString mURLSpec;
68 NS_DEFINE_STATIC_IID_ACCESSOR(NameSpaceRule, NS_CSS_NAMESPACE_RULE_IMPL_CID)
70 } // namespace css
71 } // namespace mozilla
73 #endif /* mozilla_css_NameSpaceRule_h__ */