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

Unified Diff: Source/core/inspector/PageConsoleAgent.cpp

Issue 425383002: Move highestAncestorOrSelf() from Node to NodeTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 0c003f3115fb42399cdc7d7adab00c8b6d4b245b..b645def5594242384c0414d33ea64f2454b68bc5 100644
--- a/Source/core/inspector/PageConsoleAgent.cpp
+++ b/Source/core/inspector/PageConsoleAgent.cpp
@@ -32,6 +32,7 @@
#include "core/inspector/PageConsoleAgent.h"
#include "core/dom/Node.h"
+#include "core/dom/NodeTraversal.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InjectedScriptManager.h"
@@ -83,7 +84,7 @@ void PageConsoleAgent::addInspectedNode(ErrorString* errorString, int nodeId)
return;
}
while (node->isInShadowTree()) {
- Node& ancestor = node->highestAncestorOrSelf();
+ Node& ancestor = NodeTraversal::highestAncestorOrSelf(*node);
if (!ancestor.isShadowRoot() || toShadowRoot(ancestor).type() == ShadowRoot::AuthorShadowRoot)
break;
// User agent shadow root, keep climbing up.
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698