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 511576e7591a42685a865b6e64b8f26a6a357f05..ee3bb5df7919c59a74e9d022dc88b2e15b672a54 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); |