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

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

Issue 944343002: DevTools: migrate treeoutline from hasChildren to is/setExpandable(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 * @return {boolean} 418 * @return {boolean}
419 */ 419 */
420 ondblclick: function(event) 420 ondblclick: function(event)
421 { 421 {
422 if (this._editing || this._elementCloseTag) 422 if (this._editing || this._elementCloseTag)
423 return false; 423 return false;
424 424
425 if (this._startEditingTarget(/** @type {!Element} */(event.target))) 425 if (this._startEditingTarget(/** @type {!Element} */(event.target)))
426 return false; 426 return false;
427 427
428 if (this.hasChildren && !this.expanded) 428 if (this.isExpandable() && !this.expanded)
429 this.expand(); 429 this.expand();
430 return false; 430 return false;
431 }, 431 },
432 432
433 /** 433 /**
434 * @return {boolean} 434 * @return {boolean}
435 */ 435 */
436 hasEditableNode: function() 436 hasEditableNode: function()
437 { 437 {
438 return !this._node.isShadowRoot() && !this._node.ancestorClosedShadowRoo t(); 438 return !this._node.isShadowRoot() && !this._node.ancestorClosedShadowRoo t();
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 1604
1605 if (object) 1605 if (object)
1606 object.callFunction(scrollIntoView); 1606 object.callFunction(scrollIntoView);
1607 } 1607 }
1608 1608
1609 this._node.resolveToObject("", scrollIntoViewCallback); 1609 this._node.resolveToObject("", scrollIntoViewCallback);
1610 }, 1610 },
1611 1611
1612 __proto__: TreeElement.prototype 1612 __proto__: TreeElement.prototype
1613 } 1613 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698