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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 if (selectedIndex === this._currentPerspectiveIndex) | 876 if (selectedIndex === this._currentPerspectiveIndex) |
877 return; | 877 return; |
878 | 878 |
879 if (this._dataGrid) | 879 if (this._dataGrid) |
880 this._dataGrid.removeEventListener(WebInspector.HeapSnapshotSortable
DataGrid.Events.ResetFilter, this._onResetClassNameFilter, this); | 880 this._dataGrid.removeEventListener(WebInspector.HeapSnapshotSortable
DataGrid.Events.ResetFilter, this._onResetClassNameFilter, this); |
881 | 881 |
882 this._currentPerspectiveIndex = selectedIndex; | 882 this._currentPerspectiveIndex = selectedIndex; |
883 | 883 |
884 this._currentPerspective.deactivate(this); | 884 this._currentPerspective.deactivate(this); |
885 var perspective = this._perspectives[selectedIndex]; | 885 var perspective = this._perspectives[selectedIndex]; |
886 perspective.activate(this); | |
887 this._currentPerspective = perspective; | 886 this._currentPerspective = perspective; |
888 this._dataGrid = perspective.masterGrid(this); | 887 this._dataGrid = perspective.masterGrid(this); |
| 888 perspective.activate(this); |
889 | 889 |
890 this.refreshVisibleData(); | 890 this.refreshVisibleData(); |
891 if (this._dataGrid) { | 891 if (this._dataGrid) { |
892 this._dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDat
aGrid.Events.ResetFilter, this._onResetClassNameFilter, this); | 892 this._dataGrid.addEventListener(WebInspector.HeapSnapshotSortableDat
aGrid.Events.ResetFilter, this._onResetClassNameFilter, this); |
893 this._dataGrid.updateWidths(); | 893 this._dataGrid.updateWidths(); |
894 } | 894 } |
895 | 895 |
896 this._updateDataSourceAndView(); | 896 this._updateDataSourceAndView(); |
897 | 897 |
898 if (!this.currentQuery || !this._searchFinishedCallback || !this._search
Results) | 898 if (!this.currentQuery || !this._searchFinishedCallback || !this._search
Results) |
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |