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

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

Issue 59113007: Utilize PassRefPtr and C++ refs in more places in ShadowRoot code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make win build happier Created 7 years, 1 month 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/HTMLDetailsElement.cpp
diff --git a/Source/core/html/HTMLDetailsElement.cpp b/Source/core/html/HTMLDetailsElement.cpp
index b0ee16b0373e21db3643fe10996b74cc64a81048..80aaba8841ee8f5594a88c3703150ad40592f1b7 100644
--- a/Source/core/html/HTMLDetailsElement.cpp
+++ b/Source/core/html/HTMLDetailsElement.cpp
@@ -54,7 +54,7 @@ RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*)
return new RenderBlockFlow(this);
}
-void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
+void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot& root)
{
DEFINE_STATIC_LOCAL(AtomicString, summarySelector, ("summary:first-of-type", AtomicString::ConstructFromLiteral));
@@ -65,8 +65,8 @@ void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
content->setAttribute(selectAttr, summarySelector);
content->appendChild(defaultSummary);
- root->appendChild(content);
- root->appendChild(HTMLContentElement::create(document()));
+ root.appendChild(content.release());
+ root.appendChild(HTMLContentElement::create(document()));
}
Element* HTMLDetailsElement::findMainSummary() const

Powered by Google App Engine
This is Rietveld 408576698