2001-09-25 01:32:19 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-03-25 05:47:31 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
/* class for CSS @import rules */
|
2006-03-25 05:47:31 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
#ifndef mozilla_css_ImportRule_h__
|
|
|
|
#define mozilla_css_ImportRule_h__
|
1999-06-10 05:32:38 +00:00
|
|
|
|
2011-11-21 06:21:16 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
2011-04-08 01:23:46 +00:00
|
|
|
#include "mozilla/css/Rule.h"
|
2011-03-17 17:41:52 +00:00
|
|
|
#include "nsIDOMCSSImportRule.h"
|
|
|
|
#include "nsCSSRules.h"
|
1999-06-10 05:32:38 +00:00
|
|
|
|
2005-03-30 00:36:57 +00:00
|
|
|
class nsMediaList;
|
2010-05-20 02:28:00 +00:00
|
|
|
class nsString;
|
1999-06-10 05:32:38 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace css {
|
2010-05-20 02:28:00 +00:00
|
|
|
|
2011-11-21 06:21:16 +00:00
|
|
|
class ImportRule MOZ_FINAL : public Rule,
|
|
|
|
public nsIDOMCSSImportRule
|
2011-03-17 17:41:52 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-03-23 05:22:59 +00:00
|
|
|
ImportRule(nsMediaList* aMedia, const nsString& aURLSpec);
|
2011-03-17 17:41:52 +00:00
|
|
|
private:
|
|
|
|
// for |Clone|
|
|
|
|
ImportRule(const ImportRule& aCopy);
|
|
|
|
~ImportRule();
|
1999-06-10 05:32:38 +00:00
|
|
|
public:
|
2012-10-08 02:39:09 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
2011-03-17 17:41:52 +00:00
|
|
|
|
|
|
|
DECL_STYLE_RULE_INHERIT
|
|
|
|
|
2010-08-08 05:30:57 +00:00
|
|
|
#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING
|
2011-03-07 03:59:03 +00:00
|
|
|
using Rule::GetStyleSheet; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet
|
2010-08-08 05:30:57 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
// nsIStyleRule methods
|
|
|
|
#ifdef DEBUG
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const;
|
2011-03-17 17:41:52 +00:00
|
|
|
#endif
|
|
|
|
|
2011-04-08 01:23:46 +00:00
|
|
|
// Rule methods
|
2012-08-22 15:56:38 +00:00
|
|
|
virtual int32_t GetType() const;
|
2011-04-08 01:23:46 +00:00
|
|
|
virtual already_AddRefed<Rule> Clone() const;
|
2011-03-17 17:41:52 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
void SetSheet(nsCSSStyleSheet*);
|
1999-06-10 05:32:38 +00:00
|
|
|
|
2012-01-03 02:19:14 +00:00
|
|
|
virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
|
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
// nsIDOMCSSRule interface
|
|
|
|
NS_DECL_NSIDOMCSSRULE
|
1999-06-10 05:32:38 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
// nsIDOMCSSImportRule interface
|
|
|
|
NS_DECL_NSIDOMCSSIMPORTRULE
|
2001-08-04 21:19:53 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
private:
|
|
|
|
nsString mURLSpec;
|
|
|
|
nsRefPtr<nsMediaList> mMedia;
|
|
|
|
nsRefPtr<nsCSSStyleSheet> mChildSheet;
|
1999-06-10 05:32:38 +00:00
|
|
|
};
|
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
} // namespace css
|
|
|
|
} // namespace mozilla
|
2005-11-11 14:36:26 +00:00
|
|
|
|
2011-03-17 17:41:52 +00:00
|
|
|
#endif /* mozilla_css_ImportRule_h__ */
|