summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSFontFaceRule.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/css/CSSFontFaceRule.cpp
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/css/CSSFontFaceRule.cpp')
-rw-r--r--Source/WebCore/css/CSSFontFaceRule.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/WebCore/css/CSSFontFaceRule.cpp b/Source/WebCore/css/CSSFontFaceRule.cpp
index 0dda1b2c5..e5c2a5556 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;
+ return m_propertiesCSSOMWrapper.get();
}
String CSSFontFaceRule::cssText() const
@@ -60,9 +60,11 @@ String CSSFontFaceRule::cssText() const
return result.toString();
}
-void CSSFontFaceRule::reattach(StyleRuleBase& rule)
+void CSSFontFaceRule::reattach(StyleRuleBase* rule)
{
- m_fontFaceRule = downcast<StyleRuleFontFace>(rule);
+ ASSERT(rule);
+ ASSERT_WITH_SECURITY_IMPLICATION(rule->isFontFaceRule());
+ m_fontFaceRule = static_cast<StyleRuleFontFace*>(rule);
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties());
}