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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 1418293002: Devtools: Extensible mime typing, mime typing by file name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add url function to mock project Created 5 years, 1 month 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 | « third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
index b712caec39202e087977898903fd4721db843ef4..f21b1be2aeb4bf1173ed783ef1f680e5ac5f1182 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
@@ -498,12 +498,7 @@ WebInspector.UISourceCode.prototype = {
*/
extension: function()
{
- var lastIndexOfDot = this._name.lastIndexOf(".");
- var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : "";
- var indexOfQuestionMark = extension.indexOf("?");
- if (indexOfQuestionMark !== -1)
- extension = extension.substr(0, indexOfQuestionMark);
- return extension;
+ return WebInspector.TextUtils.extension(this._name);
},
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698