layout/style/NameSpaceRule.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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

mercurial