| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 * @override | 497 * @override |
| 498 * @return {!Array.<!Element>} | 498 * @return {!Array.<!Element>} |
| 499 */ | 499 */ |
| 500 elementsToRestoreScrollPositionsFor() { | 500 elementsToRestoreScrollPositionsFor() { |
| 501 if (!this._dataGrid) // Not initialized yet. | 501 if (!this._dataGrid) // Not initialized yet. |
| 502 return []; | 502 return []; |
| 503 return [this._dataGrid.scrollContainer]; | 503 return [this._dataGrid.scrollContainer]; |
| 504 } | 504 } |
| 505 | 505 |
| 506 _setupDataGrid() { | 506 _setupDataGrid() { |
| 507 /** @type {!UI.SortableDataGrid} */ |
| 507 this._dataGrid = this._columns.dataGrid(); | 508 this._dataGrid = this._columns.dataGrid(); |
| 508 this._dataGrid.setRowContextMenuCallback( | 509 this._dataGrid.setRowContextMenuCallback( |
| 509 (contextMenu, node) => this.handleContextMenuForRequest(contextMenu, nod
e.request())); | 510 (contextMenu, node) => this.handleContextMenuForRequest(contextMenu, nod
e.request())); |
| 510 this._dataGrid.setStickToBottom(true); | 511 this._dataGrid.setStickToBottom(true); |
| 511 this._dataGrid.setName('networkLog'); | 512 this._dataGrid.setName('networkLog'); |
| 512 this._dataGrid.setResizeMethod(UI.DataGrid.ResizeMethod.Last); | 513 this._dataGrid.setResizeMethod(UI.DataGrid.ResizeMethod.Last); |
| 513 this._dataGrid.element.classList.add('network-log-grid'); | 514 this._dataGrid.element.classList.add('network-log-grid'); |
| 514 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown
.bind(this), true); | 515 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown
.bind(this), true); |
| 515 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove
.bind(this), true); | 516 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove
.bind(this), true); |
| 516 this._dataGrid.element.addEventListener('mouseleave', this._dataGridMouseLea
ve.bind(this), true); | 517 this._dataGrid.element.addEventListener('mouseleave', this._dataGridMouseLea
ve.bind(this), true); |
| 517 } | 518 } |
| 518 | 519 |
| 519 /** | 520 /** |
| 520 * @param {!Event} event | 521 * @param {!Event} event |
| 521 */ | 522 */ |
| 522 _dataGridMouseMove(event) { | 523 _dataGridMouseMove(event) { |
| 523 var node = this._dataGrid.dataGridNodeFromNode(event.target); | 524 var node = /** @type {?Network.NetworkDataGridNode} */ ( |
| 525 this._dataGrid.dataGridNodeFromNode(/** @type {!Node} */ (event.target))
); |
| 524 var highlightInitiatorChain = event.shiftKey; | 526 var highlightInitiatorChain = event.shiftKey; |
| 525 this._setHoveredNode(node, highlightInitiatorChain); | 527 this._setHoveredNode(node, highlightInitiatorChain); |
| 526 this._highlightInitiatorChain((highlightInitiatorChain && node) ? node.reque
st() : null); | 528 this._highlightInitiatorChain((highlightInitiatorChain && node) ? node.reque
st() : null); |
| 527 } | 529 } |
| 528 | 530 |
| 529 _dataGridMouseLeave() { | 531 _dataGridMouseLeave() { |
| 530 this._setHoveredNode(null); | 532 this._setHoveredNode(null); |
| 531 this._highlightInitiatorChain(null); | 533 this._highlightInitiatorChain(null); |
| 532 } | 534 } |
| 533 | 535 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 * @override | 778 * @override |
| 777 */ | 779 */ |
| 778 willHide() { | 780 willHide() { |
| 779 this._columns.willHide(); | 781 this._columns.willHide(); |
| 780 } | 782 } |
| 781 | 783 |
| 782 /** | 784 /** |
| 783 * @return {!Array<!Network.NetworkDataGridNode>} | 785 * @return {!Array<!Network.NetworkDataGridNode>} |
| 784 */ | 786 */ |
| 785 flatNodesList() { | 787 flatNodesList() { |
| 786 return this._dataGrid.flatNodesList(); | 788 return this._dataGrid.rootNode().flatChildren(); |
| 787 } | 789 } |
| 788 | 790 |
| 789 _refresh() { | 791 _refresh() { |
| 790 this._needsRefresh = false; | 792 this._needsRefresh = false; |
| 791 | 793 |
| 792 if (this._refreshRequestId) { | 794 if (this._refreshRequestId) { |
| 793 this.element.window().cancelAnimationFrame(this._refreshRequestId); | 795 this.element.window().cancelAnimationFrame(this._refreshRequestId); |
| 794 delete this._refreshRequestId; | 796 delete this._refreshRequestId; |
| 795 } | 797 } |
| 796 | 798 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 Running: 'running', | 1715 Running: 'running', |
| 1714 FromCache: 'from-cache' | 1716 FromCache: 'from-cache' |
| 1715 }; | 1717 }; |
| 1716 | 1718 |
| 1717 /** @type {!Array<string>} */ | 1719 /** @type {!Array<string>} */ |
| 1718 Network.NetworkLogView._searchKeys = | 1720 Network.NetworkLogView._searchKeys = |
| 1719 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog
View.FilterType[key]); | 1721 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog
View.FilterType[key]); |
| 1720 | 1722 |
| 1721 /** @typedef {function(!SDK.NetworkRequest): boolean} */ | 1723 /** @typedef {function(!SDK.NetworkRequest): boolean} */ |
| 1722 Network.NetworkLogView.Filter; | 1724 Network.NetworkLogView.Filter; |
| OLD | NEW |