summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSFontFaceRule.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSFontFaceRule.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
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());
}