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

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

Issue 370843002: Allow touch adjustment to return Shadow DOM node. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add simple shadow dom test Created 6 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: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 7b4715a499a2abc953f9a07590211c7ebf78e0d3..d1e13c5f44484098917286f1c8fb1322e5f5d7cb 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -636,6 +636,17 @@ ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionState& exception
return toShadowRoot(shadow)->youngerShadowRoot();
}
+Element* Internals::shadowHost(Node* node, ExceptionState& exceptionState)
+{
+ if (!node) {
+ exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node"));
+ return 0;
+ }
+
+ return node->shadowHost();
+
+}
+
String Internals::shadowRootType(const Node* root, ExceptionState& exceptionState) const
{
if (!root || !root->isShadowRoot()) {

Powered by Google App Engine
This is Rietveld 408576698