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

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

Issue 2458403003: [Devtools] Added default width to canvas timeline in network panel exp (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.NetworkLogView} networkLogView 7 * @param {!WebInspector.NetworkLogView} networkLogView
8 * @param {!WebInspector.NetworkTransferTimeCalculator} timeCalculator 8 * @param {!WebInspector.NetworkTransferTimeCalculator} timeCalculator
9 * @param {!WebInspector.NetworkTransferDurationCalculator} durationCalculator 9 * @param {!WebInspector.NetworkTransferDurationCalculator} durationCalculator
10 * @param {!WebInspector.Setting} networkLogLargeRowsSetting 10 * @param {!WebInspector.Setting} networkLogLargeRowsSetting
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 this._timelineGrid.element.classList.add("network-timeline-grid"); 445 this._timelineGrid.element.classList.add("network-timeline-grid");
446 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline")) 446 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline"))
447 this._dataGrid.element.appendChild(this._timelineGrid.element); 447 this._dataGrid.element.appendChild(this._timelineGrid.element);
448 448
449 this._setupDropdownColumns(); 449 this._setupDropdownColumns();
450 450
451 this._activeTimelineSortId = WebInspector.NetworkLogViewColumns.Timeline SortIds.StartTime; 451 this._activeTimelineSortId = WebInspector.NetworkLogViewColumns.Timeline SortIds.StartTime;
452 this._dataGrid.markColumnAsSortedBy(WebInspector.NetworkLogViewColumns._ initialSortColumn, WebInspector.DataGrid.Order.Ascending); 452 this._dataGrid.markColumnAsSortedBy(WebInspector.NetworkLogViewColumns._ initialSortColumn, WebInspector.DataGrid.Order.Ascending);
453 453
454 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) { 454 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) {
455 this._splitWidget = new WebInspector.SplitWidget(true, false, "netwo rkPanelSplitViewTimeline"); 455 this._splitWidget = new WebInspector.SplitWidget(true, true, "networ kPanelSplitViewTimeline", 200);
456 this._splitWidget.setSidebarWidget(this._dataGrid.asWidget()); 456 this._splitWidget.setMainWidget(this._dataGrid.asWidget());
457 } 457 }
458 }, 458 },
459 459
460 _setupTimeline: function() 460 _setupTimeline: function()
461 { 461 {
462 this._timelineColumn = new WebInspector.NetworkTimelineColumn(this._netw orkLogView.rowHeight(), this._networkLogView.calculator()); 462 this._timelineColumn = new WebInspector.NetworkTimelineColumn(this._netw orkLogView.rowHeight(), this._networkLogView.calculator());
463 463
464 this._timelineColumn.element.addEventListener("contextmenu", handleConte xtMenu.bind(this)); 464 this._timelineColumn.element.addEventListener("contextmenu", handleConte xtMenu.bind(this));
465 this._timelineColumn.element.addEventListener("mousewheel", this._onMous eWheel.bind(this, false), { passive: true }); 465 this._timelineColumn.element.addEventListener("mousewheel", this._onMous eWheel.bind(this, false), { passive: true });
466 this._dataGridScroller.addEventListener("mousewheel",this._onMouseWheel. bind(this, true), true); 466 this._dataGridScroller.addEventListener("mousewheel",this._onMouseWheel. bind(this, true), true);
467 467
468 this._timelineColumn.element.addEventListener("mousemove", event => this ._networkLogView.setHoveredRequest(this._timelineColumn.getRequestFromPoint(even t.offsetX, event.offsetY + event.target.offsetTop)), true); 468 this._timelineColumn.element.addEventListener("mousemove", event => this ._networkLogView.setHoveredRequest(this._timelineColumn.getRequestFromPoint(even t.offsetX, event.offsetY + event.target.offsetTop)), true);
469 this._timelineColumn.element.addEventListener("mouseleave", this._networ kLogView.setHoveredRequest.bind(this._networkLogView, null), true); 469 this._timelineColumn.element.addEventListener("mouseleave", this._networ kLogView.setHoveredRequest.bind(this._networkLogView, null), true);
470 470
471 this._timelineScroller = this._timelineColumn.contentElement.createChild ("div", "network-timeline-v-scroll"); 471 this._timelineScroller = this._timelineColumn.contentElement.createChild ("div", "network-timeline-v-scroll");
472 this._timelineScroller.addEventListener("scroll", this._syncScrollers.bi nd(this), { passive: true }); 472 this._timelineScroller.addEventListener("scroll", this._syncScrollers.bi nd(this), { passive: true });
473 this._timelineScrollerContent = this._timelineScroller.createChild("div" , "network-timeline-v-scroll-content"); 473 this._timelineScrollerContent = this._timelineScroller.createChild("div" , "network-timeline-v-scroll-content");
474 474
475 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.PaddingChan ged, () => { 475 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.PaddingChan ged, () => {
476 this._timelineScrollerWidthIsStale = true; 476 this._timelineScrollerWidthIsStale = true;
477 this._syncScrollers(); 477 this._syncScrollers();
478 }); 478 });
479 this._dataGrid.addEventListener(WebInspector.ViewportDataGrid.Events.Vie wportCalculated, this._redrawTimelineColumn.bind(this)); 479 this._dataGrid.addEventListener(WebInspector.ViewportDataGrid.Events.Vie wportCalculated, this._redrawTimelineColumn.bind(this));
480 480
481 481
482 this._createTimelineHeader(); 482 this._createTimelineHeader();
483 this._timelineColumn.contentElement.classList.add("network-timeline-view "); 483 this._timelineColumn.contentElement.classList.add("network-timeline-view ");
484 484
485 this._splitWidget.setMainWidget(this._timelineColumn); 485 this._splitWidget.setSidebarWidget(this._timelineColumn);
486 486
487 this.switchViewMode(false); 487 this.switchViewMode(false);
488 488
489 /** 489 /**
490 * @param {!Event} event 490 * @param {!Event} event
491 * @this {WebInspector.NetworkLogViewColumns} 491 * @this {WebInspector.NetworkLogViewColumns}
492 */ 492 */
493 function handleContextMenu(event) 493 function handleContextMenu(event)
494 { 494 {
495 var request = this._timelineColumn.getRequestFromPoint(event.offsetX , event.offsetY); 495 var request = this._timelineColumn.getRequestFromPoint(event.offsetX , event.offsetY);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 { 1116 {
1117 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) { 1117 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) {
1118 this._shownEventDividers.delete(WebInspector.NetworkLogViewColumns._ filmStripDividerColor); 1118 this._shownEventDividers.delete(WebInspector.NetworkLogViewColumns._ filmStripDividerColor);
1119 this._redrawTimelineColumn(); 1119 this._redrawTimelineColumn();
1120 return; 1120 return;
1121 } 1121 }
1122 for (var divider of this._eventDividers) 1122 for (var divider of this._eventDividers)
1123 divider.element.classList.toggle("network-frame-divider-selected", f alse); 1123 divider.element.classList.toggle("network-frame-divider-selected", f alse);
1124 } 1124 }
1125 }; 1125 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698