From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/css/CSSFontFaceRule.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Source/WebCore/css/CSSFontFaceRule.cpp') 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(rule); + m_fontFaceRule = downcast(rule); if (m_propertiesCSSOMWrapper) m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties()); } -- cgit v1.2.1