#ifndef CSSFontFaceRule_h
#define CSSFontFaceRule_h
#include "core/css/CSSRule.h"
#include "heap/Handle.h"
namespace WebCore {
class CSSStyleDeclaration;
class StyleRuleFontFace;
class StyleRuleCSSStyleDeclaration;
class CSSFontFaceRule FINAL : public CSSRule {
public:
static PassRefPtrWillBeRawPtr<CSSFontFaceRule> create(StyleRuleFontFace* rule, CSSStyleSheet* sheet)
{
return adoptRefWillBeNoop(new CSSFontFaceRule(rule, sheet));
}
virtual ~CSSFontFaceRule();
virtual CSSRule::Type type() const OVERRIDE { return FONT_FACE_RULE; }
virtual String cssText() const OVERRIDE;
virtual void reattach(StyleRuleBase*) OVERRIDE;
CSSStyleDeclaration* style() const;
StyleRuleFontFace* styleRule() const { return m_fontFaceRule.get(); }
virtual void trace(Visitor*) OVERRIDE;
private:
CSSFontFaceRule(StyleRuleFontFace*, CSSStyleSheet* parent);
RefPtrWillBeMember<StyleRuleFontFace> m_fontFaceRule;
mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper;
};
DEFINE_CSS_RULE_TYPE_CASTS(CSSFontFaceRule, FONT_FACE_RULE);
}
#endif