summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/WebKitCSSViewportRule.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/WebKitCSSViewportRule.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/css/WebKitCSSViewportRule.cpp')
-rw-r--r--Source/WebCore/css/WebKitCSSViewportRule.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/WebCore/css/WebKitCSSViewportRule.cpp b/Source/WebCore/css/WebKitCSSViewportRule.cpp
index b1de93c24..cbd172f19 100644
--- a/Source/WebCore/css/WebKitCSSViewportRule.cpp
+++ b/Source/WebCore/css/WebKitCSSViewportRule.cpp
@@ -40,7 +40,7 @@
namespace WebCore {
-WebKitCSSViewportRule::WebKitCSSViewportRule(StyleRuleViewport* viewportRule, CSSStyleSheet* sheet)
+WebKitCSSViewportRule::WebKitCSSViewportRule(StyleRuleViewport& viewportRule, CSSStyleSheet* sheet)
: CSSRule(sheet)
, m_viewportRule(viewportRule)
{
@@ -52,12 +52,12 @@ WebKitCSSViewportRule::~WebKitCSSViewportRule()
m_propertiesCSSOMWrapper->clearParentRule();
}
-CSSStyleDeclaration* WebKitCSSViewportRule::style()
+CSSStyleDeclaration& WebKitCSSViewportRule::style()
{
if (!m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewportRule->mutableProperties(), *this);
- return m_propertiesCSSOMWrapper.get();
+ return *m_propertiesCSSOMWrapper;
}
String WebKitCSSViewportRule::cssText() const
@@ -75,11 +75,9 @@ String WebKitCSSViewportRule::cssText() const
return result.toString();
}
-void WebKitCSSViewportRule::reattach(StyleRuleBase* rule)
+void WebKitCSSViewportRule::reattach(StyleRuleBase& rule)
{
- ASSERT(rule);
- ASSERT_WITH_SECURITY_IMPLICATION(rule->isViewportRule());
- m_viewportRule = static_cast<StyleRuleViewport*>(rule);
+ m_viewportRule = downcast<StyleRuleViewport>(rule);
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->reattach(m_viewportRule->mutableProperties());