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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 if (profile._profileType.id === WebInspector.TrackingHeapSnapshotProfileType
.TypeId) { | 45 if (profile._profileType.id === WebInspector.TrackingHeapSnapshotProfileType
.TypeId) { |
46 this._trackingOverviewGrid = new WebInspector.HeapTrackingOverviewGrid(p
rofile); | 46 this._trackingOverviewGrid = new WebInspector.HeapTrackingOverviewGrid(p
rofile); |
47 this._trackingOverviewGrid.addEventListener(WebInspector.HeapTrackingOve
rviewGrid.IdsRangeChanged, this._onIdsRangeChanged.bind(this)); | 47 this._trackingOverviewGrid.addEventListener(WebInspector.HeapTrackingOve
rviewGrid.IdsRangeChanged, this._onIdsRangeChanged.bind(this)); |
48 } | 48 } |
49 | 49 |
50 this._splitView = new WebInspector.SplitView(false, true, "heapSnapshotSplit
ViewState", 200, 200); | 50 this._splitView = new WebInspector.SplitView(false, true, "heapSnapshotSplit
ViewState", 200, 200); |
51 this._splitView.show(this.element); | 51 this._splitView.show(this.element); |
52 | 52 |
53 this._containmentView = new WebInspector.VBox(); | 53 this._containmentView = new WebInspector.VBox(); |
54 this._containmentView.setMinimumSize(50, 25); | 54 this._containmentView.setConstraints(50, 25); |
55 this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid
(); | 55 this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid
(); |
56 this._containmentDataGrid.show(this._containmentView.element); | 56 this._containmentDataGrid.show(this._containmentView.element); |
57 this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Sele
ctedNode, this._selectionChanged, this); | 57 this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Sele
ctedNode, this._selectionChanged, this); |
58 | 58 |
59 this._statisticsView = new WebInspector.HeapSnapshotStatisticsView(); | 59 this._statisticsView = new WebInspector.HeapSnapshotStatisticsView(); |
60 | 60 |
61 this._constructorsView = new WebInspector.VBox(); | 61 this._constructorsView = new WebInspector.VBox(); |
62 this._constructorsView.setMinimumSize(50, 25); | 62 this._constructorsView.setConstraints(50, 25); |
63 | 63 |
64 this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGr
id(); | 64 this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGr
id(); |
65 this._constructorsDataGrid.show(this._constructorsView.element); | 65 this._constructorsDataGrid.show(this._constructorsView.element); |
66 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel
ectedNode, this._selectionChanged, this); | 66 this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.Sel
ectedNode, this._selectionChanged, this); |
67 | 67 |
68 this._diffView = new WebInspector.VBox(); | 68 this._diffView = new WebInspector.VBox(); |
69 this._diffView.setMinimumSize(50, 25); | 69 this._diffView.setConstraints(50, 25); |
70 | 70 |
71 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(); | 71 this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(); |
72 this._diffDataGrid.show(this._diffView.element); | 72 this._diffDataGrid.show(this._diffView.element); |
73 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod
e, this._selectionChanged, this); | 73 this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNod
e, this._selectionChanged, this); |
74 | 74 |
75 this._dominatorView = new WebInspector.VBox(); | 75 this._dominatorView = new WebInspector.VBox(); |
76 this._dominatorView.setMinimumSize(50, 25); | 76 this._dominatorView.setConstraints(50, 25); |
77 this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(); | 77 this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(); |
78 this._dominatorDataGrid.show(this._dominatorView.element); | 78 this._dominatorDataGrid.show(this._dominatorView.element); |
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.setConstraints(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", "retaine
rs-view-header"); |
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.setConstraints(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); |
100 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid()
; | 100 this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid()
; |
101 this._retainmentDataGrid.show(this._retainmentView.element); | 101 this._retainmentDataGrid.show(this._retainmentView.element); |
102 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec
tedNode, this._inspectedObjectChanged, this); | 102 this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.Selec
tedNode, this._inspectedObjectChanged, this); |
103 this._retainmentDataGrid.reset(); | 103 this._retainmentDataGrid.reset(); |
104 | 104 |
105 this._perspectives = []; | 105 this._perspectives = []; |
106 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective
()); | 106 this._perspectives.push(new WebInspector.HeapSnapshotView.SummaryPerspective
()); |
107 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac
kingHeapSnapshotProfileType) | 107 if (profile.profileType() !== WebInspector.ProfileTypeRegistry.instance.trac
kingHeapSnapshotProfileType) |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2133 } | 2133 } |
2134 | 2134 |
2135 | 2135 |
2136 /** | 2136 /** |
2137 * @constructor | 2137 * @constructor |
2138 * @extends {WebInspector.VBox} | 2138 * @extends {WebInspector.VBox} |
2139 */ | 2139 */ |
2140 WebInspector.HeapSnapshotStatisticsView = function() | 2140 WebInspector.HeapSnapshotStatisticsView = function() |
2141 { | 2141 { |
2142 WebInspector.VBox.call(this); | 2142 WebInspector.VBox.call(this); |
2143 this.setMinimumSize(50, 25); | 2143 this.setConstraints(50, 25); |
2144 this._pieChart = new WebInspector.PieChart(); | 2144 this._pieChart = new WebInspector.PieChart(); |
2145 this._pieChart.setSize(150); | 2145 this._pieChart.setSize(150); |
2146 this.element.appendChild(this._pieChart.element); | 2146 this.element.appendChild(this._pieChart.element); |
2147 this._labels = this.element.createChild("div", "heap-snapshot-stats-legend")
; | 2147 this._labels = this.element.createChild("div", "heap-snapshot-stats-legend")
; |
2148 } | 2148 } |
2149 | 2149 |
2150 WebInspector.HeapSnapshotStatisticsView.prototype = { | 2150 WebInspector.HeapSnapshotStatisticsView.prototype = { |
2151 /** | 2151 /** |
2152 * @param {number} value | 2152 * @param {number} value |
2153 */ | 2153 */ |
(...skipping 19 matching lines...) Expand all Loading... |
2173 if (color) | 2173 if (color) |
2174 swatchDiv.style.backgroundColor = color; | 2174 swatchDiv.style.backgroundColor = color; |
2175 else | 2175 else |
2176 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); | 2176 swatchDiv.classList.add("heap-snapshot-stats-empty-swatch"); |
2177 nameDiv.textContent = name; | 2177 nameDiv.textContent = name; |
2178 sizeDiv.textContent = WebInspector.UIString("%s KB", Number.withThousand
sSeparator(Math.round(value / 1024))); | 2178 sizeDiv.textContent = WebInspector.UIString("%s KB", Number.withThousand
sSeparator(Math.round(value / 1024))); |
2179 }, | 2179 }, |
2180 | 2180 |
2181 __proto__: WebInspector.VBox.prototype | 2181 __proto__: WebInspector.VBox.prototype |
2182 } | 2182 } |
OLD | NEW |