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

Unified Diff: Source/core/html/HTMLTableElement.cpp

Issue 273843003: [Oilpan]: Make StylePropertySet fully garbage collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/html/HTMLTableElement.cpp
diff --git a/Source/core/html/HTMLTableElement.cpp b/Source/core/html/HTMLTableElement.cpp
index 843895448f98339f6493e816aefa76147177bb95..728eb30ed0fff4fc6c487b3c19568194d8a252ac 100644
--- a/Source/core/html/HTMLTableElement.cpp
+++ b/Source/core/html/HTMLTableElement.cpp
@@ -410,7 +410,7 @@ void HTMLTableElement::parseAttribute(const QualifiedName& name, const AtomicStr
}
}
-static PassRefPtr<StylePropertySet> createBorderStyle(CSSValueID value)
+static PassRefPtrWillBeRawPtr<StylePropertySet> createBorderStyle(CSSValueID value)
{
RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create();
style->setProperty(CSSPropertyBorderTopStyle, value);
@@ -429,17 +429,17 @@ const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle()
// Setting the border to 'hidden' allows it to win over any border
// set on the table's cells during border-conflict resolution.
if (m_rulesAttr != UnsetRules) {
- DEFINE_STATIC_REF(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueHidden)));
+ DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueHidden)));
return solidBorderStyle;
}
return 0;
}
if (m_borderColorAttr) {
- DEFINE_STATIC_REF(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid)));
+ DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid)));
return solidBorderStyle;
}
- DEFINE_STATIC_REF(StylePropertySet, outsetBorderStyle, (createBorderStyle(CSSValueOutset)));
+ DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, outsetBorderStyle, (createBorderStyle(CSSValueOutset)));
return outsetBorderStyle;
}
@@ -536,10 +536,18 @@ const StylePropertySet* HTMLTableElement::additionalGroupStyle(bool rows)
return 0;
if (rows) {
+#if ENABLE(OILPAN)
+ DEFINE_STATIC_LOCAL(Persistent<StylePropertySet>, rowBorderStyle, (createGroupBorderStyle(true)));
haraken 2014/05/08 11:43:45 Can you use DEFINE_STATIC_REF_WILL_BE_PERSISTENT?
wibling-chromium 2014/05/08 12:38:55 Done.
+#else
DEFINE_STATIC_REF(StylePropertySet, rowBorderStyle, (createGroupBorderStyle(true)));
+#endif
return rowBorderStyle;
}
+#if ENABLE(OILPAN)
+ DEFINE_STATIC_LOCAL(Persistent<StylePropertySet>, columnBorderStyle, (createGroupBorderStyle(false)));
haraken 2014/05/08 11:43:45 Ditto.
wibling-chromium 2014/05/08 12:38:55 Done.
+#else
DEFINE_STATIC_REF(StylePropertySet, columnBorderStyle, (createGroupBorderStyle(false)));
+#endif
return columnBorderStyle;
}
« Source/core/dom/PresentationAttributeStyle.cpp ('K') | « Source/core/editing/EditingStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698