Bug 867089 - Validate the playbackRate before using it. r=ehsan
[gecko.git] / layout / style / ImportRule.h
blob90f9b0d9f7adfd72088a431fb295bb65a17591b5
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"
17 class nsMediaList;
18 class nsString;
20 namespace mozilla {
21 namespace css {
23 class ImportRule MOZ_FINAL : public Rule,
24 public nsIDOMCSSImportRule
26 public:
27 ImportRule(nsMediaList* aMedia, const nsString& aURLSpec);
28 private:
29 // for |Clone|
30 ImportRule(const ImportRule& aCopy);
31 ~ImportRule();
32 public:
33 NS_DECL_ISUPPORTS
35 DECL_STYLE_RULE_INHERIT
37 #ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING
38 using Rule::GetStyleSheet; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet
39 #endif
41 // nsIStyleRule methods
42 #ifdef DEBUG
43 virtual void List(FILE* out = stdout, int32_t aIndent = 0) const;
44 #endif
46 // Rule methods
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
55 NS_DECL_NSIDOMCSSRULE
57 // nsIDOMCSSImportRule interface
58 NS_DECL_NSIDOMCSSIMPORTRULE
60 private:
61 nsString mURLSpec;
62 nsRefPtr<nsMediaList> mMedia;
63 nsRefPtr<nsCSSStyleSheet> mChildSheet;
66 } // namespace css
67 } // namespace mozilla
69 #endif /* mozilla_css_ImportRule_h__ */