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

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

Issue 2463293003: Some speculation about making opaque root finding cheaper.
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698