| 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 26 matching lines...) Expand all Loading... |
| 37 { | 37 { |
| 38 WebInspector.VBox.call(this); | 38 WebInspector.VBox.call(this); |
| 39 this.registerRequiredCSS("canvasProfiler.css"); | 39 this.registerRequiredCSS("canvasProfiler.css"); |
| 40 this.element.classList.add("canvas-profile-view"); | 40 this.element.classList.add("canvas-profile-view"); |
| 41 this._profile = profile; | 41 this._profile = profile; |
| 42 this._traceLogId = profile.traceLogId(); | 42 this._traceLogId = profile.traceLogId(); |
| 43 this._traceLogPlayer = /** @type {!WebInspector.CanvasTraceLogPlayerProxy} *
/ (profile.traceLogPlayer()); | 43 this._traceLogPlayer = /** @type {!WebInspector.CanvasTraceLogPlayerProxy} *
/ (profile.traceLogPlayer()); |
| 44 this._linkifier = new WebInspector.Linkifier(); | 44 this._linkifier = new WebInspector.Linkifier(); |
| 45 | 45 |
| 46 this._replayInfoSplitView = new WebInspector.SplitView(true, true, "canvasPr
ofileViewReplaySplitViewState", 0.34); | 46 this._replayInfoSplitView = new WebInspector.SplitView(true, true, "canvasPr
ofileViewReplaySplitViewState", 0.34); |
| 47 this._replayInfoSplitView.setMainElementConstraints(25, 25); | |
| 48 this._replayInfoSplitView.show(this.element); | 47 this._replayInfoSplitView.show(this.element); |
| 49 | 48 |
| 50 this._imageSplitView = new WebInspector.SplitView(false, true, "canvasProfil
eViewSplitViewState", 300); | 49 this._imageSplitView = new WebInspector.SplitView(false, true, "canvasProfil
eViewSplitViewState", 300); |
| 51 this._imageSplitView.show(this._replayInfoSplitView.mainElement()); | 50 this._imageSplitView.show(this._replayInfoSplitView.mainElement()); |
| 52 | 51 |
| 53 var replayImageContainer = this._imageSplitView.mainElement().createChild("d
iv"); | 52 var replayImageContainerView = new WebInspector.VBox(); |
| 53 replayImageContainerView.setMinimumSize(new Size(50, 28)); |
| 54 replayImageContainerView.show(this._imageSplitView.mainElement()); |
| 55 |
| 56 var replayImageContainer = replayImageContainerView.element; |
| 54 replayImageContainer.id = "canvas-replay-image-container"; | 57 replayImageContainer.id = "canvas-replay-image-container"; |
| 55 this._replayImageElement = replayImageContainer.createChild("img", "canvas-r
eplay-image"); | 58 this._replayImageElement = replayImageContainer.createChild("img", "canvas-r
eplay-image"); |
| 56 this._debugInfoElement = replayImageContainer.createChild("div", "canvas-deb
ug-info hidden"); | 59 this._debugInfoElement = replayImageContainer.createChild("div", "canvas-deb
ug-info hidden"); |
| 57 this._spinnerIcon = replayImageContainer.createChild("div", "spinner-icon sm
all hidden"); | 60 this._spinnerIcon = replayImageContainer.createChild("div", "spinner-icon sm
all hidden"); |
| 58 | 61 |
| 59 var replayLogContainer = this._imageSplitView.sidebarElement(); | 62 var replayLogContainerView = new WebInspector.VBox(); |
| 63 replayLogContainerView.setMinimumSize(new Size(22, 22)); |
| 64 replayLogContainerView.show(this._imageSplitView.sidebarElement()); |
| 65 |
| 66 var replayLogContainer = replayLogContainerView.element; |
| 60 var controlsContainer = replayLogContainer.createChild("div", "status-bar"); | 67 var controlsContainer = replayLogContainer.createChild("div", "status-bar"); |
| 61 var logGridContainer = replayLogContainer.createChild("div", "canvas-replay-
log"); | 68 var logGridContainer = replayLogContainer.createChild("div", "canvas-replay-
log"); |
| 62 | 69 |
| 63 this._createControlButton(controlsContainer, "canvas-replay-first-step", Web
Inspector.UIString("First call."), this._onReplayFirstStepClick.bind(this)); | 70 this._createControlButton(controlsContainer, "canvas-replay-first-step", Web
Inspector.UIString("First call."), this._onReplayFirstStepClick.bind(this)); |
| 64 this._createControlButton(controlsContainer, "canvas-replay-prev-step", WebI
nspector.UIString("Previous call."), this._onReplayStepClick.bind(this, false)); | 71 this._createControlButton(controlsContainer, "canvas-replay-prev-step", WebI
nspector.UIString("Previous call."), this._onReplayStepClick.bind(this, false)); |
| 65 this._createControlButton(controlsContainer, "canvas-replay-next-step", WebI
nspector.UIString("Next call."), this._onReplayStepClick.bind(this, true)); | 72 this._createControlButton(controlsContainer, "canvas-replay-next-step", WebI
nspector.UIString("Next call."), this._onReplayStepClick.bind(this, true)); |
| 66 this._createControlButton(controlsContainer, "canvas-replay-prev-draw", WebI
nspector.UIString("Previous drawing call."), this._onReplayDrawingCallClick.bind
(this, false)); | 73 this._createControlButton(controlsContainer, "canvas-replay-prev-draw", WebI
nspector.UIString("Previous drawing call."), this._onReplayDrawingCallClick.bind
(this, false)); |
| 67 this._createControlButton(controlsContainer, "canvas-replay-next-draw", WebI
nspector.UIString("Next drawing call."), this._onReplayDrawingCallClick.bind(thi
s, true)); | 74 this._createControlButton(controlsContainer, "canvas-replay-next-draw", WebI
nspector.UIString("Next drawing call."), this._onReplayDrawingCallClick.bind(thi
s, true)); |
| 68 this._createControlButton(controlsContainer, "canvas-replay-last-step", WebI
nspector.UIString("Last call."), this._onReplayLastStepClick.bind(this)); | 75 this._createControlButton(controlsContainer, "canvas-replay-last-step", WebI
nspector.UIString("Last call."), this._onReplayLastStepClick.bind(this)); |
| 69 | 76 |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 }, | 1254 }, |
| 1248 | 1255 |
| 1249 clearResourceStates: function() | 1256 clearResourceStates: function() |
| 1250 { | 1257 { |
| 1251 this._currentResourceStates = {}; | 1258 this._currentResourceStates = {}; |
| 1252 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve
nts.CanvasReplayStateChanged); | 1259 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve
nts.CanvasReplayStateChanged); |
| 1253 }, | 1260 }, |
| 1254 | 1261 |
| 1255 __proto__: WebInspector.Object.prototype | 1262 __proto__: WebInspector.Object.prototype |
| 1256 } | 1263 } |
| OLD | NEW |