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

Side by Side Diff: Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 339853003: DevTools: Remove unused isAncestor parameter from findTreeElement in TreeOutline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/resources/ResourcesPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 { 297 {
298 this._eventSupport.dispatchEventToListeners(WebInspector.ElementsTreeOut line.Events.ElementsTreeUpdated, nodes); 298 this._eventSupport.dispatchEventToListeners(WebInspector.ElementsTreeOut line.Events.ElementsTreeUpdated, nodes);
299 }, 299 },
300 300
301 /** 301 /**
302 * @param {!WebInspector.DOMNode} node 302 * @param {!WebInspector.DOMNode} node
303 * @return {?TreeElement} 303 * @return {?TreeElement}
304 */ 304 */
305 findTreeElement: function(node) 305 findTreeElement: function(node)
306 { 306 {
307 function isAncestorNode(ancestor, node)
308 {
309 return ancestor.isAncestor(node);
310 }
311
312 function parentNode(node) 307 function parentNode(node)
313 { 308 {
314 return node.parentNode; 309 return node.parentNode;
315 } 310 }
316 311
317 var treeElement = TreeOutline.prototype.findTreeElement.call(this, node, isAncestorNode, parentNode); 312 var treeElement = TreeOutline.prototype.findTreeElement.call(this, node, parentNode);
318 if (!treeElement && node.nodeType() === Node.TEXT_NODE) { 313 if (!treeElement && node.nodeType() === Node.TEXT_NODE) {
319 // The text node might have been inlined if it was short, so try to find the parent element. 314 // The text node might have been inlined if it was short, so try to find the parent element.
320 treeElement = TreeOutline.prototype.findTreeElement.call(this, node. parentNode, isAncestorNode, parentNode); 315 treeElement = TreeOutline.prototype.findTreeElement.call(this, node. parentNode, parentNode);
321 } 316 }
322 317
323 return treeElement; 318 return treeElement;
324 }, 319 },
325 320
326 /** 321 /**
327 * @param {!WebInspector.DOMNode} node 322 * @param {!WebInspector.DOMNode} node
328 * @return {?TreeElement} 323 * @return {?TreeElement}
329 */ 324 */
330 createTreeElementFor: function(node) 325 createTreeElementFor: function(node)
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 var treeOutline = new WebInspector.ElementsTreeOutline(node.target(), fa lse, false); 2676 var treeOutline = new WebInspector.ElementsTreeOutline(node.target(), fa lse, false);
2682 treeOutline.rootDOMNode = node; 2677 treeOutline.rootDOMNode = node;
2683 treeOutline.element.classList.add("outline-disclosure"); 2678 treeOutline.element.classList.add("outline-disclosure");
2684 if (!treeOutline.children[0].hasChildren) 2679 if (!treeOutline.children[0].hasChildren)
2685 treeOutline.element.classList.add("single-node"); 2680 treeOutline.element.classList.add("single-node");
2686 treeOutline.setVisible(true); 2681 treeOutline.setVisible(true);
2687 treeOutline.element.treeElementForTest = treeOutline.children[0]; 2682 treeOutline.element.treeElementForTest = treeOutline.children[0];
2688 return treeOutline.element; 2683 return treeOutline.element;
2689 } 2684 }
2690 } 2685 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/resources/ResourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698