| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 this._traceLogId = profile.traceLogId(); | 43 this._traceLogId = profile.traceLogId(); |
| 44 this._traceLogPlayer = /** @type {!WebInspector.CanvasTraceLogPlayerProxy} *
/ (profile.traceLogPlayer()); | 44 this._traceLogPlayer = /** @type {!WebInspector.CanvasTraceLogPlayerProxy} *
/ (profile.traceLogPlayer()); |
| 45 this._linkifier = new WebInspector.Linkifier(); | 45 this._linkifier = new WebInspector.Linkifier(); |
| 46 | 46 |
| 47 this._replayInfoSplitView = new WebInspector.SplitView(true, true, "canvasPr
ofileViewReplaySplitViewState", 0.34); | 47 this._replayInfoSplitView = new WebInspector.SplitView(true, true, "canvasPr
ofileViewReplaySplitViewState", 0.34); |
| 48 this._replayInfoSplitView.show(this.element); | 48 this._replayInfoSplitView.show(this.element); |
| 49 | 49 |
| 50 this._imageSplitView = new WebInspector.SplitView(false, true, "canvasProfil
eViewSplitViewState", 300); | 50 this._imageSplitView = new WebInspector.SplitView(false, true, "canvasProfil
eViewSplitViewState", 300); |
| 51 this._imageSplitView.show(this._replayInfoSplitView.mainElement()); | 51 this._imageSplitView.show(this._replayInfoSplitView.mainElement()); |
| 52 | 52 |
| 53 var replayImageContainerView = new WebInspector.VBox(); | 53 var replayImageContainerView = new WebInspector.VBoxWithResizeCallback(this.
_onReplayImageResize.bind(this)); |
| 54 replayImageContainerView.setMinimumSize(50, 28); | 54 replayImageContainerView.setMinimumSize(50, 28); |
| 55 replayImageContainerView.show(this._imageSplitView.mainElement()); | 55 replayImageContainerView.show(this._imageSplitView.mainElement()); |
| 56 | 56 |
| 57 // NOTE: The replayImageContainer can NOT be a flex div (e.g. VBox or SplitV
iew elements)! | 57 var replayImageContainer = replayImageContainerView.element; |
| 58 var replayImageContainer = replayImageContainerView.element.createChild("div
"); | |
| 59 replayImageContainer.id = "canvas-replay-image-container"; | 58 replayImageContainer.id = "canvas-replay-image-container"; |
| 60 this._replayImageElement = replayImageContainer.createChild("img", "canvas-r
eplay-image"); | 59 var replayImageParent = replayImageContainer.createChild("div", "canvas-repl
ay-image-parent"); |
| 60 replayImageParent.createChild("span"); // Helps to align the image verticall
y. |
| 61 this._replayImageElement = replayImageParent.createChild("img"); |
| 61 this._debugInfoElement = replayImageContainer.createChild("div", "canvas-deb
ug-info hidden"); | 62 this._debugInfoElement = replayImageContainer.createChild("div", "canvas-deb
ug-info hidden"); |
| 62 this._spinnerIcon = replayImageContainer.createChild("div", "spinner-icon sm
all hidden"); | 63 this._spinnerIcon = replayImageContainer.createChild("div", "spinner-icon sm
all hidden"); |
| 63 | 64 |
| 64 var replayLogContainerView = new WebInspector.VBox(); | 65 var replayLogContainerView = new WebInspector.VBox(); |
| 65 replayLogContainerView.setMinimumSize(22, 22); | 66 replayLogContainerView.setMinimumSize(22, 22); |
| 66 replayLogContainerView.show(this._imageSplitView.sidebarElement()); | 67 replayLogContainerView.show(this._imageSplitView.sidebarElement()); |
| 67 | 68 |
| 68 var replayLogContainer = replayLogContainerView.element; | 69 var replayLogContainer = replayLogContainerView.element; |
| 69 var controlsContainer = replayLogContainer.createChild("div", "status-bar"); | 70 var controlsContainer = replayLogContainer.createChild("div", "status-bar"); |
| 70 var logGridContainer = replayLogContainer.createChild("div", "canvas-replay-
log"); | 71 var logGridContainer = replayLogContainer.createChild("div", "canvas-replay-
log"); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 get statusBarItems() | 123 get statusBarItems() |
| 123 { | 124 { |
| 124 return []; | 125 return []; |
| 125 }, | 126 }, |
| 126 | 127 |
| 127 get profile() | 128 get profile() |
| 128 { | 129 { |
| 129 return this._profile; | 130 return this._profile; |
| 130 }, | 131 }, |
| 131 | 132 |
| 133 _onReplayImageResize: function() |
| 134 { |
| 135 var parent = this._replayImageElement.parentElement; |
| 136 this._replayImageElement.style.maxWidth = parent.clientWidth + "px"; |
| 137 this._replayImageElement.style.maxHeight = parent.clientHeight + "px"; |
| 138 }, |
| 139 |
| 132 /** | 140 /** |
| 133 * @override | 141 * @override |
| 134 * @return {!Array.<!Element>} | 142 * @return {!Array.<!Element>} |
| 135 */ | 143 */ |
| 136 elementsToRestoreScrollPositionsFor: function() | 144 elementsToRestoreScrollPositionsFor: function() |
| 137 { | 145 { |
| 138 return [this._logGrid.scrollContainer]; | 146 return [this._logGrid.scrollContainer]; |
| 139 }, | 147 }, |
| 140 | 148 |
| 141 /** | 149 /** |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 }, | 1280 }, |
| 1273 | 1281 |
| 1274 clearResourceStates: function() | 1282 clearResourceStates: function() |
| 1275 { | 1283 { |
| 1276 this._currentResourceStates = {}; | 1284 this._currentResourceStates = {}; |
| 1277 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve
nts.CanvasReplayStateChanged); | 1285 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve
nts.CanvasReplayStateChanged); |
| 1278 }, | 1286 }, |
| 1279 | 1287 |
| 1280 __proto__: WebInspector.Object.prototype | 1288 __proto__: WebInspector.Object.prototype |
| 1281 } | 1289 } |
| OLD | NEW |