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

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: Patch for landing 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
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/TemplateContentDocumentFragment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 8fdeee786c6043a4c3e045666c81a7e887394d20..e08d54e55da2f5c90cd28f11b6e491676b43b89a 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1140,6 +1140,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();
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/TemplateContentDocumentFragment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698