summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSStyleRule.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:09:45 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:10:13 +0100
commit470286ecfe79d59df14944e5b5d34630fc739391 (patch)
tree43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/css/CSSStyleRule.cpp
parent23037105e948c2065da5a937d3a2396b0ff45c1e (diff)
downloadqtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/css/CSSStyleRule.cpp')
-rw-r--r--Source/WebCore/css/CSSStyleRule.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/WebCore/css/CSSStyleRule.cpp b/Source/WebCore/css/CSSStyleRule.cpp
index 1b3987146..12e37e3b5 100644
--- a/Source/WebCore/css/CSSStyleRule.cpp
+++ b/Source/WebCore/css/CSSStyleRule.cpp
@@ -1,7 +1,7 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
* (C) 2002-2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -42,7 +42,7 @@ static SelectorTextCache& selectorTextCache()
}
CSSStyleRule::CSSStyleRule(StyleRule* styleRule, CSSStyleSheet* parent)
- : CSSRule(parent, CSSRule::STYLE_RULE)
+ : CSSRule(parent)
, m_styleRule(styleRule)
{
}
@@ -122,17 +122,19 @@ String CSSStyleRule::cssText() const
return result.toString();
}
-void CSSStyleRule::reattach(StyleRule* rule)
+void CSSStyleRule::reattach(StyleRuleBase* rule)
{
- m_styleRule = rule;
+ ASSERT(rule);
+ ASSERT(rule->isStyleRule());
+ m_styleRule = static_cast<StyleRule*>(rule);
if (m_propertiesCSSOMWrapper)
m_propertiesCSSOMWrapper->reattach(m_styleRule->mutableProperties());
}
-void CSSStyleRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+void CSSStyleRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
- CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
+ CSSRule::reportMemoryUsage(memoryObjectInfo);
info.addMember(m_styleRule);
info.addMember(m_propertiesCSSOMWrapper);
}