Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 205033007: Revert of Oilpan: Move CSSStyleDeclaration and subclasses to the heap using transistion types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
index 502217985240bdc93104276ccccc8f5cf0499d2d..b948d36a1e1d7d1034c8288042b958d6e5cf9044 100644
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
@@ -125,7 +125,6 @@
} // namespace
-#if !ENABLE(OILPAN)
void PropertySetCSSStyleDeclaration::ref()
{
m_propertySet->ref();
@@ -134,13 +133,6 @@
void PropertySetCSSStyleDeclaration::deref()
{
m_propertySet->deref();
-}
-#endif
-
-void PropertySetCSSStyleDeclaration::trace(Visitor* visitor)
-{
- visitor->trace(m_propertySet);
- AbstractPropertySetCSSStyleDeclaration::trace(visitor);
}
unsigned AbstractPropertySetCSSStyleDeclaration::length() const
@@ -290,7 +282,7 @@
// 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<RawPtrWillBeMember<CSSValue>, RefPtrWillBeMember<CSSValue> >);
+ m_cssomCSSValueClones = adoptPtrWillBeNoop(new WillBeHeapHashMap<CSSValue*, RefPtrWillBeMember<CSSValue> >);
RefPtrWillBeMember<CSSValue>& clonedValue = m_cssomCSSValueClones->add(internalValue, RefPtrWillBeMember<CSSValue>()).storedValue->value;
if (!clonedValue)
@@ -314,33 +306,19 @@
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;
@@ -352,7 +330,6 @@
if (!--m_refCount)
delete this;
}
-#endif
void StyleRuleCSSStyleDeclaration::willMutate()
{
@@ -377,19 +354,9 @@
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
@@ -418,7 +385,6 @@
return m_parentElement ? &m_parentElement->document().elementSheet() : 0;
}
-#if !ENABLE(OILPAN)
void InlineCSSStyleDeclaration::ref()
{
m_parentElement->ref();
@@ -428,11 +394,5 @@
{
m_parentElement->deref();
}
-#endif
-
-void InlineCSSStyleDeclaration::trace(Visitor* visitor)
-{
- AbstractPropertySetCSSStyleDeclaration::trace(visitor);
-}
} // namespace WebCore
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698