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

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

Issue 48633006: Teach V8GCController how to traverse TemplateContentDocumentFragment::host (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add proper traversal for minor GC Created 7 years, 2 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/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index deb789d648f5c49cb255d46064bf1b09c6317e2b..4640e4fc62e28912c07ddf13643dddcfbf69b039 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1146,6 +1146,13 @@ Element* Node::parentOrShadowHostElement() const
return toElement(parent);
}
+ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const
+{
+ if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent())
+ return static_cast<const TemplateContentDocumentFragment*>(this)->host();
+ return parentOrShadowHostNode();
+}
+
bool Node::isBlockFlowElement() const
{
return isElementNode() && renderer() && renderer()->isRenderBlockFlow();

Powered by Google App Engine
This is Rietveld 408576698