Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: Source/devtools/front_end/sdk/Resource.js

Issue 1282593003: DevTools: rely on response's "Content-Type" header to refine resource type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/Resource.js
diff --git a/Source/devtools/front_end/sdk/Resource.js b/Source/devtools/front_end/sdk/Resource.js
index 00b7909ee96219011095af4a3375d1166848c930..f4b34924c4f596b08e6186044bc248fd77130a2a 100644
--- a/Source/devtools/front_end/sdk/Resource.js
+++ b/Source/devtools/front_end/sdk/Resource.js
@@ -265,6 +265,8 @@ WebInspector.Resource.prototype = {
*/
contentType: function()
{
+ if (this.resourceType() === WebInspector.resourceTypes.Document && this.mimeType.indexOf("javascript") !== -1)
+ return WebInspector.resourceTypes.Script;
return this.resourceType();
},
@@ -289,7 +291,7 @@ WebInspector.Resource.prototype = {
*/
canonicalMimeType: function()
{
- return this.resourceType().canonicalMimeType() || this.mimeType;
+ return this.contentType().canonicalMimeType() || this.mimeType;
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698