diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/css/CSSFontFaceRule.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-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.cpp | 12 |
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()); } |