OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 "text/ecmascript": {"script": true}, | 89 "text/ecmascript": {"script": true}, |
90 "application/javascript": {"script": true}, | 90 "application/javascript": {"script": true}, |
91 "application/ecmascript": {"script": true}, | 91 "application/ecmascript": {"script": true}, |
92 "application/x-javascript": {"script": true}, | 92 "application/x-javascript": {"script": true}, |
93 "application/json": {"script": true}, | 93 "application/json": {"script": true}, |
94 "text/javascript1.1": {"script": true}, | 94 "text/javascript1.1": {"script": true}, |
95 "text/javascript1.2": {"script": true}, | 95 "text/javascript1.2": {"script": true}, |
96 "text/javascript1.3": {"script": true}, | 96 "text/javascript1.3": {"script": true}, |
97 "text/jscript": {"script": true}, | 97 "text/jscript": {"script": true}, |
98 "text/livescript": {"script": true}, | 98 "text/livescript": {"script": true}, |
| 99 "text/vtt": {"texttrack": true}, |
99 } | 100 } |
100 | 101 |
101 WebInspector.NetworkManager.prototype = { | 102 WebInspector.NetworkManager.prototype = { |
102 /** | 103 /** |
103 * @param {string} url | 104 * @param {string} url |
104 * @return {!WebInspector.NetworkRequest} | 105 * @return {!WebInspector.NetworkRequest} |
105 */ | 106 */ |
106 inflightRequestForURL: function(url) | 107 inflightRequestForURL: function(url) |
107 { | 108 { |
108 return this._dispatcher._inflightRequestsByURL[url]; | 109 return this._dispatcher._inflightRequestsByURL[url]; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // as it's going to be an error message. We do not want to emit a warnin
g | 213 // as it's going to be an error message. We do not want to emit a warnin
g |
213 // for this, though, as this will already be reported as resource loadin
g failure. | 214 // for this, though, as this will already be reported as resource loadin
g failure. |
214 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en
produces text/css and gets reloaded, | 215 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en
produces text/css and gets reloaded, |
215 // it is 304 Not Modified and its guessed mime-type is text/php, which i
s wrong. | 216 // it is 304 Not Modified and its guessed mime-type is text/php, which i
s wrong. |
216 // Don't check for mime-types in 304-resources. | 217 // Don't check for mime-types in 304-resources. |
217 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode ===
304 || networkRequest.statusCode === 204) | 218 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode ===
304 || networkRequest.statusCode === 204) |
218 return true; | 219 return true; |
219 | 220 |
220 if (typeof networkRequest.type === "undefined" | 221 if (typeof networkRequest.type === "undefined" |
221 || networkRequest.type === WebInspector.resourceTypes.Other | 222 || networkRequest.type === WebInspector.resourceTypes.Other |
| 223 || networkRequest.type === WebInspector.resourceTypes.Media |
222 || networkRequest.type === WebInspector.resourceTypes.XHR | 224 || networkRequest.type === WebInspector.resourceTypes.XHR |
223 || networkRequest.type === WebInspector.resourceTypes.WebSocket) | 225 || networkRequest.type === WebInspector.resourceTypes.WebSocket) |
224 return true; | 226 return true; |
225 | 227 |
226 if (!networkRequest.mimeType) | 228 if (!networkRequest.mimeType) |
227 return true; // Might be not known for cached resources with null re
sponses. | 229 return true; // Might be not known for cached resources with null re
sponses. |
228 | 230 |
229 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) | 231 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) |
230 return networkRequest.type.name() in WebInspector.NetworkManager._MI
METypes[networkRequest.mimeType]; | 232 return networkRequest.type.name() in WebInspector.NetworkManager._MI
METypes[networkRequest.mimeType]; |
231 | 233 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ
et, requestId, url, documentURL, frameId, loaderId); | 549 var networkRequest = new WebInspector.NetworkRequest(this._manager._targ
et, requestId, url, documentURL, frameId, loaderId); |
548 networkRequest.initiator = initiator; | 550 networkRequest.initiator = initiator; |
549 return networkRequest; | 551 return networkRequest; |
550 } | 552 } |
551 } | 553 } |
552 | 554 |
553 /** | 555 /** |
554 * @type {!WebInspector.NetworkManager} | 556 * @type {!WebInspector.NetworkManager} |
555 */ | 557 */ |
556 WebInspector.networkManager; | 558 WebInspector.networkManager; |
OLD | NEW |