| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 _addFilters: function() | 173 _addFilters: function() |
| 174 { | 174 { |
| 175 this._textFilterUI = new WebInspector.TextFilterUI(); | 175 this._textFilterUI = new WebInspector.TextFilterUI(); |
| 176 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._filterChanged, this); | 176 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._filterChanged, this); |
| 177 this._filterBar.addFilter(this._textFilterUI); | 177 this._filterBar.addFilter(this._textFilterUI); |
| 178 | 178 |
| 179 var types = []; | 179 var types = []; |
| 180 for (var typeId in WebInspector.resourceTypes) { | 180 for (var typeId in WebInspector.resourceTypes) { |
| 181 var resourceType = WebInspector.resourceTypes[typeId]; | 181 var resourceType = WebInspector.resourceTypes[typeId]; |
| 182 if (resourceType === WebInspector.resourceTypes.TextTrack) |
| 183 continue; |
| 182 types.push({name: resourceType.name(), label: resourceType.categoryT
itle()}); | 184 types.push({name: resourceType.name(), label: resourceType.categoryT
itle()}); |
| 183 } | 185 } |
| 184 this._resourceTypeFilterUI = new WebInspector.NamedBitSetFilterUI(types,
WebInspector.settings.networkResourceTypeFilters); | 186 this._resourceTypeFilterUI = new WebInspector.NamedBitSetFilterUI(types,
WebInspector.settings.networkResourceTypeFilters); |
| 185 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events
.FilterChanged, this._filterChanged.bind(this), this); | 187 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events
.FilterChanged, this._filterChanged.bind(this), this); |
| 186 this._filterBar.addFilter(this._resourceTypeFilterUI); | 188 this._filterBar.addFilter(this._resourceTypeFilterUI); |
| 187 | 189 |
| 188 var dataURLSetting = WebInspector.settings.networkHideDataURL; | 190 var dataURLSetting = WebInspector.settings.networkHideDataURL; |
| 189 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url
", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); | 191 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url
", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); |
| 190 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt
erChanged, this._filterChanged.bind(this), this); | 192 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt
erChanged, this._filterChanged.bind(this), this); |
| 191 this._filterBar.addFilter(this._dataURLFilterUI); | 193 this._filterBar.addFilter(this._dataURLFilterUI); |
| (...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 return (index + this._matchedRequestCount) % this._matchedRequestCount; | 1475 return (index + this._matchedRequestCount) % this._matchedRequestCount; |
| 1474 }, | 1476 }, |
| 1475 | 1477 |
| 1476 /** | 1478 /** |
| 1477 * @param {!WebInspector.NetworkDataGridNode} node | 1479 * @param {!WebInspector.NetworkDataGridNode} node |
| 1478 * @return {boolean} | 1480 * @return {boolean} |
| 1479 */ | 1481 */ |
| 1480 _applyFilter: function(node) | 1482 _applyFilter: function(node) |
| 1481 { | 1483 { |
| 1482 var request = node.request(); | 1484 var request = node.request(); |
| 1483 if (!this._resourceTypeFilterUI.accept(request.resourceType().name())) | 1485 var resourceType = request.resourceType(); |
| 1486 if (resourceType === WebInspector.resourceTypes.TextTrack) |
| 1487 resourceType = WebInspector.resourceTypes.Other; |
| 1488 if (!this._resourceTypeFilterUI.accept(resourceType.name())) |
| 1484 return false; | 1489 return false; |
| 1485 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) | 1490 if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL()) |
| 1486 return false; | 1491 return false; |
| 1487 for (var i = 0; i < this._filters.length; ++i) { | 1492 for (var i = 0; i < this._filters.length; ++i) { |
| 1488 if (!this._filters[i](request)) | 1493 if (!this._filters[i](request)) |
| 1489 return false; | 1494 return false; |
| 1490 } | 1495 } |
| 1491 return true; | 1496 return true; |
| 1492 }, | 1497 }, |
| 1493 | 1498 |
| (...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3315 this._writeProgress.done(); | 3320 this._writeProgress.done(); |
| 3316 return; | 3321 return; |
| 3317 } | 3322 } |
| 3318 const chunkSize = 100000; | 3323 const chunkSize = 100000; |
| 3319 var text = this._text.substring(this._bytesWritten, this._bytesWritten +
chunkSize); | 3324 var text = this._text.substring(this._bytesWritten, this._bytesWritten +
chunkSize); |
| 3320 this._bytesWritten += text.length; | 3325 this._bytesWritten += text.length; |
| 3321 stream.write(text, this._writeNextChunk.bind(this)); | 3326 stream.write(text, this._writeNextChunk.bind(this)); |
| 3322 this._writeProgress.setWorked(this._bytesWritten); | 3327 this._writeProgress.setWorked(this._bytesWritten); |
| 3323 } | 3328 } |
| 3324 } | 3329 } |
| OLD | NEW |