OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 this._dominatorDataGrid.addEventListener(WebInspector.DataGrid.Events.Select
edNode, this._selectionChanged, this); | 79 this._dominatorDataGrid.addEventListener(WebInspector.DataGrid.Events.Select
edNode, this._selectionChanged, this); |
80 | 80 |
81 if (WebInspector.experimentsSettings.allocationProfiler.isEnabled() && profi
le.profileType() === WebInspector.ProfileTypeRegistry.instance.trackingHeapSnaps
hotProfileType) { | 81 if (WebInspector.experimentsSettings.allocationProfiler.isEnabled() && profi
le.profileType() === WebInspector.ProfileTypeRegistry.instance.trackingHeapSnaps
hotProfileType) { |
82 this._allocationView = new WebInspector.VBox(); | 82 this._allocationView = new WebInspector.VBox(); |
83 this._allocationView.setMinimumSize(50, 25); | 83 this._allocationView.setMinimumSize(50, 25); |
84 this._allocationDataGrid = new WebInspector.AllocationDataGrid(); | 84 this._allocationDataGrid = new WebInspector.AllocationDataGrid(); |
85 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S
electedNode, this._onSelectAllocationNode, this); | 85 this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.S
electedNode, this._onSelectAllocationNode, this); |
86 this._allocationDataGrid.show(this._allocationView.element); | 86 this._allocationDataGrid.show(this._allocationView.element); |
87 } | 87 } |
88 | 88 |
89 this._retainmentViewHeader = document.createElementWithClass("div", "retaine
rs-view-header"); | 89 this._retainmentViewHeader = document.createElementWithClass("div", "heap-sn
apshot-view-resizer"); |
90 var retainingPathsTitleDiv = this._retainmentViewHeader.createChild("div", "
title"); | 90 var retainingPathsTitleDiv = this._retainmentViewHeader.createChild("div", "
title"); |
91 var retainingPathsTitle = retainingPathsTitleDiv.createChild("span"); | 91 var retainingPathsTitle = retainingPathsTitleDiv.createChild("span"); |
92 retainingPathsTitle.textContent = WebInspector.UIString("Object's retaining
tree"); | 92 retainingPathsTitle.textContent = WebInspector.UIString("Object's retaining
tree"); |
93 this._splitView.hideDefaultResizer(); | 93 this._splitView.hideDefaultResizer(); |
94 this._splitView.installResizer(this._retainmentViewHeader); | 94 this._splitView.installResizer(this._retainmentViewHeader); |
95 | 95 |
96 this._retainmentView = new WebInspector.VBox(); | 96 this._retainmentView = new WebInspector.VBox(); |
97 this._retainmentView.setMinimumSize(50, 21); | 97 this._retainmentView.setMinimumSize(50, 21); |
98 this._retainmentView.element.classList.add("retaining-paths-view"); | 98 this._retainmentView.element.classList.add("retaining-paths-view"); |
99 this._retainmentView.element.appendChild(this._retainmentViewHeader); | 99 this._retainmentView.element.appendChild(this._retainmentViewHeader); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 } | 368 } |
369 | 369 |
370 /** | 370 /** |
371 * @constructor | 371 * @constructor |
372 * @extends {WebInspector.HeapSnapshotView.Perspective} | 372 * @extends {WebInspector.HeapSnapshotView.Perspective} |
373 */ | 373 */ |
374 WebInspector.HeapSnapshotView.AllocationPerspective = function() | 374 WebInspector.HeapSnapshotView.AllocationPerspective = function() |
375 { | 375 { |
376 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Allocation")); | 376 WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString(
"Allocation")); |
377 this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSna
pshotAllocationSplitViewState", 200, 200); | 377 this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSna
pshotAllocationSplitViewState", 200, 200); |
| 378 |
| 379 var resizer = document.createElementWithClass("div", "heap-snapshot-view-res
izer"); |
| 380 var title = resizer.createChild("div", "title").createChild("span"); |
| 381 title.textContent = WebInspector.UIString("Live objects"); |
| 382 this._allocationSplitView.hideDefaultResizer(); |
| 383 this._allocationSplitView.installResizer(resizer); |
| 384 |
| 385 this._allocationSplitView.sidebarElement().appendChild(resizer); |
378 } | 386 } |
379 | 387 |
380 WebInspector.HeapSnapshotView.AllocationPerspective.prototype = { | 388 WebInspector.HeapSnapshotView.AllocationPerspective.prototype = { |
381 /** | 389 /** |
382 * @override | 390 * @override |
383 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView | 391 * @param {!WebInspector.HeapSnapshotView} heapSnapshotView |
384 */ | 392 */ |
385 activate: function(heapSnapshotView) | 393 activate: function(heapSnapshotView) |
386 { | 394 { |
387 heapSnapshotView._allocationView.show(this._allocationSplitView.mainElem
ent()); | 395 heapSnapshotView._allocationView.show(this._allocationSplitView.mainElem
ent()); |
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2174 if (color) | 2182 if (color) |
2175 swatchDiv.style.backgroundColor = color; | 2183 swatchDiv.style.backgroundColor = color; |
2176 else | 2184 else |
2177 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); | 2185 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); |
2178 nameDiv.textContent = name; | 2186 nameDiv.textContent = name; |
2179 sizeDiv.textContent = WebInspector.UIString("%s KB", Number.withThousand
sSeparator(Math.round(value / 1024))); | 2187 sizeDiv.textContent = WebInspector.UIString("%s KB", Number.withThousand
sSeparator(Math.round(value / 1024))); |
2180 }, | 2188 }, |
2181 | 2189 |
2182 __proto__: WebInspector.VBox.prototype | 2190 __proto__: WebInspector.VBox.prototype |
2183 } | 2191 } |
OLD | NEW |