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

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

Issue 14508005: Support an Event Path API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: event.path() now returns a different view for each node. Created 7 years, 7 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
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 1e80af0f00a8650f570082ee40da17996e303b16..a2c11241a9708062dde5d6fe584661a739741454 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -2779,6 +2779,17 @@ void Node::setIsCustomElement()
setFlag(IsCustomElement);
}
+bool Node::canReach(const Node* target) const
dglazkov 2013/05/08 16:37:29 I think we can use the new fancy stuff in DOM spec
+{
+ ASSERT(target);
+ TreeScope* targetScope = target->treeScope();
+ for (TreeScope* scope = treeScope(); scope; scope = scope->parentTreeScope()) {
+ if (scope == targetScope)
+ return true;
+ }
+ return false;
+}
+
} // namespace WebCore
#ifndef NDEBUG
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698