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

Unified Diff: Source/core/dom/Element.cpp

Issue 273843003: [Oilpan]: Make StylePropertySet fully garbage collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review feedback Created 6 years, 6 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/dom/Element.h ('k') | Source/core/dom/ElementData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index da33f26b5e37b125e42942e8c6ab43d2684a74a3..9ec213c606aa506121cb590092f92ff5ae8d8ab1 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -3136,7 +3136,7 @@ CSSStyleDeclaration* Element::style()
MutableStylePropertySet& Element::ensureMutableInlineStyle()
{
ASSERT(isStyledElement());
- RefPtr<StylePropertySet>& inlineStyle = ensureUniqueElementData().m_inlineStyle;
+ RefPtrWillBeMember<StylePropertySet>& inlineStyle = ensureUniqueElementData().m_inlineStyle;
if (!inlineStyle) {
CSSParserMode mode = (!isHTMLElement() || document().inQuirksMode()) ? HTMLQuirksMode : HTMLStandardMode;
inlineStyle = MutableStylePropertySet::create(mode);
@@ -3156,7 +3156,7 @@ void Element::clearMutableInlineStyleIfEmpty()
inline void Element::setInlineStyleFromString(const AtomicString& newStyleString)
{
ASSERT(isStyledElement());
- RefPtr<StylePropertySet>& inlineStyle = elementData()->m_inlineStyle;
+ RefPtrWillBeMember<StylePropertySet>& inlineStyle = elementData()->m_inlineStyle;
// Avoid redundant work if we're using shared attribute data with already parsed inline style.
if (inlineStyle && !elementData()->isUnique())
@@ -3171,7 +3171,7 @@ inline void Element::setInlineStyleFromString(const AtomicString& newStyleString
inlineStyle = BisonCSSParser::parseInlineStyleDeclaration(newStyleString, this);
} else {
ASSERT(inlineStyle->isMutable());
- static_pointer_cast<MutableStylePropertySet>(inlineStyle)->parseDeclaration(newStyleString, document().elementSheet().contents());
+ static_cast<MutableStylePropertySet*>(inlineStyle.get())->parseDeclaration(newStyleString, document().elementSheet().contents());
}
}
@@ -3326,7 +3326,7 @@ void Element::trace(Visitor* visitor)
{
if (hasRareData())
visitor->trace(elementRareData());
-
+ visitor->trace(m_elementData);
ContainerNode::trace(visitor);
}
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698