diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSPageRule.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/css/CSSPageRule.cpp')
-rw-r--r-- | Source/WebCore/css/CSSPageRule.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
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 <wtf/Vector.h> #include <wtf/text/StringBuilder.h> 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<StyleRulePage*>(rule); + m_pageRule = downcast<StyleRulePage>(rule); if (m_propertiesCSSOMWrapper) - m_propertiesCSSOMWrapper->reattach(m_pageRule->mutableProperties()); + m_propertiesCSSOMWrapper->reattach(m_pageRule.get().mutableProperties()); } } // namespace WebCore |