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

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

Issue 20123003: [oilpan] The Node hierarchy should have correct accept method chains (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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/html/HTMLTemplateElement.h ('k') | Source/core/html/HTMLTextAreaElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTemplateElement.cpp
diff --git a/Source/core/html/HTMLTemplateElement.cpp b/Source/core/html/HTMLTemplateElement.cpp
index cec6015cc5dee720314fa3c9d90558fb6f79b717..907fc91382f7ef8243cf470c65d398d0a66a15a5 100644
--- a/Source/core/html/HTMLTemplateElement.cpp
+++ b/Source/core/html/HTMLTemplateElement.cpp
@@ -59,10 +59,11 @@ PassRefPtr<HTMLTemplateElement> HTMLTemplateElement::create(const QualifiedName&
DocumentFragment* HTMLTemplateElement::content() const
{
+ // FIXME(oilpan): Handlify TemplateContentDocumentFragment.
if (!m_content)
- m_content = TemplateContentDocumentFragment::create(document()->ensureTemplateDocument(), this);
+ m_content = adoptRawResult(TemplateContentDocumentFragment::create(document()->ensureTemplateDocument(), this).get());
- return m_content.get();
+ return Handle<DocumentFragment>(m_content).raw();
}
PassRefPtr<Node> HTMLTemplateElement::cloneNode(bool deep)
@@ -81,7 +82,7 @@ void HTMLTemplateElement::didMoveToNewDocument(Handle<Document> oldDocument)
HTMLElement::didMoveToNewDocument(oldDocument);
if (!m_content)
return;
- document()->ensureTemplateDocument()->adoptIfNeeded(m_content.get());
+ document()->ensureTemplateDocument()->adoptIfNeeded(Handle<DocumentFragment>(m_content).raw());
}
#ifndef NDEBUG
@@ -92,4 +93,10 @@ const HTMLTemplateElement* toHTMLTemplateElement(const Node* node)
}
#endif
+void HTMLTemplateElement::acceptHeapVisitor(Visitor* visitor) const
+{
+ visitor->visit(m_content);
+ HTMLElement::acceptHeapVisitor(visitor);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLTemplateElement.h ('k') | Source/core/html/HTMLTextAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698