Index: Source/core/inspector/PageConsoleAgent.cpp |
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp |
index 195f16caa42b9ba6a152fb22f95a2f9d6cc5c477..dfa5c70898f555637fd881f7c5bc74a2f3f79b17 100644 |
--- a/Source/core/inspector/PageConsoleAgent.cpp |
+++ b/Source/core/inspector/PageConsoleAgent.cpp |
@@ -75,7 +75,7 @@ void PageConsoleAgent::addInspectedNode(ErrorString* errorString, int nodeId) |
return; |
} |
while (node->isInShadowTree()) { |
- Node& ancestor = node->highestAncestor(); |
+ Node& ancestor = node->highestAncestorOrSelf(); |
if (!ancestor.isShadowRoot() || toShadowRoot(ancestor).type() == ShadowRoot::AuthorShadowRoot) |
break; |
// User agent shadow root, keep climbing up. |