summaryrefslogtreecommitdiffstats
path: root/webkit/glue/devtools/dom_agent_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/devtools/dom_agent_impl.cc')
-rw-r--r--webkit/glue/devtools/dom_agent_impl.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/glue/devtools/dom_agent_impl.cc b/webkit/glue/devtools/dom_agent_impl.cc
index de3c0b7..bcd477c 100644
--- a/webkit/glue/devtools/dom_agent_impl.cc
+++ b/webkit/glue/devtools/dom_agent_impl.cc
@@ -277,6 +277,10 @@ void DomAgentImpl::GetChildNodes(int call_id, int element_id) {
int DomAgentImpl::PushNodePathToClient(Node* node_to_select) {
ASSERT(node_to_select); // Invalid input
+ // If we are sending information to the client that is currently being
+ // created. Send root node first.
+ PushDocumentElementToClient();
+
// Return id in case the node is known.
int result = GetIdForNode(node_to_select);
if (result)
@@ -285,10 +289,6 @@ int DomAgentImpl::PushNodePathToClient(Node* node_to_select) {
Element* element = InnerParentElement(node_to_select);
ASSERT(element); // Node is detached or is a document itself
- // If we are sending information to the client that is currently being
- // created. Send root node first.
- PushDocumentElementToClient();
-
Vector<Element*> path;
while (element && !GetIdForNode(element)) {
path.append(element);