Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp |
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp |
index b948d36a1e1d7d1034c8288042b958d6e5cf9044..502217985240bdc93104276ccccc8f5cf0499d2d 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 |
{ |
@@ -282,7 +290,7 @@ CSSValue* AbstractPropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM(CSSValue |
// The map is here to maintain the object identity of the CSSValues over multiple invocations. |
// FIXME: It is likely that the identity is not important for web compatibility and this code should be removed. |
if (!m_cssomCSSValueClones) |
- m_cssomCSSValueClones = adoptPtrWillBeNoop(new WillBeHeapHashMap<CSSValue*, RefPtrWillBeMember<CSSValue> >); |
+ m_cssomCSSValueClones = adoptPtrWillBeNoop(new WillBeHeapHashMap<RawPtrWillBeMember<CSSValue>, RefPtrWillBeMember<CSSValue> >); |
RefPtrWillBeMember<CSSValue>& clonedValue = m_cssomCSSValueClones->add(internalValue, RefPtrWillBeMember<CSSValue>()).storedValue->value; |
if (!clonedValue) |
@@ -306,19 +314,33 @@ bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr |
return propertySet().propertyMatches(propertyID, propertyValue); |
} |
+void AbstractPropertySetCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+#if ENABLE(OILPAN) |
+ visitor->trace(m_cssomCSSValueClones); |
+#endif |
+} |
+ |
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 +352,7 @@ void StyleRuleCSSStyleDeclaration::deref() |
if (!--m_refCount) |
delete this; |
} |
+#endif |
void StyleRuleCSSStyleDeclaration::willMutate() |
{ |
@@ -354,9 +377,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 +418,7 @@ CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const |
return m_parentElement ? &m_parentElement->document().elementSheet() : 0; |
} |
+#if !ENABLE(OILPAN) |
void InlineCSSStyleDeclaration::ref() |
{ |
m_parentElement->ref(); |
@@ -394,5 +428,11 @@ void InlineCSSStyleDeclaration::deref() |
{ |
m_parentElement->deref(); |
} |
+#endif |
+ |
+void InlineCSSStyleDeclaration::trace(Visitor* visitor) |
+{ |
+ AbstractPropertySetCSSStyleDeclaration::trace(visitor); |
+} |
} // namespace WebCore |