| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Widget} | 7 * @extends {WebInspector.Widget} |
| 8 * @implements {WebInspector.Searchable} | 8 * @implements {WebInspector.Searchable} |
| 9 * @param {!Document} parsedXML | 9 * @param {!Document} parsedXML |
| 10 */ | 10 */ |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 */ | 363 */ |
| 364 _setTitle: function(items) | 364 _setTitle: function(items) |
| 365 { | 365 { |
| 366 var titleFragment = createDocumentFragment(); | 366 var titleFragment = createDocumentFragment(); |
| 367 for (var i = 0; i < items.length; i += 2) | 367 for (var i = 0; i < items.length; i += 2) |
| 368 titleFragment.createChild("span", items[i + 1]).textContent = items[
i]; | 368 titleFragment.createChild("span", items[i + 1]).textContent = items[
i]; |
| 369 this.title = titleFragment; | 369 this.title = titleFragment; |
| 370 this._xmlView._innerPerformSearch(false, false); | 370 this._xmlView._innerPerformSearch(false, false); |
| 371 }, | 371 }, |
| 372 | 372 |
| 373 /** |
| 374 * @override |
| 375 */ |
| 373 onattach: function() | 376 onattach: function() |
| 374 { | 377 { |
| 375 this.listItemElement.classList.toggle("shadow-xml-view-close-tag", this.
_closeTag); | 378 this.listItemElement.classList.toggle("shadow-xml-view-close-tag", this.
_closeTag); |
| 376 }, | 379 }, |
| 377 | 380 |
| 381 /** |
| 382 * @override |
| 383 */ |
| 378 onexpand: function() | 384 onexpand: function() |
| 379 { | 385 { |
| 380 this._updateTitle(); | 386 this._updateTitle(); |
| 381 }, | 387 }, |
| 382 | 388 |
| 389 /** |
| 390 * @override |
| 391 */ |
| 383 oncollapse: function() | 392 oncollapse: function() |
| 384 { | 393 { |
| 385 this._updateTitle(); | 394 this._updateTitle(); |
| 386 }, | 395 }, |
| 387 | 396 |
| 397 /** |
| 398 * @override |
| 399 */ |
| 388 onpopulate: function() | 400 onpopulate: function() |
| 389 { | 401 { |
| 390 WebInspector.XMLView.Node.populate(this, this._node, this._xmlView); | 402 WebInspector.XMLView.Node.populate(this, this._node, this._xmlView); |
| 391 this.appendChild(new WebInspector.XMLView.Node(this._node, true, this._x
mlView)); | 403 this.appendChild(new WebInspector.XMLView.Node(this._node, true, this._x
mlView)); |
| 392 }, | 404 }, |
| 393 | 405 |
| 394 __proto__: TreeElement.prototype | 406 __proto__: TreeElement.prototype |
| 395 }; | 407 }; |
| OLD | NEW |