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 20 matching lines...) Expand all Loading... | |
31 importScript("RequestView.js"); | 31 importScript("RequestView.js"); |
32 importScript("NetworkItemView.js"); | 32 importScript("NetworkItemView.js"); |
33 importScript("RequestCookiesView.js"); | 33 importScript("RequestCookiesView.js"); |
34 importScript("RequestHeadersView.js"); | 34 importScript("RequestHeadersView.js"); |
35 importScript("RequestHTMLView.js"); | 35 importScript("RequestHTMLView.js"); |
36 importScript("RequestJSONView.js"); | 36 importScript("RequestJSONView.js"); |
37 importScript("RequestPreviewView.js"); | 37 importScript("RequestPreviewView.js"); |
38 importScript("RequestResponseView.js"); | 38 importScript("RequestResponseView.js"); |
39 importScript("RequestTimingView.js"); | 39 importScript("RequestTimingView.js"); |
40 importScript("ResourceWebSocketFrameView.js"); | 40 importScript("ResourceWebSocketFrameView.js"); |
41 importScript("SuggestionBuilder.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.element.classList.add("vbox", "fill"); | 53 this.element.classList.add("vbox", "fill"); |
53 this.registerRequiredCSS("networkLogView.css"); | 54 this.registerRequiredCSS("networkLogView.css"); |
54 this.registerRequiredCSS("filter.css"); | 55 this.registerRequiredCSS("filter.css"); |
56 this.registerRequiredCSS("textPrompt.css"); | |
55 | 57 |
56 this._filterBar = filterBar; | 58 this._filterBar = filterBar; |
57 this._coulmnsVisibilitySetting = coulmnsVisibilitySetting; | 59 this._coulmnsVisibilitySetting = coulmnsVisibilitySetting; |
58 this._allowRequestSelection = false; | 60 this._allowRequestSelection = false; |
59 this._requests = []; | 61 this._requests = []; |
60 this._requestsById = {}; | 62 this._requestsById = {}; |
61 this._requestsByURL = {}; | 63 this._requestsByURL = {}; |
62 this._staleRequests = {}; | 64 this._staleRequests = {}; |
63 this._requestGridNodes = {}; | 65 this._requestGridNodes = {}; |
64 this._lastRequestGridNodeId = 0; | 66 this._lastRequestGridNodeId = 0; |
65 this._mainRequestLoadTime = -1; | 67 this._mainRequestLoadTime = -1; |
66 this._mainRequestDOMContentLoadedTime = -1; | 68 this._mainRequestDOMContentLoadedTime = -1; |
67 this._matchedRequests = []; | 69 this._matchedRequests = []; |
68 this._highlightedSubstringChanges = []; | 70 this._highlightedSubstringChanges = []; |
69 this._filteredOutRequests = new Map(); | 71 this._filteredOutRequests = new Map(); |
70 | 72 |
73 /** @type {!Array.<!WebInspector.NetworkLogView.Filter>} */ | |
74 this._filters = []; | |
75 | |
71 this._matchedRequestsMap = {}; | 76 this._matchedRequestsMap = {}; |
72 this._currentMatchedRequestIndex = -1; | 77 this._currentMatchedRequestIndex = -1; |
73 | 78 |
74 this._createStatusbarButtons(); | 79 this._createStatusbarButtons(); |
75 this._createStatusBarItems(); | 80 this._createStatusBarItems(); |
76 this._linkifier = new WebInspector.Linkifier(); | 81 this._linkifier = new WebInspector.Linkifier(); |
77 | 82 |
78 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestStarted, this._onRequestStarted, this); | 83 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestStarted, this._onRequestStarted, this); |
79 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestUpdated, this._onRequestUpdated, this); | 84 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestUpdated, this._onRequestUpdated, this); |
80 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestFinished, this._onRequestUpdated, this); | 85 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.Eve ntTypes.RequestFinished, this._onRequestUpdated, this); |
81 | 86 |
82 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillReloadPage, this._willReloadPage, this); | 87 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillReloadPage, this._willReloadPage, this); |
83 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this); | 88 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this); |
84 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.Load, this._loadEventFired, this); | 89 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.Load, this._loadEventFired, this); |
85 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.DOMContentLoaded, this._domContentLoadedEventFired, this); | 90 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.DOMContentLoaded, this._domContentLoadedEventFired, this); |
86 | 91 |
87 this._addFilters(); | 92 this._addFilters(); |
93 this._resetSuggestionBuilder(); | |
88 this._initializeView(); | 94 this._initializeView(); |
89 this._recordButton.toggled = true; | 95 this._recordButton.toggled = true; |
90 WebInspector.networkLog.requests.forEach(this._appendRequest.bind(this)); | 96 WebInspector.networkLog.requests.forEach(this._appendRequest.bind(this)); |
91 } | 97 } |
92 | 98 |
93 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; | 99 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr ue, "wss": true}; |
94 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified" , "Server", "Vary"]; | 100 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified" , "Server", "Vary"]; |
95 WebInspector.NetworkLogView._defaultColumnsVisibility = { | 101 WebInspector.NetworkLogView._defaultColumnsVisibility = { |
96 method: true, status: true, scheme: false, domain: false, type: true, initia tor: true, cookies: false, setCookies: false, size: true, time: true, | 102 method: true, status: true, scheme: false, domain: false, type: true, initia tor: true, cookies: false, setCookies: false, size: true, time: true, |
97 "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Con tent-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false, "Server": false, "Vary": false | 103 "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... | |
112 } | 118 } |
113 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this); | 119 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this); |
114 this._filterBar.addFilter(this._resourceTypeFilterUI); | 120 this._filterBar.addFilter(this._resourceTypeFilterUI); |
115 | 121 |
116 var dataURLSetting = WebInspector.settings.networkHideDataURL; | 122 var dataURLSetting = WebInspector.settings.networkHideDataURL; |
117 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); | 123 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); |
118 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this); | 124 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this); |
119 this._filterBar.addFilter(this._dataURLFilterUI); | 125 this._filterBar.addFilter(this._dataURLFilterUI); |
120 }, | 126 }, |
121 | 127 |
128 _resetSuggestionBuilder: function() | |
129 { | |
130 this._suggestionBuilder = new WebInspector.SuggestionBuilder(WebInspecto r.NetworkPanel._searchKeys); | |
131 this._textFilterUI.setSuggestionBuilder(this._suggestionBuilder); | |
132 }, | |
133 | |
122 _filterChanged: function(event) | 134 _filterChanged: function(event) |
123 { | 135 { |
124 this._removeAllNodeHighlights(); | 136 this._removeAllNodeHighlights(); |
125 this.searchCanceled(); | 137 this.searchCanceled(); |
138 this._parseFilterQuery(this._textFilterUI.value()); | |
126 this._filterRequests(); | 139 this._filterRequests(); |
127 }, | 140 }, |
128 | 141 |
129 _initializeView: function() | 142 _initializeView: function() |
130 { | 143 { |
131 this.element.id = "network-container"; | 144 this.element.id = "network-container"; |
132 | 145 |
133 this._createSortingFunctions(); | 146 this._createSortingFunctions(); |
134 this._createTable(); | 147 this._createTable(); |
135 this._createTimelineGrid(); | 148 this._createTimelineGrid(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 { | 195 { |
183 this._timelineGrid = new WebInspector.TimelineGrid(); | 196 this._timelineGrid = new WebInspector.TimelineGrid(); |
184 this._timelineGrid.element.classList.add("network-timeline-grid"); | 197 this._timelineGrid.element.classList.add("network-timeline-grid"); |
185 this._dataGrid.element.appendChild(this._timelineGrid.element); | 198 this._dataGrid.element.appendChild(this._timelineGrid.element); |
186 }, | 199 }, |
187 | 200 |
188 _createTable: function() | 201 _createTable: function() |
189 { | 202 { |
190 var columns = []; | 203 var columns = []; |
191 columns.push({ | 204 columns.push({ |
192 id: "name", | 205 id: "name", |
193 titleDOMFragment: this._makeHeaderFragment(WebInspector.UIString("Na me"), WebInspector.UIString("Path")), | 206 titleDOMFragment: this._makeHeaderFragment(WebInspector.UIString("Na me"), WebInspector.UIString("Path")), |
194 title: WebInspector.UIString("Name"), | 207 title: WebInspector.UIString("Name"), |
195 sortable: true, | 208 sortable: true, |
196 weight: 20, | 209 weight: 20, |
197 disclosure: true | 210 disclosure: true |
198 }); | 211 }); |
199 | 212 |
200 columns.push({ | 213 columns.push({ |
201 id: "method", | 214 id: "method", |
202 title: WebInspector.UIString("Method"), | 215 title: WebInspector.UIString("Method"), |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 this._popoverHelper.hidePopover(); | 741 this._popoverHelper.hidePopover(); |
729 | 742 |
730 if (this._calculator) | 743 if (this._calculator) |
731 this._calculator.reset(); | 744 this._calculator.reset(); |
732 | 745 |
733 this._requests = []; | 746 this._requests = []; |
734 this._requestsById = {}; | 747 this._requestsById = {}; |
735 this._requestsByURL = {}; | 748 this._requestsByURL = {}; |
736 this._staleRequests = {}; | 749 this._staleRequests = {}; |
737 this._requestGridNodes = {}; | 750 this._requestGridNodes = {}; |
751 this._resetSuggestionBuilder(); | |
738 | 752 |
739 if (this._dataGrid) { | 753 if (this._dataGrid) { |
740 this._dataGrid.rootNode().removeChildren(); | 754 this._dataGrid.rootNode().removeChildren(); |
741 this._updateDividersIfNeeded(); | 755 this._updateDividersIfNeeded(); |
742 this._updateSummaryBar(); | 756 this._updateSummaryBar(); |
743 } | 757 } |
744 | 758 |
745 this._mainRequestLoadTime = -1; | 759 this._mainRequestLoadTime = -1; |
746 this._mainRequestDOMContentLoadedTime = -1; | 760 this._mainRequestDOMContentLoadedTime = -1; |
747 }, | 761 }, |
(...skipping 51 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 E_TYPE, 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1260 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Sea rchCountUpdated, this._matchedRequests.length); | 1278 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Sea rchCountUpdated, this._matchedRequests.length); |
1261 if (shouldJump) | 1279 if (shouldJump) |
1262 this._highlightNthMatchedRequestForSearch(newMatchedRequestIndex, tr ue); | 1280 this._highlightNthMatchedRequestForSearch(newMatchedRequestIndex, tr ue); |
1263 }, | 1281 }, |
1264 | 1282 |
1265 /** | 1283 /** |
1266 * @param {!WebInspector.NetworkDataGridNode} node | 1284 * @param {!WebInspector.NetworkDataGridNode} node |
1267 */ | 1285 */ |
1268 _applyFilter: function(node) | 1286 _applyFilter: function(node) |
1269 { | 1287 { |
1270 var filter = this._textFilterUI.regex(); | |
1271 var request = node._request; | 1288 var request = node._request; |
1272 | 1289 var matches = this._resourceTypeFilterUI.accept(request.type.name()); |
1273 var matches = true; | |
1274 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) | 1290 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) |
1275 matches = false; | 1291 matches = false; |
1276 if (matches && !this._resourceTypeFilterUI.accept(request.type.name())) | 1292 for (var i = 0; matches && (i < this._filters.length); ++i) |
1277 matches = false; | 1293 matches = this._filters[i](request); |
1278 | |
1279 if (matches && filter) { | |
1280 matches = filter.test(request.name()) || filter.test(request.path()) ; | |
1281 if (matches) | |
1282 this._highlightMatchedRequest(request, false, filter); | |
1283 } | |
1284 | 1294 |
1285 node.element.enableStyleClass("filtered-out", !matches); | 1295 node.element.enableStyleClass("filtered-out", !matches); |
1286 if (matches) | 1296 if (matches) |
1287 this._filteredOutRequests.remove(request); | 1297 this._filteredOutRequests.remove(request); |
1288 else | 1298 else |
1289 this._filteredOutRequests.put(request, true); | 1299 this._filteredOutRequests.put(request, true); |
1290 }, | 1300 }, |
1291 | 1301 |
1302 /** | |
1303 * @param {string} query | |
1304 */ | |
1305 _parseFilterQuery: function(query) | |
1306 { | |
1307 this._filters = []; | |
1308 var parsedQuery = this._suggestionBuilder.parseQuery(query); | |
1309 if (parsedQuery.textual) | |
1310 this._filters.push(WebInspector.NetworkLogView._requestNameOrPathFil ter.bind(null, parsedQuery.textual)); | |
1311 | |
1312 for (var key in parsedQuery.specialized) { | |
1313 var filterType = /** @type {!WebInspector.NetworkPanel.FilterType} * / (key); | |
1314 this._filters.push(this._createFilter(filterType, parsedQuery.specia lized[key])); | |
1315 } | |
1316 }, | |
1317 | |
1318 /** | |
1319 * @param {!WebInspector.NetworkPanel.FilterType} type | |
1320 * @param {string} value | |
1321 * @return {!WebInspector.NetworkLogView.Filter} | |
1322 */ | |
1323 _createFilter: function(type, value) { | |
1324 switch (type) { | |
1325 case WebInspector.NetworkPanel.FilterType.DOMAIN: | |
1326 return WebInspector.NetworkLogView._requestPropertyFilter.bind(null, "domain", value); | |
1327 | |
1328 case WebInspector.NetworkPanel.FilterType.MIME_TYPE: | |
1329 return WebInspector.NetworkLogView._requestPropertyFilter.bind(null, "mimeType", value); | |
1330 } | |
1331 throw "Unknown filter type:" + type; | |
1332 }, | |
1333 | |
1292 _filterRequests: function() | 1334 _filterRequests: function() |
1293 { | 1335 { |
1294 this._removeAllHighlights(); | 1336 this._removeAllHighlights(); |
1295 this._filteredOutRequests.clear(); | 1337 this._filteredOutRequests.clear(); |
1296 | 1338 |
1297 var nodes = this._dataGrid.rootNode().children; | 1339 var nodes = this._dataGrid.rootNode().children; |
1298 for (var i = 0; i < nodes.length; ++i) | 1340 for (var i = 0; i < nodes.length; ++i) |
1299 this._applyFilter(nodes[i]); | 1341 this._applyFilter(nodes[i]); |
1300 this._updateSummaryBar(); | 1342 this._updateSummaryBar(); |
1301 this._updateOffscreenRows(); | 1343 this._updateOffscreenRows(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1441 command.push(escapeString(name + ": " + header.value)); | 1483 command.push(escapeString(name + ": " + header.value)); |
1442 } | 1484 } |
1443 command = command.concat(data); | 1485 command = command.concat(data); |
1444 command.push("--compressed"); | 1486 command.push("--compressed"); |
1445 return command.join(" "); | 1487 return command.join(" "); |
1446 }, | 1488 }, |
1447 | 1489 |
1448 __proto__: WebInspector.View.prototype | 1490 __proto__: WebInspector.View.prototype |
1449 } | 1491 } |
1450 | 1492 |
1493 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */ | |
1494 WebInspector.NetworkLogView.Filter; | |
1495 | |
1496 /** | |
1497 * @param {!RegExp} regex | |
1498 * @param {!WebInspector.NetworkRequest} request | |
1499 * @return {boolean} | |
1500 */ | |
1501 WebInspector.NetworkLogView._requestNameOrPathFilter = function(regex, request) | |
1502 { | |
1503 return regex.test(request.name()) || regex.test(request.path()); | |
1504 } | |
1505 | |
1506 /** | |
1507 * @param {string} field | |
1508 * @param {string} value | |
1509 * @param {!WebInspector.NetworkRequest} request | |
1510 * @return {boolean} | |
1511 */ | |
1512 WebInspector.NetworkLogView._requestPropertyFilter = function(field, value, requ est) | |
1513 { | |
1514 return request[field] === value; | |
1515 } | |
1516 | |
1451 /** | 1517 /** |
1452 * @param {!WebInspector.NetworkRequest} request | 1518 * @param {!WebInspector.NetworkRequest} request |
1453 * @return {boolean} | 1519 * @return {boolean} |
1454 */ | 1520 */ |
1455 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) | 1521 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) |
1456 { | 1522 { |
1457 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL ogView.HTTPSchemas); | 1523 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL ogView.HTTPSchemas); |
1458 } | 1524 } |
1459 | 1525 |
1460 | 1526 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1528 /** | 1594 /** |
1529 * @this {WebInspector.NetworkPanel} | 1595 * @this {WebInspector.NetworkPanel} |
1530 */ | 1596 */ |
1531 function viewGetter() | 1597 function viewGetter() |
1532 { | 1598 { |
1533 return this.visibleView; | 1599 return this.visibleView; |
1534 } | 1600 } |
1535 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); | 1601 WebInspector.GoToLineDialog.install(this, viewGetter.bind(this)); |
1536 } | 1602 } |
1537 | 1603 |
1604 /** @enum {string} */ | |
1605 WebInspector.NetworkPanel.FilterType = { | |
1606 DOMAIN: "domain", | |
vsevik
2014/02/20 07:36:38
Domain
eustas
2014/02/21 15:27:45
Done.
| |
1607 MIME_TYPE: "mime-type" | |
vsevik
2014/02/20 07:36:38
MimeType
eustas
2014/02/21 15:27:45
Done.
| |
1608 }; | |
1609 | |
1610 /** @type {!Array.<string>} */ | |
1611 WebInspector.NetworkPanel._searchKeys = Object.values(WebInspector.NetworkPanel. FilterType); | |
1612 | |
1538 WebInspector.NetworkPanel.prototype = { | 1613 WebInspector.NetworkPanel.prototype = { |
1539 _onFiltersToggled: function(event) | 1614 _onFiltersToggled: function(event) |
1540 { | 1615 { |
1541 var toggled = /** @type {boolean} */ (event.data); | 1616 var toggled = /** @type {boolean} */ (event.data); |
1542 this._filtersContainer.enableStyleClass("hidden", !toggled); | 1617 this._filtersContainer.enableStyleClass("hidden", !toggled); |
1543 this.element.enableStyleClass("filters-toggled", toggled); | 1618 this.element.enableStyleClass("filters-toggled", toggled); |
1544 }, | 1619 }, |
1545 | 1620 |
1546 /** | 1621 /** |
1547 * @return {!Array.<!Element>} | 1622 * @return {!Array.<!Element>} |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1718 jumpToNextSearchResult: function() | 1793 jumpToNextSearchResult: function() |
1719 { | 1794 { |
1720 this._networkLogView.jumpToNextSearchResult(); | 1795 this._networkLogView.jumpToNextSearchResult(); |
1721 }, | 1796 }, |
1722 | 1797 |
1723 searchCanceled: function() | 1798 searchCanceled: function() |
1724 { | 1799 { |
1725 this._networkLogView.searchCanceled(); | 1800 this._networkLogView.searchCanceled(); |
1726 }, | 1801 }, |
1727 | 1802 |
1728 /** | 1803 /** |
1729 * @param {!WebInspector.ContextMenu} contextMenu | 1804 * @param {!WebInspector.ContextMenu} contextMenu |
1730 * @param {!Object} target | 1805 * @param {!Object} target |
1731 * @this {WebInspector.NetworkPanel} | 1806 * @this {WebInspector.NetworkPanel} |
1732 */ | 1807 */ |
1733 appendApplicableItems: function(event, contextMenu, target) | 1808 appendApplicableItems: function(event, contextMenu, target) |
1734 { | 1809 { |
1735 /** | 1810 /** |
1736 * @this {WebInspector.NetworkPanel} | 1811 * @this {WebInspector.NetworkPanel} |
1737 */ | 1812 */ |
1738 function reveal(request) | 1813 function reveal(request) |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2648 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) | 2723 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) |
2649 { | 2724 { |
2650 var aValue = a._request[propertyName]; | 2725 var aValue = a._request[propertyName]; |
2651 var bValue = b._request[propertyName]; | 2726 var bValue = b._request[propertyName]; |
2652 if (aValue > bValue) | 2727 if (aValue > bValue) |
2653 return revert ? -1 : 1; | 2728 return revert ? -1 : 1; |
2654 if (bValue > aValue) | 2729 if (bValue > aValue) |
2655 return revert ? 1 : -1; | 2730 return revert ? 1 : -1; |
2656 return 0; | 2731 return 0; |
2657 } | 2732 } |
OLD | NEW |