Commit 0645da24 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

2011-03-14 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: make DOMAgent event target, remove dependency from ElementsPanel.
        https://bugs.webkit.org/show_bug.cgi?id=56268

        * inspector/elements/elements-panel-search.html:
        * inspector/elements/mutate-unknown-node.html:
2011-03-14  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: make DOMAgent event target, remove dependency from ElementsPanel.
        https://bugs.webkit.org/show_bug.cgi?id=56268

        * inspector/Inspector.idl:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::reset):
        (WebCore::InspectorDOMAgent::performSearch):
        (WebCore::InspectorDOMAgent::cancelSearch):
        (WebCore::InspectorDOMAgent::onMatchJobsTimer):
        (WebCore::InspectorDOMAgent::reportNodesAsSearchResults):
        * inspector/InspectorDOMAgent.h:
        * inspector/front-end/DOMAgent.js:
        (WebInspector.DOMAgent.prototype.requestDocument.mycallback):
        (WebInspector.DOMAgent.prototype.requestDocument):
        (WebInspector.DOMAgent.prototype._attributesUpdated):
        (WebInspector.DOMAgent.prototype._characterDataModified):
        (WebInspector.DOMAgent.prototype._documentUpdated):
        (WebInspector.DOMAgent.prototype._setDocument):
        (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
        (WebInspector.DOMAgent.prototype._childNodeInserted):
        (WebInspector.DOMAgent.prototype._childNodeRemoved):
        (WebInspector.DOMAgent.prototype._removeBreakpoints):
        (WebInspector.DOMAgent.prototype.performSearch):
        (WebInspector.DOMAgent.prototype.cancelSearch):
        (WebInspector.DOMDispatcher.prototype.searchResults):
        * inspector/front-end/ElementsPanel.js:
        (WebInspector.ElementsPanel):
        (WebInspector.ElementsPanel.prototype._reset):
        (WebInspector.ElementsPanel.prototype._documentUpdated):
        (WebInspector.ElementsPanel.prototype.searchCanceled):
        (WebInspector.ElementsPanel.prototype.performSearch):
        (WebInspector.ElementsPanel.prototype._addNodesToSearchResult):
        (WebInspector.ElementsPanel.prototype._attributesUpdated):
        (WebInspector.ElementsPanel.prototype._characterDataModified):
        (WebInspector.ElementsPanel.prototype._nodeInserted):
        (WebInspector.ElementsPanel.prototype._nodeRemoved):
        (WebInspector.ElementsPanel.prototype._childNodeCountUpdated):
        (WebInspector.ElementsPanel.prototype.updateModifiedNodes):

git-svn-id: svn://svn.chromium.org/blink/trunk@81010 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8d7de5cd
2011-03-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: make DOMAgent event target, remove dependency from ElementsPanel.
https://bugs.webkit.org/show_bug.cgi?id=56268
* inspector/elements/elements-panel-search.html:
* inspector/elements/mutate-unknown-node.html:
2011-03-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
......@@ -23,7 +23,7 @@ function test()
searchResults.push(markupValue);
}
WebInspector.panels.elements.addNodesToSearchResult = function(nodeIds)
function addNodesToSearchResult(nodeIds)
{
for (var i = 0; i < nodeIds.length; ++i) {
var node = WebInspector.domAgent.nodeForId(nodeIds[i]);
......@@ -34,22 +34,27 @@ function test()
}
}
// Plain text.
DOMAgent.performSearch("Foo" + "Bar", true);
// Partial text.
DOMAgent.performSearch("oo" + "Ba", true);
// Start tag.
DOMAgent.performSearch("<inpu" + "t", true);
// Partial tag.
DOMAgent.performSearch("npu" + "t", true);
// Exact attribute name.
DOMAgent.performSearch("valu" + "e", true);
// Exact attribute val<>ue.
DOMAgent.performSearch("In" + "putVa" + "l", true);
// Partial attribute val<>ue.
DOMAgent.performSearch("n" + "putVa" + "l", true);
// Terminator.
DOMAgent.performSearch("ter" + "mi" + "nator", true);
WebInspector.domAgent.requestDocument(step1);
function step1()
{
// Plain text.
WebInspector.domAgent.performSearch("Foo" + "Bar", addNodesToSearchResult, true);
// Partial text.
WebInspector.domAgent.performSearch("oo" + "Ba", addNodesToSearchResult, true);
// Start tag.
WebInspector.domAgent.performSearch("<inpu" + "t", addNodesToSearchResult, true);
// Partial tag.
WebInspector.domAgent.performSearch("npu" + "t", addNodesToSearchResult, true);
// Exact attribute name.
WebInspector.domAgent.performSearch("valu" + "e", addNodesToSearchResult, true);
// Exact attribute val<>ue.
WebInspector.domAgent.performSearch("In" + "putVa" + "l", addNodesToSearchResult, true);
// Partial attribute val<>ue.
WebInspector.domAgent.performSearch("n" + "putVa" + "l", addNodesToSearchResult, true);
// Terminator.
WebInspector.domAgent.performSearch("ter" + "mi" + "nator", addNodesToSearchResult, true);
}
}
</script>
</head>
......
......@@ -28,17 +28,18 @@ function test()
{
function listener(type, event)
{
InspectorTest.addResult("DOMAgent event fired. Should only happen once for output node: " + type + " " + event.target.nodeName() + "#" + event.target.getAttribute("id"));
InspectorTest.addResult("DOMAgent event fired. Should only happen once for output node: " + type + " " + event.data.nodeName() + "#" + event.data.getAttribute("id"));
}
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModified, listener.bind(this, "DOMAttrModified"));
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.CharacterDataModified, listener.bind(this, "DOMCharacterDataModified"));
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeInserted, listener.bind(this, "DOMNodeInserted"));
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeRemoved, listener.bind(this, "DOMNodeRemoved"));
WebInspector.domAgent.requestDocument(step0.bind(this));
function step0(doc)
function step0()
{
doc.addEventListener("DOMAttrModified", listener.bind(this, "DOMAttrModified"));
doc.addEventListener("DOMCharacterDataModified", listener.bind(this, "DOMCharacterDataModified"));
doc.addEventListener("DOMNodeInserted", listener.bind(this, "DOMNodeInserted"));
doc.addEventListener("DOMNodeRemoved", listener.bind(this, "DOMNodeRemoved"));
InspectorTest.evaluateInPage("appendChild()", step1);
}
......
2011-03-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: make DOMAgent event target, remove dependency from ElementsPanel.
https://bugs.webkit.org/show_bug.cgi?id=56268
* inspector/Inspector.idl:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::reset):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::cancelSearch):
(WebCore::InspectorDOMAgent::onMatchJobsTimer):
(WebCore::InspectorDOMAgent::reportNodesAsSearchResults):
* inspector/InspectorDOMAgent.h:
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype.requestDocument.mycallback):
(WebInspector.DOMAgent.prototype.requestDocument):
(WebInspector.DOMAgent.prototype._attributesUpdated):
(WebInspector.DOMAgent.prototype._characterDataModified):
(WebInspector.DOMAgent.prototype._documentUpdated):
(WebInspector.DOMAgent.prototype._setDocument):
(WebInspector.DOMAgent.prototype._childNodeCountUpdated):
(WebInspector.DOMAgent.prototype._childNodeInserted):
(WebInspector.DOMAgent.prototype._childNodeRemoved):
(WebInspector.DOMAgent.prototype._removeBreakpoints):
(WebInspector.DOMAgent.prototype.performSearch):
(WebInspector.DOMAgent.prototype.cancelSearch):
(WebInspector.DOMDispatcher.prototype.searchResults):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype._reset):
(WebInspector.ElementsPanel.prototype._documentUpdated):
(WebInspector.ElementsPanel.prototype.searchCanceled):
(WebInspector.ElementsPanel.prototype.performSearch):
(WebInspector.ElementsPanel.prototype._addNodesToSearchResult):
(WebInspector.ElementsPanel.prototype._attributesUpdated):
(WebInspector.ElementsPanel.prototype._characterDataModified):
(WebInspector.ElementsPanel.prototype._nodeInserted):
(WebInspector.ElementsPanel.prototype._nodeRemoved):
(WebInspector.ElementsPanel.prototype._childNodeCountUpdated):
(WebInspector.ElementsPanel.prototype.updateModifiedNodes):
2011-03-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
......
......@@ -156,13 +156,12 @@ module core {
void setOuterHTML(in long nodeId, in String outerHTML, out long outNodeId);
void performSearch(in String query, in boolean runSynchronously);
void searchCanceled();
void cancelSearch();
void pushNodeToFrontend(in Object objectId, out long nodeId);
void pushNodeByPathToFrontend(in String path, out long nodeId);
void resolveNode(in long nodeId, in String objectGroup, out Value result);
void pushNodeToFrontend(in Object objectId, out long nodeId);
[event] void addNodesToSearchResult(out Array nodeIds);
[event] void documentUpdated();
[event] void setChildNodes(out long parentId, out Array nodes);
[event] void attributesUpdated(out long id, out Array attributes);
......@@ -171,6 +170,7 @@ module core {
[event] void childNodeCountUpdated(out long id, out int newValue);
[event] void childNodeInserted(out long parentId, out long prevId, out Object node);
[event] void childNodeRemoved(out long parentId, out long id);
[event] void searchResults(out Array nodeIds);
};
interface [Conditional=INSPECTOR] CSS {
......
......@@ -295,7 +295,7 @@ Vector<Document*> InspectorDOMAgent::documents()
void InspectorDOMAgent::reset()
{
ErrorString error;
searchCanceled(&error);
cancelSearch(&error);
discardBindings();
if (m_revalidateStyleAttrTask)
m_revalidateStyleAttrTask->reset();
......@@ -785,7 +785,7 @@ void InspectorDOMAgent::performSearch(ErrorString* error, const String& whitespa
escapedTagNameQuery.replace("'", "\\'");
// Clear pending jobs.
searchCanceled(error);
cancelSearch(error);
// Find all frames, iframes and object elements to search their documents.
Vector<Document*> docs = documents();
......@@ -839,13 +839,13 @@ void InspectorDOMAgent::performSearch(ErrorString* error, const String& whitespa
for (Deque<MatchJob*>::iterator it = m_pendingMatchJobs.begin(); it != m_pendingMatchJobs.end(); ++it)
(*it)->match(resultCollector);
reportNodesAsSearchResults(resultCollector);
searchCanceled(error);
cancelSearch(error);
return;
}
m_matchJobsTimer.startOneShot(0);
}
void InspectorDOMAgent::searchCanceled(ErrorString*)
void InspectorDOMAgent::cancelSearch(ErrorString*)
{
if (m_matchJobsTimer.isActive())
m_matchJobsTimer.stop();
......@@ -1216,7 +1216,7 @@ void InspectorDOMAgent::onMatchJobsTimer(Timer<InspectorDOMAgent>*)
{
if (!m_pendingMatchJobs.size()) {
ErrorString error;
searchCanceled(&error);
cancelSearch(&error);
return;
}
......@@ -1239,7 +1239,7 @@ void InspectorDOMAgent::reportNodesAsSearchResults(ListHashSet<Node*>& resultCol
m_searchResults.add(*it);
nodeIds->pushNumber(static_cast<long long>(pushNodePathToFrontend(*it)));
}
m_frontend->addNodesToSearchResult(nodeIds.release());
m_frontend->searchResults(nodeIds.release());
}
void InspectorDOMAgent::copyNode(ErrorString*, long nodeId)
......
......@@ -120,7 +120,7 @@ public:
void setNodeValue(ErrorString*, long nodeId, const String& value, bool* success);
void getEventListenersForNode(ErrorString*, long nodeId, RefPtr<InspectorArray>* listenersArray);
void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, bool runSynchronously);
void searchCanceled(ErrorString*);
void cancelSearch(ErrorString*);
void resolveNode(ErrorString*, long nodeId, const String& objectGroup, RefPtr<InspectorValue>* result);
void pushNodeToFrontend(ErrorString*, PassRefPtr<InspectorObject> objectId, long* nodeId);
void pushNodeByPathToFrontend(ErrorString*, const String& path, long* nodeId);
......
......@@ -297,42 +297,6 @@ WebInspector.DOMDocument = function(domAgent, payload)
this._domAgent = domAgent;
}
WebInspector.DOMDocument.prototype = {
addEventListener: function(name, callback)
{
var listeners = this._listeners[name];
if (!listeners) {
listeners = [];
this._listeners[name] = listeners;
}
listeners.push(callback);
},
removeEventListener: function(name, callback)
{
var listeners = this._listeners[name];
if (!listeners)
return;
var index = listeners.indexOf(callback);
if (index != -1)
listeners.splice(index, 1);
},
_fireDomEvent: function(name, event)
{
var listeners = this._listeners[name];
if (!listeners)
return;
for (var i = 0; i < listeners.length; ++i) {
var listener = listeners[i];
listener.call(this, event);
}
}
}
WebInspector.DOMDocument.prototype.__proto__ = WebInspector.DOMNode.prototype;
WebInspector.DOMAgent = function() {
......@@ -341,14 +305,33 @@ WebInspector.DOMAgent = function() {
InspectorBackend.registerDomainDispatcher("DOM", new WebInspector.DOMDispatcher(this));
}
WebInspector.DOMAgent.Events = {
AttrModified: "AttrModified",
CharacterDataModified: "CharacterDataModified",
NodeInserted: "NodeInserted",
NodeRemoved: "NodeRemoved",
DocumentUpdated: "DocumentUpdated",
ChildNodeCountUpdated: "ChildNodeCountUpdated"
}
WebInspector.DOMAgent.prototype = {
requestDocument: function(callback)
{
if (this._document) {
if (callback)
callback(this._document);
} else
this._documentUpdated(callback);
return;
}
function mycallback(error, root)
{
if (!error)
this._setDocument(root);
if (callback)
callback(this._document);
}
DOMAgent.getDocument(mycallback.bind(this));
},
pushNodeToFrontend: function(objectId, callback)
......@@ -392,16 +375,14 @@ WebInspector.DOMAgent.prototype = {
{
var node = this._idToDOMNode[nodeId];
node._setAttributesPayload(attrsArray);
var event = {target: node};
this._document._fireDomEvent("DOMAttrModified", event);
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.AttrModified, node);
},
_characterDataModified: function(nodeId, newValue)
{
var node = this._idToDOMNode[nodeId];
node._nodeValue = newValue;
var event = { target : node };
this._document._fireDomEvent("DOMCharacterDataModified", event);
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.CharacterDataModified, node);
},
nodeForId: function(nodeId)
......@@ -409,18 +390,10 @@ WebInspector.DOMAgent.prototype = {
return this._idToDOMNode[nodeId];
},
_documentUpdated: function(callback)
_documentUpdated: function()
{
function mycallback(error, root)
{
if (error)
return;
this._setDocument(root);
if (callback)
callback(this._document);
}
DOMAgent.getDocument(mycallback.bind(this));
this._setDocument(null);
this.requestDocument();
},
_setDocument: function(payload)
......@@ -430,10 +403,9 @@ WebInspector.DOMAgent.prototype = {
this._document = new WebInspector.DOMDocument(this, payload);
this._idToDOMNode[payload.id] = this._document;
this._bindNodes(this._document.children);
WebInspector.breakpointManager.restoreDOMBreakpoints();
} else
this._document = null;
WebInspector.panels.elements.setDocument(this._document);
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.DocumentUpdated, this._document);
},
_setDetachedRoot: function(payload)
......@@ -468,10 +440,7 @@ WebInspector.DOMAgent.prototype = {
{
var node = this._idToDOMNode[nodeId];
node._childNodeCount = newValue;
var outline = WebInspector.panels.elements.treeOutline;
var treeElement = outline.findTreeElement(node);
if (treeElement)
treeElement.hasChildren = newValue;
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.ChildNodeCountUpdated, node);
},
_childNodeInserted: function(parentId, prevId, payload)
......@@ -480,8 +449,7 @@ WebInspector.DOMAgent.prototype = {
var prev = this._idToDOMNode[prevId];
var node = parent._insertChild(prev, payload);
this._idToDOMNode[node.id] = node;
var event = { target : node, relatedNode : parent };
this._document._fireDomEvent("DOMNodeInserted", event);
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.NodeInserted, node);
},
_childNodeRemoved: function(parentId, nodeId)
......@@ -489,8 +457,7 @@ WebInspector.DOMAgent.prototype = {
var parent = this._idToDOMNode[parentId];
var node = this._idToDOMNode[nodeId];
parent.removeChild_(node);
var event = { target : node, relatedNode : parent };
this._document._fireDomEvent("DOMNodeRemoved", event);
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.NodeRemoved, {node:node, parent:parent});
delete this._idToDOMNode[nodeId];
this._removeBreakpoints(node);
},
......@@ -503,9 +470,23 @@ WebInspector.DOMAgent.prototype = {
return;
for (var i = 0; i < node.children.length; ++i)
this._removeBreakpoints(node.children[i]);
},
performSearch: function(query, searchResultCollector, searchSynchronously)
{
this._searchResultCollector = searchResultCollector;
DOMAgent.performSearch(query, !!searchSynchronously);
},
cancelSearch: function()
{
delete this._searchResultCollector;
DOMAgent.cancelSearch();
}
}
WebInspector.DOMAgent.prototype.__proto__ = WebInspector.Object.prototype;
WebInspector.DOMDispatcher = function(domAgent)
{
this._domAgent = domAgent;
......@@ -552,9 +533,10 @@ WebInspector.DOMDispatcher.prototype = {
WebInspector.updateFocusedNode(nodeId);
},
addNodesToSearchResult: function(nodeIds)
searchResults: function(nodeIds)
{
WebInspector.panels.elements.addNodesToSearchResult(nodeIds);
if (this._domAgent._searchResultCollector)
this._domAgent._searchResultCollector(nodeIds);
}
}
......
......@@ -113,7 +113,14 @@ WebInspector.ElementsPanel = function()
this._registerShortcuts();
this.reset();
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeInserted, this._nodeInserted, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeRemoved, this._nodeRemoved, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModified, this._attributesUpdated, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.CharacterDataModified, this._characterDataModified, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.DocumentUpdated, this._documentUpdated, this);
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.ChildNodeCountUpdated, this._childNodeCountUpdated, this);
this.recentlyModifiedNodes = [];
}
WebInspector.ElementsPanel.prototype = {
......@@ -164,7 +171,7 @@ WebInspector.ElementsPanel.prototype = {
this.updateBreadcrumbSizes();
},
reset: function()
_reset: function()
{
if (this.focusedDOMNode)
this._selectedPathOnReset = this.focusedDOMNode.path();
......@@ -179,18 +186,21 @@ WebInspector.ElementsPanel.prototype = {
delete this.currentQuery;
},
setDocument: function(inspectedRootDocument)
_documentUpdated: function(event)
{
this.reset();
this._setDocument(event.data);
},
_setDocument: function(inspectedRootDocument)
{
this._reset();
this.searchCanceled();
if (!inspectedRootDocument)
return;
inspectedRootDocument.addEventListener("DOMNodeInserted", this._nodeInserted.bind(this));
inspectedRootDocument.addEventListener("DOMNodeRemoved", this._nodeRemoved.bind(this));
inspectedRootDocument.addEventListener("DOMAttrModified", this._attributesUpdated.bind(this));
inspectedRootDocument.addEventListener("DOMCharacterDataModified", this._characterDataModified.bind(this));
WebInspector.breakpointManager.restoreDOMBreakpoints();
this.rootDOMNode = inspectedRootDocument;
......@@ -233,7 +243,7 @@ WebInspector.ElementsPanel.prototype = {
delete this._currentSearchResultIndex;
this._searchResults = [];
DOMAgent.searchCanceled();
WebInspector.domAgent.cancelSearch();
},
performSearch: function(query)
......@@ -249,7 +259,7 @@ WebInspector.ElementsPanel.prototype = {
this._matchesCountUpdateTimeout = null;
this._searchQuery = query;
DOMAgent.performSearch(whitespaceTrimmedQuery, false);
WebInspector.domAgent.performSearch(whitespaceTrimmedQuery, this._addNodesToSearchResult.bind(this));
},
_contextMenuEventFired: function(event)
......@@ -320,7 +330,7 @@ WebInspector.ElementsPanel.prototype = {
this._matchesCountUpdateTimeout = setTimeout(this._updateMatchesCount.bind(this), 500);
},
addNodesToSearchResult: function(nodeIds)
_addNodesToSearchResult: function(nodeIds)
{
if (!nodeIds.length)
return;
......@@ -410,35 +420,42 @@ WebInspector.ElementsPanel.prototype = {
_attributesUpdated: function(event)
{
this.recentlyModifiedNodes.push({node: event.target, updated: true});
this.recentlyModifiedNodes.push({node: event.data, updated: true});
if (this.visible)
this._updateModifiedNodesSoon();
if (!this.sidebarPanes.styles.isModifyingStyle && event.target === this.focusedDOMNode)
if (!this.sidebarPanes.styles.isModifyingStyle && event.data === this.focusedDOMNode)
this._styleSheetChanged();
},
_characterDataModified: function(event)
{
this.recentlyModifiedNodes.push({node: event.target, updated: true});
this.recentlyModifiedNodes.push({node: event.data, updated: true});
if (this.visible)
this._updateModifiedNodesSoon();
},
_nodeInserted: function(event)
{
this.recentlyModifiedNodes.push({node: event.target, parent: event.relatedNode, inserted: true});
this.recentlyModifiedNodes.push({node: event.data, parent: event.data.parentNode, inserted: true});
if (this.visible)
this._updateModifiedNodesSoon();
},
_nodeRemoved: function(event)
{
this.recentlyModifiedNodes.push({node: event.target, parent: event.relatedNode, removed: true});
this.recentlyModifiedNodes.push({node: event.data.node, parent: event.data.parent, removed: true});
if (this.visible)
this._updateModifiedNodesSoon();
},
_childNodeCountUpdated: function(event)
{
var treeElement = this.treeOutline.findTreeElement(event.data);
if (treeElement)
treeElement.hasChildren = event.data.hasChildNodes();
},
_updateModifiedNodesSoon: function()
{
if ("_updateModifiedNodesTimeout" in this)
......@@ -457,7 +474,6 @@ WebInspector.ElementsPanel.prototype = {
var updateBreadcrumbs = false;
for (var i = 0; i < this.recentlyModifiedNodes.length; ++i) {
var replaced = this.recentlyModifiedNodes[i].replaced;
var parent = this.recentlyModifiedNodes[i].parent;
var node = this.recentlyModifiedNodes[i].node;
......@@ -473,7 +489,7 @@ WebInspector.ElementsPanel.prototype = {
var parentNodeItem = this.treeOutline.findTreeElement(parent);
if (parentNodeItem && !parentNodeItem.alreadyUpdatedChildren) {
parentNodeItem.updateChildren(replaced);
parentNodeItem.updateChildren();
parentNodeItem.alreadyUpdatedChildren = true;
updatedParentTreeElements.push(parentNodeItem);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment