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 @import rules */
8 #ifndef mozilla_css_ImportRule_h__
9 #define mozilla_css_ImportRule_h__
11 #include "mozilla/Attributes.h"
13 #include "mozilla/css/Rule.h"
14 #include "nsIDOMCSSImportRule.h"
15 #include "nsCSSRules.h"
23 class ImportRule MOZ_FINAL
: public Rule
,
24 public nsIDOMCSSImportRule
27 ImportRule(nsMediaList
* aMedia
, const nsString
& aURLSpec
);
30 ImportRule(const ImportRule
& aCopy
);
35 DECL_STYLE_RULE_INHERIT
37 #ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING
38 using Rule::GetStyleSheet
; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet
41 // nsIStyleRule methods
43 virtual void List(FILE* out
= stdout
, int32_t aIndent
= 0) const;
47 virtual int32_t GetType() const;
48 virtual already_AddRefed
<Rule
> Clone() const;
50 void SetSheet(nsCSSStyleSheet
*);
52 virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf
) const;
54 // nsIDOMCSSRule interface
57 // nsIDOMCSSImportRule interface
58 NS_DECL_NSIDOMCSSIMPORTRULE
62 nsRefPtr
<nsMediaList
> mMedia
;
63 nsRefPtr
<nsCSSStyleSheet
> mChildSheet
;
67 } // namespace mozilla
69 #endif /* mozilla_css_ImportRule_h__ */