Commit d2ba6248 authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: Remove unused isAncestor parameter from findTreeElement in TreeOutline.

R=lushnikov

Review URL: https://codereview.chromium.org/339853003

git-svn-id: svn://svn.chromium.org/blink/trunk@176308 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c58bd441
...@@ -304,20 +304,15 @@ WebInspector.ElementsTreeOutline.prototype = { ...@@ -304,20 +304,15 @@ WebInspector.ElementsTreeOutline.prototype = {
*/ */
findTreeElement: function(node) findTreeElement: function(node)
{ {
function isAncestorNode(ancestor, node)
{
return ancestor.isAncestor(node);
}
function parentNode(node) function parentNode(node)
{ {
return node.parentNode; return node.parentNode;
} }
var treeElement = TreeOutline.prototype.findTreeElement.call(this, node, isAncestorNode, parentNode); var treeElement = TreeOutline.prototype.findTreeElement.call(this, node, parentNode);
if (!treeElement && node.nodeType() === Node.TEXT_NODE) { if (!treeElement && node.nodeType() === Node.TEXT_NODE) {
// The text node might have been inlined if it was short, so try to find the parent element. // The text node might have been inlined if it was short, so try to find the parent element.
treeElement = TreeOutline.prototype.findTreeElement.call(this, node.parentNode, isAncestorNode, parentNode); treeElement = TreeOutline.prototype.findTreeElement.call(this, node.parentNode, parentNode);
} }
return treeElement; return treeElement;
......
...@@ -724,19 +724,13 @@ WebInspector.ResourcesPanel.prototype = { ...@@ -724,19 +724,13 @@ WebInspector.ResourcesPanel.prototype = {
_findTreeElementForResource: function(resource) _findTreeElementForResource: function(resource)
{ {
function isAncestor(ancestor, object)
{
// Redirects, XHRs do not belong to the tree, it is fine to silently return false here.
return false;
}
function getParent(object) function getParent(object)
{ {
// Redirects, XHRs do not belong to the tree, it is fine to silently return false here. // Redirects, XHRs do not belong to the tree, it is fine to silently return false here.
return null; return null;
} }
return this.sidebarTree.findTreeElement(resource, isAncestor, getParent); return this.sidebarTree.findTreeElement(resource, getParent);
}, },
showView: function(view) showView: function(view)
......
...@@ -283,11 +283,10 @@ TreeOutline.prototype.getCachedTreeElement = function(representedObject) ...@@ -283,11 +283,10 @@ TreeOutline.prototype.getCachedTreeElement = function(representedObject)
/** /**
* @param {?Object} representedObject * @param {?Object} representedObject
* @param {function(!Object, !Object):boolean} isAncestor
* @param {function(!Object):?Object} getParent * @param {function(!Object):?Object} getParent
* @return {?TreeElement} * @return {?TreeElement}
*/ */
TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, getParent) TreeOutline.prototype.findTreeElement = function(representedObject, getParent)
{ {
if (!representedObject) if (!representedObject)
return null; return null;
......
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