Index: third_party/WebKit/Source/core/dom/Node.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp |
index 8983f821c4c68e0a9ee2ade29d6467b4f949a659..ab040f51bcd7f8f8fcd1c8904416013606a5f61a 100644 |
--- a/third_party/WebKit/Source/core/dom/Node.cpp |
+++ b/third_party/WebKit/Source/core/dom/Node.cpp |
@@ -1086,8 +1086,10 @@ Element* Node::parentOrShadowHostElement() const { |
return toElement(parent); |
} |
-ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const { |
- if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent()) |
+ContainerNode* Node::parentOrShadowHostOrTemplateHostNodeForDocumentFragment() |
+ const { |
+ DCHECK(isDocumentFragment() && !isShadowRoot()); |
+ if (toDocumentFragment(this)->isTemplateContent()) |
return static_cast<const TemplateContentDocumentFragment*>(this)->host(); |
return parentOrShadowHostNode(); |
} |