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

Side by Side Diff: Source/devtools/front_end/ui/treeoutline.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 | « Source/devtools/front_end/resources/ResourcesPanel.js ('k') | no next file » | 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return null; 276 return null;
277 277
278 var elements = this._treeElementsMap.get(representedObject); 278 var elements = this._treeElementsMap.get(representedObject);
279 if (elements && elements.length) 279 if (elements && elements.length)
280 return elements[0]; 280 return elements[0];
281 return null; 281 return null;
282 } 282 }
283 283
284 /** 284 /**
285 * @param {?Object} representedObject 285 * @param {?Object} representedObject
286 * @param {function(!Object, !Object):boolean} isAncestor
287 * @param {function(!Object):?Object} getParent 286 * @param {function(!Object):?Object} getParent
288 * @return {?TreeElement} 287 * @return {?TreeElement}
289 */ 288 */
290 TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, getParent) 289 TreeOutline.prototype.findTreeElement = function(representedObject, getParent)
291 { 290 {
292 if (!representedObject) 291 if (!representedObject)
293 return null; 292 return null;
294 293
295 var cachedElement = this.getCachedTreeElement(representedObject); 294 var cachedElement = this.getCachedTreeElement(representedObject);
296 if (cachedElement) 295 if (cachedElement)
297 return cachedElement; 296 return cachedElement;
298 297
299 // Walk up the parent pointers from the desired representedObject 298 // Walk up the parent pointers from the desired representedObject
300 var ancestors = []; 299 var ancestors = [];
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 } 967 }
969 968
970 TreeElement.prototype.isEventWithinDisclosureTriangle = function(event) 969 TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
971 { 970 {
972 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446) 971 // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)
973 var paddingLeftValue = window.getComputedStyle(this._listItemNode).getProper tyCSSValue("padding-left"); 972 var paddingLeftValue = window.getComputedStyle(this._listItemNode).getProper tyCSSValue("padding-left");
974 var computedLeftPadding = paddingLeftValue ? paddingLeftValue.getFloatValue( CSSPrimitiveValue.CSS_PX) : 0; 973 var computedLeftPadding = paddingLeftValue ? paddingLeftValue.getFloatValue( CSSPrimitiveValue.CSS_PX) : 0;
975 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; 974 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding;
976 return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren; 975 return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
977 } 976 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/resources/ResourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698