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 10 matching lines...) Expand all Loading... | |
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 importScript("FilterSuggestionBuilder.js"); | |
31 importScript("RequestView.js"); | 32 importScript("RequestView.js"); |
32 importScript("NetworkItemView.js"); | 33 importScript("NetworkItemView.js"); |
33 importScript("RequestCookiesView.js"); | 34 importScript("RequestCookiesView.js"); |
34 importScript("RequestHeadersView.js"); | 35 importScript("RequestHeadersView.js"); |
35 importScript("RequestHTMLView.js"); | 36 importScript("RequestHTMLView.js"); |
36 importScript("RequestJSONView.js"); | 37 importScript("RequestJSONView.js"); |
37 importScript("RequestPreviewView.js"); | 38 importScript("RequestPreviewView.js"); |
38 importScript("RequestResponseView.js"); | 39 importScript("RequestResponseView.js"); |
39 importScript("RequestTimingView.js"); | 40 importScript("RequestTimingView.js"); |
40 importScript("ResourceWebSocketFrameView.js"); | 41 importScript("ResourceWebSocketFrameView.js"); |
41 | 42 |
42 /** | 43 /** |
43 * @constructor | 44 * @constructor |
44 * @implements {WebInspector.Searchable} | 45 * @implements {WebInspector.Searchable} |
45 * @extends {WebInspector.View} | 46 * @extends {WebInspector.View} |
46 * @param {!WebInspector.FilterBar} filterBar | 47 * @param {!WebInspector.FilterBar} filterBar |
47 * @param {!WebInspector.Setting} coulmnsVisibilitySetting | 48 * @param {!WebInspector.Setting} coulmnsVisibilitySetting |
48 */ | 49 */ |
49 WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting) | 50 WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting) |
50 { | 51 { |
51 WebInspector.View.call(this); | 52 WebInspector.View.call(this); |
52 this.registerRequiredCSS("networkLogView.css"); | 53 this.registerRequiredCSS("networkLogView.css"); |
53 this.registerRequiredCSS("filter.css"); | 54 this.registerRequiredCSS("filter.css"); |
55 this.registerRequiredCSS("textPrompt.css"); | |
54 | 56 |
55 this._filterBar = filterBar; | 57 this._filterBar = filterBar; |
56 this._coulmnsVisibilitySetting = coulmnsVisibilitySetting; | 58 this._coulmnsVisibilitySetting = coulmnsVisibilitySetting; |
57 this._allowRequestSelection = false; | 59 this._allowRequestSelection = false; |
58 this._requests = []; | 60 this._requests = []; |
59 this._requestsById = {}; | 61 this._requestsById = {}; |
60 this._requestsByURL = {}; | 62 this._requestsByURL = {}; |
61 this._staleRequests = {}; | 63 this._staleRequests = {}; |
62 this._requestGridNodes = {}; | 64 this._requestGridNodes = {}; |
63 this._lastRequestGridNodeId = 0; | 65 this._lastRequestGridNodeId = 0; |
64 this._mainRequestLoadTime = -1; | 66 this._mainRequestLoadTime = -1; |
65 this._mainRequestDOMContentLoadedTime = -1; | 67 this._mainRequestDOMContentLoadedTime = -1; |
66 this._matchedRequests = []; | 68 this._matchedRequests = []; |
67 this._highlightedSubstringChanges = []; | 69 this._highlightedSubstringChanges = []; |
68 this._filteredOutRequests = new Map(); | 70 this._filteredOutRequests = new Map(); |
69 | 71 |
72 /** @type {!Array.<!WebInspector.NetworkLogView.Filter>} */ | |
73 this._filters = []; | |
74 | |
70 this._matchedRequestsMap = {}; | 75 this._matchedRequestsMap = {}; |
71 this._currentMatchedRequestIndex = -1; | 76 this._currentMatchedRequestIndex = -1; |
72 | 77 |
73 this._createStatusbarButtons(); | 78 this._createStatusbarButtons(); |
74 this._createStatusBarItems(); | 79 this._createStatusBarItems(); |
75 this._linkifier = new WebInspector.Linkifier(); | 80 this._linkifier = new WebInspector.Linkifier(); |
76 | 81 |
77 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestStarted, this._onRequestStarted, this); | 82 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestStarted, this._onRequestStarted, this); |
78 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestUpdated, this._onRequestUpdated, this); | 83 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestUpdated, this._onRequestUpdated, this); |
79 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestFinished, this._onRequestUpdated, this); | 84 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestFinished, this._onRequestUpdated, this); |
80 | 85 |
81 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillReloadPage, this._willReloadPage, this); | 86 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillReloadPage, this._willReloadPage, this); |
82 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this); | 87 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this); |
83 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.Load, this._loadEventFired, this); | 88 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.Load, this._loadEventFired, this); |
84 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.DOMContentLoaded, this._domContentLoadedEventFired, this); | 89 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.DOMContentLoaded, this._domContentLoadedEventFired, this); |
85 | 90 |
86 this._addFilters(); | 91 this._addFilters(); |
92 this._resetSuggestionBuilder(); | |
87 this._initializeView(); | 93 this._initializeView(); |
88 this._recordButton.toggled = true; | 94 this._recordButton.toggled = true; |
89 WebInspector.networkLog.requests.forEach(this._appendRequest.bind(this)); | 95 WebInspector.networkLog.requests.forEach(this._appendRequest.bind(this)); |
90 } | 96 } |
91 | 97 |
92 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; | 98 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; |
93 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified" , "Server", "Vary"]; | 99 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified" , "Server", "Vary"]; |
94 WebInspector.NetworkLogView._defaultColumnsVisibility = { | 100 WebInspector.NetworkLogView._defaultColumnsVisibility = { |
95 method: true, status: true, scheme: false, domain: false, remoteAddress: fal se, type: true, initiator: true, cookies: false, setCookies: false, size: true, time: true, | 101 method: true, status: true, scheme: false, domain: false, remoteAddress: fal se, type: true, initiator: true, cookies: false, setCookies: false, size: true, time: true, |
96 "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Con tent-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false, "Server": false, "Vary": false | 102 "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Con tent-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false, "Server": false, "Vary": false |
(...skipping 14 matching lines...) Expand all Loading... | |
111 } | 117 } |
112 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this); | 118 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this); |
113 this._filterBar.addFilter(this._resourceTypeFilterUI); | 119 this._filterBar.addFilter(this._resourceTypeFilterUI); |
114 | 120 |
115 var dataURLSetting = WebInspector.settings.networkHideDataURL; | 121 var dataURLSetting = WebInspector.settings.networkHideDataURL; |
116 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); | 122 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); |
117 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this); | 123 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this); |
118 this._filterBar.addFilter(this._dataURLFilterUI); | 124 this._filterBar.addFilter(this._dataURLFilterUI); |
119 }, | 125 }, |
120 | 126 |
127 _resetSuggestionBuilder: function() | |
128 { | |
129 this._suggestionBuilder = new WebInspector.FilterSuggestionBuilder(WebIn spector.NetworkPanel._searchKeys); | |
130 this._textFilterUI.setSuggestionBuilder(this._suggestionBuilder); | |
131 }, | |
132 | |
121 _filterChanged: function(event) | 133 _filterChanged: function(event) |
122 { | 134 { |
123 this._removeAllNodeHighlights(); | 135 this._removeAllNodeHighlights(); |
124 this.searchCanceled(); | 136 this.searchCanceled(); |
137 this._parseFilterQuery(this._textFilterUI.value()); | |
125 this._filterRequests(); | 138 this._filterRequests(); |
126 }, | 139 }, |
127 | 140 |
128 _initializeView: function() | 141 _initializeView: function() |
129 { | 142 { |
130 this.element.id = "network-container"; | 143 this.element.id = "network-container"; |
131 | 144 |
132 this._createSortingFunctions(); | 145 this._createSortingFunctions(); |
133 this._createTable(); | 146 this._createTable(); |
134 this._createTimelineGrid(); | 147 this._createTimelineGrid(); |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
736 this._popoverHelper.hidePopover(); | 749 this._popoverHelper.hidePopover(); |
737 | 750 |
738 if (this._calculator) | 751 if (this._calculator) |
739 this._calculator.reset(); | 752 this._calculator.reset(); |
740 | 753 |
741 this._requests = []; | 754 this._requests = []; |
742 this._requestsById = {}; | 755 this._requestsById = {}; |
743 this._requestsByURL = {}; | 756 this._requestsByURL = {}; |
744 this._staleRequests = {}; | 757 this._staleRequests = {}; |
745 this._requestGridNodes = {}; | 758 this._requestGridNodes = {}; |
759 this._resetSuggestionBuilder(); | |
746 | 760 |
747 if (this._dataGrid) { | 761 if (this._dataGrid) { |
748 this._dataGrid.rootNode().removeChildren(); | 762 this._dataGrid.rootNode().removeChildren(); |
749 this._updateDividersIfNeeded(); | 763 this._updateDividersIfNeeded(); |
750 this._updateSummaryBar(); | 764 this._updateSummaryBar(); |
751 } | 765 } |
752 | 766 |
753 this._mainRequestLoadTime = -1; | 767 this._mainRequestLoadTime = -1; |
754 this._mainRequestDOMContentLoadedTime = -1; | 768 this._mainRequestDOMContentLoadedTime = -1; |
755 }, | 769 }, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
799 this._refreshRequest(request); | 813 this._refreshRequest(request); |
800 }, | 814 }, |
801 | 815 |
802 /** | 816 /** |
803 * @param {!WebInspector.NetworkRequest} request | 817 * @param {!WebInspector.NetworkRequest} request |
804 */ | 818 */ |
805 _refreshRequest: function(request) | 819 _refreshRequest: function(request) |
806 { | 820 { |
807 if (!this._requestsById[request.requestId]) | 821 if (!this._requestsById[request.requestId]) |
808 return; | 822 return; |
823 | |
824 this._suggestionBuilder.addItem(WebInspector.NetworkPanel.FilterType.Dom ain, request.domain); | |
825 this._suggestionBuilder.addItem(WebInspector.NetworkPanel.FilterType.Mim eType, request.mimeType); | |
826 | |
809 this._staleRequests[request.requestId] = request; | 827 this._staleRequests[request.requestId] = request; |
810 this._scheduleRefresh(); | 828 this._scheduleRefresh(); |
811 }, | 829 }, |
812 | 830 |
813 _willReloadPage: function(event) | 831 _willReloadPage: function(event) |
814 { | 832 { |
815 this._recordButton.toggled = true; | 833 this._recordButton.toggled = true; |
816 if (!this._preserveLogCheckbox.checked()) | 834 if (!this._preserveLogCheckbox.checked()) |
817 this._reset(); | 835 this._reset(); |
818 }, | 836 }, |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1284 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Sea rchCountUpdated, this._matchedRequests.length); | 1302 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Sea rchCountUpdated, this._matchedRequests.length); |
1285 if (shouldJump) | 1303 if (shouldJump) |
1286 this._highlightNthMatchedRequestForSearch(newMatchedRequestIndex, tr ue); | 1304 this._highlightNthMatchedRequestForSearch(newMatchedRequestIndex, tr ue); |
1287 }, | 1305 }, |
1288 | 1306 |
1289 /** | 1307 /** |
1290 * @param {!WebInspector.NetworkDataGridNode} node | 1308 * @param {!WebInspector.NetworkDataGridNode} node |
1291 */ | 1309 */ |
1292 _applyFilter: function(node) | 1310 _applyFilter: function(node) |
1293 { | 1311 { |
1294 var filter = this._textFilterUI.regex(); | |
1295 var request = node._request; | 1312 var request = node._request; |
1296 | 1313 var matches = this._resourceTypeFilterUI.accept(request.type.name()); |
1297 var matches = true; | |
1298 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) | 1314 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) |
1299 matches = false; | 1315 matches = false; |
1300 if (matches && !this._resourceTypeFilterUI.accept(request.type.name())) | 1316 for (var i = 0; matches && (i < this._filters.length); ++i) |
1301 matches = false; | 1317 matches = this._filters[i](request); |
1302 | |
1303 if (matches && filter) { | |
1304 matches = filter.test(request.name()) || filter.test(request.path()) ; | |
1305 if (matches) | |
1306 this._highlightMatchedRequest(request, false, filter); | |
1307 } | |
1308 | 1318 |
1309 node.element.enableStyleClass("filtered-out", !matches); | 1319 node.element.enableStyleClass("filtered-out", !matches); |
1310 if (matches) | 1320 if (matches) |
1311 this._filteredOutRequests.remove(request); | 1321 this._filteredOutRequests.remove(request); |
1312 else | 1322 else |
1313 this._filteredOutRequests.put(request, true); | 1323 this._filteredOutRequests.put(request, true); |
1314 }, | 1324 }, |
1315 | 1325 |
1326 /** | |
1327 * @param {string} query | |
1328 */ | |
1329 _parseFilterQuery: function(query) | |
1330 { | |
1331 var parsedQuery = this._suggestionBuilder.parseQuery(query); | |
1332 this._filters = parsedQuery.text.map(this._createTextFilter); | |
1333 for (var key in parsedQuery.filters) { | |
1334 var filterType = /** @type {!WebInspector.NetworkPanel.FilterType} * / (key); | |
1335 this._filters.push(this._createFilter(filterType, parsedQuery.filter s[key])); | |
1336 } | |
1337 }, | |
1338 | |
1339 /** | |
1340 * @param {string} text | |
1341 * @return {!WebInspector.NetworkLogView.Filter} | |
1342 */ | |
1343 _createTextFilter: function(text) | |
1344 { | |
1345 var regexp = new RegExp(text.escapeForRegExp(), "i"); | |
1346 return WebInspector.NetworkLogView._requestNameOrPathFilter.bind(null, r egexp); | |
1347 }, | |
1348 | |
1349 /** | |
1350 * @param {!WebInspector.NetworkPanel.FilterType} type | |
1351 * @param {string} value | |
1352 * @return {!WebInspector.NetworkLogView.Filter} | |
1353 */ | |
1354 _createFilter: function(type, value) { | |
1355 switch (type) { | |
1356 case WebInspector.NetworkPanel.FilterType.Domain: | |
1357 return WebInspector.NetworkLogView._requestPropertyFilter.bind(null, "domain", value); | |
1358 | |
1359 case WebInspector.NetworkPanel.FilterType.MimeType: | |
1360 return WebInspector.NetworkLogView._requestPropertyFilter.bind(null, "mimeType", value); | |
1361 } | |
1362 throw "Unknown filter type:" + type; | |
vsevik
2014/02/25 06:58:53
console.assert(false, "...") instead.
eustas
2014/02/28 09:16:53
Unfortunately, we need to return something...
| |
1363 }, | |
1364 | |
1316 _filterRequests: function() | 1365 _filterRequests: function() |
1317 { | 1366 { |
1318 this._removeAllHighlights(); | 1367 this._removeAllHighlights(); |
1319 this._filteredOutRequests.clear(); | 1368 this._filteredOutRequests.clear(); |
1320 | 1369 |
1321 var nodes = this._dataGrid.rootNode().children; | 1370 var nodes = this._dataGrid.rootNode().children; |
1322 for (var i = 0; i < nodes.length; ++i) | 1371 for (var i = 0; i < nodes.length; ++i) |
1323 this._applyFilter(nodes[i]); | 1372 this._applyFilter(nodes[i]); |
1324 this._updateSummaryBar(); | 1373 this._updateSummaryBar(); |
1325 this._updateOffscreenRows(); | 1374 this._updateOffscreenRows(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1465 command.push(escapeString(name + ": " + header.value)); | 1514 command.push(escapeString(name + ": " + header.value)); |
1466 } | 1515 } |
1467 command = command.concat(data); | 1516 command = command.concat(data); |
1468 command.push("--compressed"); | 1517 command.push("--compressed"); |
1469 return command.join(" "); | 1518 return command.join(" "); |
1470 }, | 1519 }, |
1471 | 1520 |
1472 __proto__: WebInspector.View.prototype | 1521 __proto__: WebInspector.View.prototype |
1473 } | 1522 } |
1474 | 1523 |
1524 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */ | |
1525 WebInspector.NetworkLogView.Filter; | |
1526 | |
1527 /** | |
1528 * @param {!RegExp} regex | |
1529 * @param {!WebInspector.NetworkRequest} request | |
1530 * @return {boolean} | |
1531 */ | |
1532 WebInspector.NetworkLogView._requestNameOrPathFilter = function(regex, request) | |
1533 { | |
1534 return regex.test(request.name()) || regex.test(request.path()); | |
1535 } | |
1536 | |
1537 /** | |
1538 * @param {string} field | |
1539 * @param {string} value | |
1540 * @param {!WebInspector.NetworkRequest} request | |
1541 * @return {boolean} | |
1542 */ | |
1543 WebInspector.NetworkLogView._requestPropertyFilter = function(field, value, requ est) | |
1544 { | |
1545 return request[field] === value; | |
vsevik
2014/02/25 06:58:53
Let's create an explicit filter for both domain an
eustas
2014/02/28 09:16:53
Done.
| |
1546 } | |
1547 | |
1475 /** | 1548 /** |
1476 * @param {!WebInspector.NetworkRequest} request | 1549 * @param {!WebInspector.NetworkRequest} request |
1477 * @return {boolean} | 1550 * @return {boolean} |
1478 */ | 1551 */ |
1479 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) | 1552 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) |
1480 { | 1553 { |
1481 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL ogView.HTTPSchemas); | 1554 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL ogView.HTTPSchemas); |
1482 } | 1555 } |
1483 | 1556 |
1484 /** | 1557 /** |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1559 /** | 1632 /** |
1560 * @this {WebInspector.NetworkPanel} | 1633 * @this {WebInspector.NetworkPanel} |
1561 */ | 1634 */ |
1562 function viewGetter() | 1635 function viewGetter() |
1563 { | 1636 { |
1564 return this.visibleView; | 1637 return this.visibleView; |
1565 } | 1638 } |
1566 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); | 1639 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); |
1567 } | 1640 } |
1568 | 1641 |
1642 /** @enum {string} */ | |
1643 WebInspector.NetworkPanel.FilterType = { | |
1644 Domain: "Domain", | |
1645 MimeType: "MimeType" | |
1646 }; | |
1647 | |
1648 /** @type {!Array.<string>} */ | |
1649 WebInspector.NetworkPanel._searchKeys = Object.values(WebInspector.NetworkPanel. FilterType); | |
1650 | |
1569 WebInspector.NetworkPanel.prototype = { | 1651 WebInspector.NetworkPanel.prototype = { |
1570 _onFiltersToggled: function(event) | 1652 _onFiltersToggled: function(event) |
1571 { | 1653 { |
1572 var toggled = /** @type {boolean} */ (event.data); | 1654 var toggled = /** @type {boolean} */ (event.data); |
1573 this._filtersContainer.enableStyleClass("hidden", !toggled); | 1655 this._filtersContainer.enableStyleClass("hidden", !toggled); |
1574 this.element.enableStyleClass("filters-toggled", toggled); | 1656 this.element.enableStyleClass("filters-toggled", toggled); |
1575 }, | 1657 }, |
1576 | 1658 |
1577 /** | 1659 /** |
1578 * @return {!Array.<!Element>} | 1660 * @return {!Array.<!Element>} |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2693 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) | 2775 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) |
2694 { | 2776 { |
2695 var aValue = a._request[propertyName]; | 2777 var aValue = a._request[propertyName]; |
2696 var bValue = b._request[propertyName]; | 2778 var bValue = b._request[propertyName]; |
2697 if (aValue > bValue) | 2779 if (aValue > bValue) |
2698 return revert ? -1 : 1; | 2780 return revert ? -1 : 1; |
2699 if (bValue > aValue) | 2781 if (bValue > aValue) |
2700 return revert ? 1 : -1; | 2782 return revert ? 1 : -1; |
2701 return 0; | 2783 return 0; |
2702 } | 2784 } |
OLD | NEW |