#ifndef CSSImportRule_h
#define CSSImportRule_h
#include "core/css/CSSRule.h"
#include "heap/Handle.h"
namespace WebCore {
class CSSStyleSheetResource;
class MediaList;
class MediaQuerySet;
class StyleRuleImport;
class CSSImportRule FINAL : public CSSRule {
public:
static PassRefPtrWillBeRawPtr<CSSImportRule> create(StyleRuleImport* rule, CSSStyleSheet* sheet)
{
return adoptRefWillBeNoop(new CSSImportRule(rule, sheet));
}
virtual ~CSSImportRule();
virtual CSSRule::Type type() const OVERRIDE { return IMPORT_RULE; }
virtual String cssText() const OVERRIDE;
virtual void reattach(StyleRuleBase*) OVERRIDE;
String href() const;
MediaList* media() const;
CSSStyleSheet* styleSheet() const;
virtual void trace(Visitor*) OVERRIDE;
private:
CSSImportRule(StyleRuleImport*, CSSStyleSheet*);
RefPtrWillBeMember<StyleRuleImport> m_importRule;
mutable RefPtrWillBeMember<MediaList> m_mediaCSSOMWrapper;
mutable RefPtrWillBeMember<CSSStyleSheet> m_styleSheetCSSOMWrapper;
};
DEFINE_CSS_RULE_TYPE_CASTS(CSSImportRule, IMPORT_RULE);
}
#endif