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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove one TODO Created 5 years 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index ef4671f7d9f7abd770693102274cd2f66a78308b..e5990025a67af8327900dbe3aa77454425d5462f 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -619,6 +619,16 @@ Node* Internals::previousInComposedTree(Node* node, ExceptionState& exceptionSta
return ComposedTreeTraversal::previous(*node);
}
+Node* Internals::parentInComposedTree(Node* node, ExceptionState& exceptionState)
+{
+ ASSERT(node);
+ if (!node->canParticipateInComposedTree()) {
+ exceptionState.throwDOMException(InvalidAccessError, "The node argument doesn't particite in the composed tree.");
+ return nullptr;
+ }
+ return ComposedTreeTraversal::parent(*node);
+}
+
String Internals::elementLayoutTreeAsText(Element* element, ExceptionState& exceptionState)
{
ASSERT(element);

Powered by Google App Engine
This is Rietveld 408576698