Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp |
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
index b948d36a1e1d7d1034c8288042b958d6e5cf9044..4029f62bc2c312cc228a9284ed0c684260cd923d 100644 |
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
@@ -125,6 +125,7 @@ bool StyleAttributeMutationScope::s_shouldDeliver = false; |
} // namespace |
+#if !ENABLE(OILPAN) |
void PropertySetCSSStyleDeclaration::ref() |
{ |
m_propertySet->ref(); |
@@ -134,6 +135,13 @@ void PropertySetCSSStyleDeclaration::deref() |
{ |
m_propertySet->deref(); |
} |
+#endif |
+ |
+void PropertySetCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_propertySet); |
+ AbstractPropertySetCSSStyleDeclaration::trace(visitor); |
+} |
unsigned AbstractPropertySetCSSStyleDeclaration::length() const |
{ |
@@ -306,19 +314,39 @@ bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr |
return propertySet().propertyMatches(propertyID, propertyValue); |
} |
+void AbstractPropertySetCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+#if ENABLE(OILPAN) |
+ // We don't support tracing OwnPtr<HashMap<X, Y> > since the hashmaps trace |
haraken
2014/03/20 11:22:38
FIXME: oilpan:
Or you can just drop this comment.
wibling-chromium
2014/03/20 11:59:33
Removed the comment.
|
+ // method expects a DefaultDummyVisitor in non-oilpan mode, but is passed a |
+ // WebCore::Visitor. We could fix this by forward declarding the |
+ // WebCore::Visitor in wtf, but that is not worth it unless this becomes a |
+ // common issue. |
+ visitor->trace(m_cssomCSSValueClones); |
+#endif |
+ CSSStyleDeclaration::trace(visitor); |
+} |
+ |
StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration(MutableStylePropertySet& propertySetArg, CSSRule* parentRule) |
: PropertySetCSSStyleDeclaration(propertySetArg) |
+#if !ENABLE(OILPAN) |
, m_refCount(1) |
+#endif |
, m_parentRule(parentRule) |
{ |
+#if !ENABLE(OILPAN) |
m_propertySet->ref(); |
+#endif |
} |
StyleRuleCSSStyleDeclaration::~StyleRuleCSSStyleDeclaration() |
{ |
+#if !ENABLE(OILPAN) |
m_propertySet->deref(); |
+#endif |
} |
+#if !ENABLE(OILPAN) |
void StyleRuleCSSStyleDeclaration::ref() |
{ |
++m_refCount; |
@@ -330,6 +358,7 @@ void StyleRuleCSSStyleDeclaration::deref() |
if (!--m_refCount) |
delete this; |
} |
+#endif |
void StyleRuleCSSStyleDeclaration::willMutate() |
{ |
@@ -354,9 +383,19 @@ CSSStyleSheet* StyleRuleCSSStyleDeclaration::parentStyleSheet() const |
void StyleRuleCSSStyleDeclaration::reattach(MutableStylePropertySet& propertySet) |
{ |
+#if !ENABLE(OILPAN) |
m_propertySet->deref(); |
+#endif |
m_propertySet = &propertySet; |
+#if !ENABLE(OILPAN) |
m_propertySet->ref(); |
+#endif |
+} |
+ |
+void StyleRuleCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_parentRule); |
+ PropertySetCSSStyleDeclaration::trace(visitor); |
} |
MutableStylePropertySet& InlineCSSStyleDeclaration::propertySet() const |
@@ -385,6 +424,7 @@ CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const |
return m_parentElement ? &m_parentElement->document().elementSheet() : 0; |
} |
+#if !ENABLE(OILPAN) |
void InlineCSSStyleDeclaration::ref() |
{ |
m_parentElement->ref(); |
@@ -394,5 +434,11 @@ void InlineCSSStyleDeclaration::deref() |
{ |
m_parentElement->deref(); |
} |
+#endif |
+ |
+void InlineCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+ AbstractPropertySetCSSStyleDeclaration::trace(visitor); |
+} |
} // namespace WebCore |