| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 this._reset(); | 62 this._reset(); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 /** @enum {symbol} */ | 65 /** @enum {symbol} */ |
| 66 WebInspector.PaintProfilerView.Events = { | 66 WebInspector.PaintProfilerView.Events = { |
| 67 WindowChanged: Symbol("WindowChanged") | 67 WindowChanged: Symbol("WindowChanged") |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 WebInspector.PaintProfilerView.prototype = { | 70 WebInspector.PaintProfilerView.prototype = { |
| 71 /** |
| 72 * @override |
| 73 */ |
| 71 onResize: function() | 74 onResize: function() |
| 72 { | 75 { |
| 73 this._update(); | 76 this._update(); |
| 74 }, | 77 }, |
| 75 | 78 |
| 76 /** | 79 /** |
| 77 * @param {?WebInspector.PaintProfilerSnapshot} snapshot | 80 * @param {?WebInspector.PaintProfilerSnapshot} snapshot |
| 78 * @param {!Array.<!WebInspector.PaintProfilerLogItem>} log | 81 * @param {!Array.<!WebInspector.PaintProfilerLogItem>} log |
| 79 * @param {?DOMAgent.Rect} clipRect | 82 * @param {?DOMAgent.Rect} clipRect |
| 80 */ | 83 */ |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 */ | 379 */ |
| 377 WebInspector.LogTreeElement = function(ownerView, logItem) | 380 WebInspector.LogTreeElement = function(ownerView, logItem) |
| 378 { | 381 { |
| 379 TreeElement.call(this, "", !!logItem.params); | 382 TreeElement.call(this, "", !!logItem.params); |
| 380 this._logItem = logItem; | 383 this._logItem = logItem; |
| 381 this._ownerView = ownerView; | 384 this._ownerView = ownerView; |
| 382 this._filled = false; | 385 this._filled = false; |
| 383 }; | 386 }; |
| 384 | 387 |
| 385 WebInspector.LogTreeElement.prototype = { | 388 WebInspector.LogTreeElement.prototype = { |
| 389 /** |
| 390 * @override |
| 391 */ |
| 386 onattach: function() | 392 onattach: function() |
| 387 { | 393 { |
| 388 this._update(); | 394 this._update(); |
| 389 }, | 395 }, |
| 390 | 396 |
| 397 /** |
| 398 * @override |
| 399 */ |
| 391 onpopulate: function() | 400 onpopulate: function() |
| 392 { | 401 { |
| 393 for (var param in this._logItem.params) | 402 for (var param in this._logItem.params) |
| 394 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(this, par
am, this._logItem.params[param]); | 403 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(this, par
am, this._logItem.params[param]); |
| 395 }, | 404 }, |
| 396 | 405 |
| 397 /** | 406 /** |
| 398 * @param {*} param | 407 * @param {*} param |
| 399 * @param {string} name | 408 * @param {string} name |
| 400 * @return {string} | 409 * @return {string} |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 { | 469 { |
| 461 var treeElement = new WebInspector.LogPropertyTreeElement({name: name, value
: value}); | 470 var treeElement = new WebInspector.LogPropertyTreeElement({name: name, value
: value}); |
| 462 element.appendChild(treeElement); | 471 element.appendChild(treeElement); |
| 463 if (value && typeof value === "object") { | 472 if (value && typeof value === "object") { |
| 464 for (var property in value) | 473 for (var property in value) |
| 465 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(treeEleme
nt, property, value[property]); | 474 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(treeEleme
nt, property, value[property]); |
| 466 } | 475 } |
| 467 }; | 476 }; |
| 468 | 477 |
| 469 WebInspector.LogPropertyTreeElement.prototype = { | 478 WebInspector.LogPropertyTreeElement.prototype = { |
| 479 /** |
| 480 * @override |
| 481 */ |
| 470 onattach: function() | 482 onattach: function() |
| 471 { | 483 { |
| 472 var title = createDocumentFragment(); | 484 var title = createDocumentFragment(); |
| 473 var nameElement = title.createChild("span", "name"); | 485 var nameElement = title.createChild("span", "name"); |
| 474 nameElement.textContent = this._property.name; | 486 nameElement.textContent = this._property.name; |
| 475 var separatorElement = title.createChild("span", "separator"); | 487 var separatorElement = title.createChild("span", "separator"); |
| 476 separatorElement.textContent = ": "; | 488 separatorElement.textContent = ": "; |
| 477 if (this._property.value === null || typeof this._property.value !== "ob
ject") { | 489 if (this._property.value === null || typeof this._property.value !== "ob
ject") { |
| 478 var valueElement = title.createChild("span", "value"); | 490 var valueElement = title.createChild("span", "value"); |
| 479 valueElement.textContent = JSON.stringify(this._property.value); | 491 valueElement.textContent = JSON.stringify(this._property.value); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 var method = logItem.method.toTitleCase(); | 587 var method = logItem.method.toTitleCase(); |
| 576 | 588 |
| 577 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie
s(); | 589 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie
s(); |
| 578 var result = logItemCategories[method]; | 590 var result = logItemCategories[method]; |
| 579 if (!result) { | 591 if (!result) { |
| 580 result = WebInspector.PaintProfilerView.categories()["misc"]; | 592 result = WebInspector.PaintProfilerView.categories()["misc"]; |
| 581 logItemCategories[method] = result; | 593 logItemCategories[method] = result; |
| 582 } | 594 } |
| 583 return result; | 595 return result; |
| 584 }; | 596 }; |
| OLD | NEW |