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

Side by Side Diff: Source/devtools/front_end/sources/ScopeChainSidebarPane.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 this.bodyElement.appendChild(section.element); 144 this.bodyElement.appendChild(section.element);
145 } 145 }
146 }, 146 },
147 147
148 /** 148 /**
149 * @param {!WebInspector.Event} event 149 * @param {!WebInspector.Event} event
150 */ 150 */
151 _elementAttached: function(event) 151 _elementAttached: function(event)
152 { 152 {
153 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data); 153 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data);
154 if (element.hasChildren && this._expandedProperties.has(this._propertyPa th(element))) 154 if (element.isExpandable() && this._expandedProperties.has(this._propert yPath(element)))
155 element.expand(); 155 element.expand();
156 }, 156 },
157 157
158 /** 158 /**
159 * @param {!WebInspector.Event} event 159 * @param {!WebInspector.Event} event
160 */ 160 */
161 _elementExpanded: function(event) 161 _elementExpanded: function(event)
162 { 162 {
163 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data); 163 var element = /** @type {!WebInspector.ObjectPropertyTreeElement} */ (ev ent.data);
164 this._expandedProperties.add(this._propertyPath(element)); 164 this._expandedProperties.add(this._propertyPath(element));
(...skipping 13 matching lines...) Expand all
178 * @return {string} 178 * @return {string}
179 */ 179 */
180 _propertyPath: function(treeElement) 180 _propertyPath: function(treeElement)
181 { 181 {
182 var section = treeElement.treeOutline.section; 182 var section = treeElement.treeOutline.section;
183 return section.title + ":" + (section.subtitle ? section.subtitle + ":" : "") + WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call(treeE lement); 183 return section.title + ":" + (section.subtitle ? section.subtitle + ":" : "") + WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call(treeE lement);
184 }, 184 },
185 185
186 __proto__: WebInspector.SidebarPane.prototype 186 __proto__: WebInspector.SidebarPane.prototype
187 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698