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/CSSPageRule.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Source/WebCore/css/CSSPageRule.cpp') diff --git a/Source/WebCore/css/CSSPageRule.cpp b/Source/WebCore/css/CSSPageRule.cpp index 4895e8b20..e1012b04c 100644 --- a/Source/WebCore/css/CSSPageRule.cpp +++ b/Source/WebCore/css/CSSPageRule.cpp @@ -29,12 +29,11 @@ #include "PropertySetCSSStyleDeclaration.h" #include "StyleProperties.h" #include "StyleRule.h" -#include #include namespace WebCore { -CSSPageRule::CSSPageRule(StyleRulePage* pageRule, CSSStyleSheet* parent) +CSSPageRule::CSSPageRule(StyleRulePage& pageRule, CSSStyleSheet* parent) : CSSRule(parent) , m_pageRule(pageRule) { @@ -46,11 +45,11 @@ CSSPageRule::~CSSPageRule() m_propertiesCSSOMWrapper->clearParentRule(); } -CSSStyleDeclaration* CSSPageRule::style() +CSSStyleDeclaration& CSSPageRule::style() { if (!m_propertiesCSSOMWrapper) m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_pageRule->mutableProperties(), *this); - return m_propertiesCSSOMWrapper.get(); + return *m_propertiesCSSOMWrapper; } String CSSPageRule::selectorText() const @@ -94,13 +93,11 @@ String CSSPageRule::cssText() const return result.toString(); } -void CSSPageRule::reattach(StyleRuleBase* rule) +void CSSPageRule::reattach(StyleRuleBase& rule) { - ASSERT(rule); - ASSERT_WITH_SECURITY_IMPLICATION(rule->isPageRule()); - m_pageRule = static_cast(rule); + m_pageRule = downcast(rule); if (m_propertiesCSSOMWrapper) - m_propertiesCSSOMWrapper->reattach(m_pageRule->mutableProperties()); + m_propertiesCSSOMWrapper->reattach(m_pageRule.get().mutableProperties()); } } // namespace WebCore -- cgit v1.2.1