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

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

Issue 2170793002: Add Node.getRootNode(options) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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: 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 5bc034fe69b6bc638690d634e74029c7670b5ca6..28a623747acec09a863d8a19dbfe368e15c3ce96 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -381,6 +381,11 @@ Node& Node::treeRoot() const
return const_cast<Node&>(*node);
}
+Node* Node::getRootNode(const GetRootNodeOptions& options) const
+{
+ return (options.hasComposed() && options.composed()) ? &shadowIncludingRoot() : &treeRoot();
+}
+
Node* Node::insertBefore(Node* newChild, Node* refChild, ExceptionState& exceptionState)
{
if (isContainerNode())

Powered by Google App Engine
This is Rietveld 408576698