| Index: third_party/WebKit/Source/core/dom/Node.h
|
| diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
|
| index 14569362b0753e5e501033b88e80017145519c2a..f251527d92de4ecc0a08c5d80ef4e340618a87ea 100644
|
| --- a/third_party/WebKit/Source/core/dom/Node.h
|
| +++ b/third_party/WebKit/Source/core/dom/Node.h
|
| @@ -333,7 +333,13 @@ class CORE_EXPORT Node : public EventTarget {
|
| void setParentOrShadowHostNode(ContainerNode*);
|
|
|
| // Knows about all kinds of hosts.
|
| - ContainerNode* parentOrShadowHostOrTemplateHostNode() const;
|
| + ContainerNode* parentOrShadowHostOrTemplateHostNode() const {
|
| + if (UNLIKELY(isDocumentFragment() && !isShadowRoot()))
|
| + return parentOrShadowHostOrTemplateHostNodeForDocumentFragment();
|
| + return parentOrShadowHostNode();
|
| + }
|
| + ContainerNode* parentOrShadowHostOrTemplateHostNodeForDocumentFragment()
|
| + const;
|
|
|
| // Returns the parent node, but nullptr if the parent node is a ShadowRoot.
|
| ContainerNode* nonShadowBoundaryParentNode() const;
|
|
|