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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 this._timeCalculator = new Network.NetworkTransferTimeCalculator(); | 55 this._timeCalculator = new Network.NetworkTransferTimeCalculator(); |
56 /** @type {!Network.NetworkTransferDurationCalculator} */ | 56 /** @type {!Network.NetworkTransferDurationCalculator} */ |
57 this._durationCalculator = new Network.NetworkTransferDurationCalculator(); | 57 this._durationCalculator = new Network.NetworkTransferDurationCalculator(); |
58 this._calculator = this._timeCalculator; | 58 this._calculator = this._timeCalculator; |
59 | 59 |
60 /** | 60 /** |
61 * @this {Network.NetworkLogView} | 61 * @this {Network.NetworkLogView} |
62 */ | 62 */ |
63 function updateRowHeight() { | 63 function updateRowHeight() { |
64 /** @type {number} */ | 64 /** @type {number} */ |
65 this._rowHeight = !!this._networkLogLargeRowsSetting.get() ? 41 : 21; | 65 this._rawRowHeight = !!this._networkLogLargeRowsSetting.get() ? 41 : 21; |
allada
2017/05/16 21:40:06
Lets also turn the this._networkLogLargeRowsSettin
allada
2017/05/16 21:40:06
To help with removing @unrestricted lets define th
pfeldman
2017/05/16 22:34:16
Done.
pfeldman
2017/05/16 22:34:16
Not a great idea, the setting is the large/small,
| |
66 this._updateRowHeight(); | |
66 } | 67 } |
67 updateRowHeight.call(this); | 68 updateRowHeight.call(this); |
68 | 69 |
69 this._columns = new Network.NetworkLogViewColumns( | 70 this._columns = new Network.NetworkLogViewColumns( |
70 this, this._timeCalculator, this._durationCalculator, networkLogLargeRow sSetting); | 71 this, this._timeCalculator, this._durationCalculator, networkLogLargeRow sSetting); |
71 | 72 |
72 /** @type {!Map.<string, !Network.NetworkRequestNode>} */ | 73 /** @type {!Map.<string, !Network.NetworkRequestNode>} */ |
73 this._nodesByRequestId = new Map(); | 74 this._nodesByRequestId = new Map(); |
74 /** @type {!Object.<string, boolean>} */ | 75 /** @type {!Object.<string, boolean>} */ |
75 this._staleRequestIds = {}; | 76 this._staleRequestIds = {}; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 * @param {?string} groupKey | 363 * @param {?string} groupKey |
363 */ | 364 */ |
364 _setGrouping(groupKey) { | 365 _setGrouping(groupKey) { |
365 var groupLookup = groupKey ? this._groupLookups.get(groupKey) || null : null ; | 366 var groupLookup = groupKey ? this._groupLookups.get(groupKey) || null : null ; |
366 this._activeGroupLookup = groupLookup; | 367 this._activeGroupLookup = groupLookup; |
367 if (groupLookup) | 368 if (groupLookup) |
368 groupLookup.reset(); | 369 groupLookup.reset(); |
369 this._invalidateAllItems(); | 370 this._invalidateAllItems(); |
370 } | 371 } |
371 | 372 |
373 _updateRowHeight() { | |
374 this._rowHeight = Math.floor(this._rawRowHeight * window.devicePixelRatio) / window.devicePixelRatio; | |
375 } | |
376 | |
372 /** | 377 /** |
373 * @param {!SDK.NetworkRequest} request | 378 * @param {!SDK.NetworkRequest} request |
374 * @return {?Network.NetworkRequestNode} | 379 * @return {?Network.NetworkRequestNode} |
375 */ | 380 */ |
376 nodeForRequest(request) { | 381 nodeForRequest(request) { |
377 return this._nodesByRequestId.get(request.requestId()); | 382 return this._nodesByRequestId.get(request.requestId()); |
378 } | 383 } |
379 | 384 |
380 /** | 385 /** |
381 * @return {number} | 386 * @return {number} |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
791 } | 796 } |
792 | 797 |
793 /** | 798 /** |
794 * @override | 799 * @override |
795 */ | 800 */ |
796 willHide() { | 801 willHide() { |
797 this._columns.willHide(); | 802 this._columns.willHide(); |
798 } | 803 } |
799 | 804 |
800 /** | 805 /** |
806 * @override | |
807 */ | |
808 onResize() { | |
809 this._updateRowHeight(); | |
810 } | |
811 | |
812 /** | |
801 * @return {!Array<!Network.NetworkNode>} | 813 * @return {!Array<!Network.NetworkNode>} |
802 */ | 814 */ |
803 flatNodesList() { | 815 flatNodesList() { |
804 return this._dataGrid.rootNode().flatChildren(); | 816 return this._dataGrid.rootNode().flatChildren(); |
805 } | 817 } |
806 | 818 |
807 stylesChanged() { | 819 stylesChanged() { |
808 this._columns.scheduleRefresh(); | 820 this._columns.scheduleRefresh(); |
809 } | 821 } |
810 | 822 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
907 this.dispatchEventToListeners(Network.NetworkLogView.Events.RequestSelected, null); | 919 this.dispatchEventToListeners(Network.NetworkLogView.Events.RequestSelected, null); |
908 | 920 |
909 this._clearSearchMatchedList(); | 921 this._clearSearchMatchedList(); |
910 | 922 |
911 this._setHoveredNode(null); | 923 this._setHoveredNode(null); |
912 this._columns.reset(); | 924 this._columns.reset(); |
913 | 925 |
914 this._timeFilter = null; | 926 this._timeFilter = null; |
915 this._calculator.reset(); | 927 this._calculator.reset(); |
916 | 928 |
917 this._timeCalculator.setWindow(null); | 929 this._timeCalculator.setWindow(null); |
allada
2017/05/16 21:40:06
We need to add this here:
this._columns.setStickT
pfeldman
2017/05/16 22:34:16
You mean this._dataGrid.setStick... and below the
| |
918 this.linkifier.reset(); | 930 this.linkifier.reset(); |
919 this.badgePool.reset(); | 931 this.badgePool.reset(); |
920 | 932 |
921 if (this._activeGroupLookup) | 933 if (this._activeGroupLookup) |
922 this._activeGroupLookup.reset(); | 934 this._activeGroupLookup.reset(); |
923 this._nodesByRequestId.clear(); | 935 this._nodesByRequestId.clear(); |
924 this._staleRequestIds = {}; | 936 this._staleRequestIds = {}; |
925 this._resetSuggestionBuilder(); | 937 this._resetSuggestionBuilder(); |
926 | 938 |
927 this._mainRequestLoadTime = -1; | 939 this._mainRequestLoadTime = -1; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1818 | 1830 |
1819 Network.GroupLookupInterface.prototype = { | 1831 Network.GroupLookupInterface.prototype = { |
1820 /** | 1832 /** |
1821 * @param {!SDK.NetworkRequest} request | 1833 * @param {!SDK.NetworkRequest} request |
1822 * @return {?Network.NetworkGroupNode} | 1834 * @return {?Network.NetworkGroupNode} |
1823 */ | 1835 */ |
1824 groupNodeForRequest: function(request) {}, | 1836 groupNodeForRequest: function(request) {}, |
1825 | 1837 |
1826 reset: function() {} | 1838 reset: function() {} |
1827 }; | 1839 }; |
OLD | NEW |