#include "core/css/StyleRule.h"
#include "wtf/text/StringBuilder.h"
-namespace WebCore {
+namespace blink {
CSSFontFaceRule::CSSFontFaceRule(StyleRuleFontFace* fontFaceRule, CSSStyleSheet* parent)
: CSSRule(parent)
CSSFontFaceRule::~CSSFontFaceRule()
{
+#if !ENABLE(OILPAN)
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->clearParentRule();
+#endif
}
CSSStyleDeclaration* CSSFontFaceRule::style() const
{
StringBuilder result;
result.appendLiteral("@font-face { ");
- String descs = m_fontFaceRule->properties()->asText();
+ String descs = m_fontFaceRule->properties().asText();
result.append(descs);
if (!descs.isEmpty())
result.append(' ');
void CSSFontFaceRule::reattach(StyleRuleBase* rule)
{
ASSERT(rule);
- ASSERT_WITH_SECURITY_IMPLICATION(rule->isFontFaceRule());
- m_fontFaceRule = static_cast<StyleRuleFontFace*>(rule);
+ m_fontFaceRule = toStyleRuleFontFace(rule);
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties());
}
-} // namespace WebCore
+void CSSFontFaceRule::trace(Visitor* visitor)
+{
+ visitor->trace(m_fontFaceRule);
+ visitor->trace(m_propertiesCSSOMWrapper);
+ CSSRule::trace(visitor);
+}
+
+} // namespace blink