summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSFontFaceRule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSFontFaceRule.cpp')
-rw-r--r--Source/WebCore/css/CSSFontFaceRule.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/WebCore/css/CSSFontFaceRule.cpp b/Source/WebCore/css/CSSFontFaceRule.cpp
index e5c2a5556..0dda1b2c5 100644
--- a/Source/WebCore/css/CSSFontFaceRule.cpp
+++ b/Source/WebCore/css/CSSFontFaceRule.cpp
@@ -29,7 +29,7 @@
namespace WebCore {
-CSSFontFaceRule::CSSFontFaceRule(StyleRuleFontFace* fontFaceRule, CSSStyleSheet* parent)
+CSSFontFaceRule::CSSFontFaceRule(StyleRuleFontFace& fontFaceRule, CSSStyleSheet* parent)
: CSSRule(parent)
, m_fontFaceRule(fontFaceRule)
{
@@ -41,11 +41,11 @@ CSSFontFaceRule::~CSSFontFaceRule()
m_propertiesCSSOMWrapper->clearParentRule();
}
-CSSStyleDeclaration* CSSFontFaceRule::style()
+CSSStyleDeclaration& CSSFontFaceRule::style()
{
if (!m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_fontFaceRule->mutableProperties(), *this);
- return m_propertiesCSSOMWrapper.get();
+ return *m_propertiesCSSOMWrapper;
}
String CSSFontFaceRule::cssText() const
@@ -60,11 +60,9 @@ String CSSFontFaceRule::cssText() const
return result.toString();
}
-void CSSFontFaceRule::reattach(StyleRuleBase* rule)
+void CSSFontFaceRule::reattach(StyleRuleBase& rule)
{
- ASSERT(rule);
- ASSERT_WITH_SECURITY_IMPLICATION(rule->isFontFaceRule());
- m_fontFaceRule = static_cast<StyleRuleFontFace*>(rule);
+ m_fontFaceRule = downcast<StyleRuleFontFace>(rule);
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties());
}