OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 // Create grid in the records main area. | 145 // Create grid in the records main area. |
146 this._gridContainer = new WebInspector.ViewWithResizeCallback(this._onViewpo rtResize.bind(this)); | 146 this._gridContainer = new WebInspector.ViewWithResizeCallback(this._onViewpo rtResize.bind(this)); |
147 this._gridContainer.element.addStyleClass("fill"); | 147 this._gridContainer.element.addStyleClass("fill"); |
148 this._gridContainer.element.id = "resources-container-content"; | 148 this._gridContainer.element.id = "resources-container-content"; |
149 this._gridContainer.show(this._sidebarView.mainElement); | 149 this._gridContainer.show(this._sidebarView.mainElement); |
150 this._timelineGrid = new WebInspector.TimelineGrid(); | 150 this._timelineGrid = new WebInspector.TimelineGrid(); |
151 this._itemsGraphsElement = this._timelineGrid.itemsGraphsElement; | 151 this._itemsGraphsElement = this._timelineGrid.itemsGraphsElement; |
152 this._itemsGraphsElement.id = "timeline-graphs"; | 152 this._itemsGraphsElement.id = "timeline-graphs"; |
153 this._gridContainer.element.appendChild(this._timelineGrid.element); | 153 this._gridContainer.element.appendChild(this._timelineGrid.element); |
154 this._timelineGrid.gridHeaderElement.id = "timeline-grid-header"; | 154 this._timelineGrid.gridHeaderElement.id = "timeline-grid-header"; |
155 if (this._powerProfileEnabled) | |
156 this._timelineGrid.gridHeaderElement.addStyleClass("with-power"); | |
pfeldman
2014/01/09 11:38:52
No hacks like this please.
| |
157 | |
155 this._timelineGrid.gridHeaderElement.addStyleClass("fill"); | 158 this._timelineGrid.gridHeaderElement.addStyleClass("fill"); |
156 this._memoryStatistics.setMainTimelineGrid(this._timelineGrid); | 159 this._memoryStatistics.setMainTimelineGrid(this._timelineGrid); |
157 this._timelineMemorySplitter.mainElement.appendChild(this._timelineGrid.grid HeaderElement); | 160 this._timelineMemorySplitter.mainElement.appendChild(this._timelineGrid.grid HeaderElement); |
158 | 161 |
159 // Create gap elements | 162 // Create gap elements |
160 this._topGapElement = this._itemsGraphsElement.createChild("div", "timeline- gap"); | 163 this._topGapElement = this._itemsGraphsElement.createChild("div", "timeline- gap"); |
161 this._graphRowsElement = this._itemsGraphsElement.createChild("div"); | 164 this._graphRowsElement = this._itemsGraphsElement.createChild("div"); |
162 this._bottomGapElement = this._itemsGraphsElement.createChild("div", "timeli ne-gap"); | 165 this._bottomGapElement = this._itemsGraphsElement.createChild("div", "timeli ne-gap"); |
163 this._expandElements = this._itemsGraphsElement.createChild("div"); | 166 this._expandElements = this._itemsGraphsElement.createChild("div"); |
164 this._expandElements.id = "orphan-expand-elements"; | 167 this._expandElements.id = "orphan-expand-elements"; |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
541 var frameMode = mode === WebInspector.TimelineOverviewPane.Mode.Frames; | 544 var frameMode = mode === WebInspector.TimelineOverviewPane.Mode.Frames; |
542 this._overviewModeSetting.set(mode); | 545 this._overviewModeSetting.set(mode); |
543 if (frameMode !== this._frameMode) { | 546 if (frameMode !== this._frameMode) { |
544 this._frameMode = frameMode; | 547 this._frameMode = frameMode; |
545 this._glueParentButton.setEnabled(!frameMode); | 548 this._glueParentButton.setEnabled(!frameMode); |
546 this._presentationModel.setGlueRecords(this._glueParentButton.toggle d && !frameMode); | 549 this._presentationModel.setGlueRecords(this._glueParentButton.toggle d && !frameMode); |
547 this._repopulateRecords(); | 550 this._repopulateRecords(); |
548 | 551 |
549 if (frameMode) { | 552 if (frameMode) { |
550 this.element.addStyleClass("timeline-frame-overview"); | 553 this.element.addStyleClass("timeline-frame-overview"); |
554 if (this._powerProfileEnabled) | |
555 this.element.addStyleClass("with-power"); | |
551 this.recordsCounter.element.addStyleClass("hidden"); | 556 this.recordsCounter.element.addStyleClass("hidden"); |
552 this._frameController = new WebInspector.TimelineFrameController (this._model, this._overviewPane, this._presentationModel); | 557 this._frameController = new WebInspector.TimelineFrameController (this._model, this._overviewPane, this._presentationModel); |
553 } else { | 558 } else { |
554 this._frameController.dispose(); | 559 this._frameController.dispose(); |
555 this._frameController = null; | 560 this._frameController = null; |
556 this.element.removeStyleClass("timeline-frame-overview"); | 561 this.element.removeStyleClass("timeline-frame-overview"); |
562 if (this._powerProfileEnabled) | |
563 this.element.removeStyleClass("with-power"); | |
557 this.recordsCounter.element.removeStyleClass("hidden"); | 564 this.recordsCounter.element.removeStyleClass("hidden"); |
558 } | 565 } |
559 } | 566 } |
560 | 567 |
561 if (shouldShowMemory) | 568 if (shouldShowMemory) |
562 this._timelineMemorySplitter.showBoth(); | 569 this._timelineMemorySplitter.showBoth(); |
563 else | 570 else |
564 this._timelineMemorySplitter.showOnlyFirst(); | 571 this._timelineMemorySplitter.showOnlyFirst(); |
565 this.onResize(); | 572 this.onResize(); |
566 this._updateSelectionDetails(); | 573 this._updateSelectionDetails(); |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1972 * @param {boolean} vertical | 1979 * @param {boolean} vertical |
1973 */ | 1980 */ |
1974 setVertical: function(vertical) | 1981 setVertical: function(vertical) |
1975 { | 1982 { |
1976 this._contentElement.enableStyleClass("hbox", !vertical); | 1983 this._contentElement.enableStyleClass("hbox", !vertical); |
1977 this._contentElement.enableStyleClass("vbox", vertical); | 1984 this._contentElement.enableStyleClass("vbox", vertical); |
1978 }, | 1985 }, |
1979 | 1986 |
1980 __proto__: WebInspector.View.prototype | 1987 __proto__: WebInspector.View.prototype |
1981 } | 1988 } |
OLD | NEW |