| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |