| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Network.NetworkWaterfallColumn = class extends UI.VBox { | 7 Network.NetworkWaterfallColumn = class extends UI.VBox { |
| 8 /** | 8 /** |
| 9 * @param {number} rowHeight | 9 * @param {number} rowHeight |
| 10 * @param {!Network.NetworkTimeCalculator} calculator | 10 * @param {!Network.NetworkTimeCalculator} calculator |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 this._leftPadding = 5; | 23 this._leftPadding = 5; |
| 24 /** @const */ | 24 /** @const */ |
| 25 this._fontSize = 10; | 25 this._fontSize = 10; |
| 26 | 26 |
| 27 this._rightPadding = 0; | 27 this._rightPadding = 0; |
| 28 | 28 |
| 29 this._rowHeight = rowHeight; | 29 this._rowHeight = rowHeight; |
| 30 this._headerHeight = 0; | 30 this._headerHeight = 0; |
| 31 this._calculator = calculator; | 31 this._calculator = calculator; |
| 32 | 32 |
| 33 this._offsetWidth = 0; |
| 34 this._offsetHeight = 0; |
| 35 this._startTime = this._calculator.minimumBoundary(); |
| 36 this._endTime = this._calculator.maximumBoundary(); |
| 37 |
| 33 this._popoverHelper = new UI.PopoverHelper(this.element); | 38 this._popoverHelper = new UI.PopoverHelper(this.element); |
| 34 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this), t
his._showPopover.bind(this)); | 39 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this), t
his._showPopover.bind(this)); |
| 35 this._popoverHelper.setTimeout(300, 300); | 40 this._popoverHelper.setTimeout(300, 300); |
| 36 | 41 |
| 37 /** @type {!Array<!Network.NetworkNode>} */ | 42 /** @type {!Array<!Network.NetworkNode>} */ |
| 38 this._nodes = []; | 43 this._nodes = []; |
| 39 | 44 |
| 40 /** @type {?Network.NetworkNode} */ | 45 /** @type {?Network.NetworkNode} */ |
| 41 this._hoveredNode = null; | 46 this._hoveredNode = null; |
| 42 | 47 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (scrollTop !== undefined && this._scrollTop !== scrollTop) { | 212 if (scrollTop !== undefined && this._scrollTop !== scrollTop) { |
| 208 this._popoverHelper.hidePopover(); | 213 this._popoverHelper.hidePopover(); |
| 209 this._scrollTop = scrollTop; | 214 this._scrollTop = scrollTop; |
| 210 } | 215 } |
| 211 if (nodes) { | 216 if (nodes) { |
| 212 this._nodes = nodes; | 217 this._nodes = nodes; |
| 213 this._calculateCanvasSize(); | 218 this._calculateCanvasSize(); |
| 214 } | 219 } |
| 215 if (eventDividers !== undefined) | 220 if (eventDividers !== undefined) |
| 216 this._eventDividers = eventDividers; | 221 this._eventDividers = eventDividers; |
| 217 this.element.window().cancelAnimationFrame(this._updateRequestID); | 222 if (this._updateRequestID) { |
| 218 this._updateRequestID = null; | 223 this.element.window().cancelAnimationFrame(this._updateRequestID); |
| 224 delete this._updateRequestID; |
| 225 } |
| 219 | 226 |
| 220 this._startTime = this._calculator.minimumBoundary(); | 227 this._startTime = this._calculator.minimumBoundary(); |
| 221 this._endTime = this._calculator.maximumBoundary(); | 228 this._endTime = this._calculator.maximumBoundary(); |
| 222 this._resetCanvas(); | 229 this._resetCanvas(); |
| 223 this._draw(); | 230 this._draw(); |
| 224 } | 231 } |
| 225 | 232 |
| 226 _resetCanvas() { | 233 _resetCanvas() { |
| 227 var ratio = window.devicePixelRatio; | 234 var ratio = window.devicePixelRatio; |
| 228 this._canvas.width = this._offsetWidth * ratio; | 235 this._canvas.width = this._offsetWidth * ratio; |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 font: 'hsl(8, 100%, 80%)', | 647 font: 'hsl(8, 100%, 80%)', |
| 641 media: 'hsl(90, 50%, 80%)', | 648 media: 'hsl(90, 50%, 80%)', |
| 642 image: 'hsl(90, 50%, 80%)', | 649 image: 'hsl(90, 50%, 80%)', |
| 643 script: 'hsl(31, 100%, 80%)', | 650 script: 'hsl(31, 100%, 80%)', |
| 644 stylesheet: 'hsl(272, 64%, 80%)', | 651 stylesheet: 'hsl(272, 64%, 80%)', |
| 645 texttrack: 'hsl(8, 100%, 80%)', | 652 texttrack: 'hsl(8, 100%, 80%)', |
| 646 websocket: 'hsl(0, 0%, 95%)', | 653 websocket: 'hsl(0, 0%, 95%)', |
| 647 xhr: 'hsl(53, 100%, 80%)', | 654 xhr: 'hsl(53, 100%, 80%)', |
| 648 other: 'hsl(0, 0%, 95%)' | 655 other: 'hsl(0, 0%, 95%)' |
| 649 }; | 656 }; |
| OLD | NEW |