Wed, 31 Dec 2014 07:16:47 +0100
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 @import rules */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef mozilla_css_ImportRule_h__ |
michael@0 | 9 | #define mozilla_css_ImportRule_h__ |
michael@0 | 10 | |
michael@0 | 11 | #include "mozilla/Attributes.h" |
michael@0 | 12 | |
michael@0 | 13 | #include "mozilla/MemoryReporting.h" |
michael@0 | 14 | #include "mozilla/css/Rule.h" |
michael@0 | 15 | #include "nsIDOMCSSImportRule.h" |
michael@0 | 16 | #include "nsCSSRules.h" |
michael@0 | 17 | |
michael@0 | 18 | class nsMediaList; |
michael@0 | 19 | class nsString; |
michael@0 | 20 | |
michael@0 | 21 | namespace mozilla { |
michael@0 | 22 | namespace css { |
michael@0 | 23 | |
michael@0 | 24 | class ImportRule MOZ_FINAL : public Rule, |
michael@0 | 25 | public nsIDOMCSSImportRule |
michael@0 | 26 | { |
michael@0 | 27 | public: |
michael@0 | 28 | ImportRule(nsMediaList* aMedia, const nsString& aURLSpec); |
michael@0 | 29 | private: |
michael@0 | 30 | // for |Clone| |
michael@0 | 31 | ImportRule(const ImportRule& aCopy); |
michael@0 | 32 | ~ImportRule(); |
michael@0 | 33 | public: |
michael@0 | 34 | NS_DECL_ISUPPORTS |
michael@0 | 35 | |
michael@0 | 36 | DECL_STYLE_RULE_INHERIT |
michael@0 | 37 | |
michael@0 | 38 | #ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING |
michael@0 | 39 | using Rule::GetStyleSheet; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet |
michael@0 | 40 | #endif |
michael@0 | 41 | |
michael@0 | 42 | // nsIStyleRule methods |
michael@0 | 43 | #ifdef DEBUG |
michael@0 | 44 | virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE; |
michael@0 | 45 | #endif |
michael@0 | 46 | |
michael@0 | 47 | // Rule methods |
michael@0 | 48 | virtual int32_t GetType() const; |
michael@0 | 49 | virtual already_AddRefed<Rule> Clone() const; |
michael@0 | 50 | |
michael@0 | 51 | void SetSheet(nsCSSStyleSheet*); |
michael@0 | 52 | |
michael@0 | 53 | virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; |
michael@0 | 54 | |
michael@0 | 55 | // nsIDOMCSSRule interface |
michael@0 | 56 | NS_DECL_NSIDOMCSSRULE |
michael@0 | 57 | |
michael@0 | 58 | // nsIDOMCSSImportRule interface |
michael@0 | 59 | NS_DECL_NSIDOMCSSIMPORTRULE |
michael@0 | 60 | |
michael@0 | 61 | private: |
michael@0 | 62 | nsString mURLSpec; |
michael@0 | 63 | nsRefPtr<nsMediaList> mMedia; |
michael@0 | 64 | nsRefPtr<nsCSSStyleSheet> mChildSheet; |
michael@0 | 65 | }; |
michael@0 | 66 | |
michael@0 | 67 | } // namespace css |
michael@0 | 68 | } // namespace mozilla |
michael@0 | 69 | |
michael@0 | 70 | #endif /* mozilla_css_ImportRule_h__ */ |