Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js

Issue 2653363002: [Devtools] Added typing to network in prep for removing unrestricted (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
pfeldman 2017/01/26 00:16:29 You are changing the logic here, now calculator is
allada 2017/01/26 22:57:43 In this case it should not matter since the only t
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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698