#ifndef CSSPageRule_h
#define CSSPageRule_h
#include "core/css/CSSRule.h"
#include "heap/Handle.h"
namespace WebCore {
class CSSStyleDeclaration;
class CSSStyleSheet;
class StyleRulePage;
class StyleRuleCSSStyleDeclaration;
class CSSPageRule FINAL : public CSSRule {
public:
static PassRefPtrWillBeRawPtr<CSSPageRule> create(StyleRulePage* rule, CSSStyleSheet* sheet)
{
return adoptRefWillBeNoop(new CSSPageRule(rule, sheet));
}
virtual ~CSSPageRule();
virtual CSSRule::Type type() const OVERRIDE { return PAGE_RULE; }
virtual String cssText() const OVERRIDE;
virtual void reattach(StyleRuleBase*) OVERRIDE;
CSSStyleDeclaration* style() const;
String selectorText() const;
void setSelectorText(const String&);
virtual void trace(Visitor*) OVERRIDE;
private:
CSSPageRule(StyleRulePage*, CSSStyleSheet*);
RefPtrWillBeMember<StyleRulePage> m_pageRule;
mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper;
};
DEFINE_CSS_RULE_TYPE_CASTS(CSSPageRule, PAGE_RULE);
}
#endif