Chromium Code Reviews| Index: Source/devtools/front_end/sources/SourcesView.js |
| diff --git a/Source/devtools/front_end/sources/SourcesView.js b/Source/devtools/front_end/sources/SourcesView.js |
| index 1d3bf4588ee37412457949aa1b26b25deba2dbdf..753c612522dfc147ad18d0b411b52dac032e0a32 100644 |
| --- a/Source/devtools/front_end/sources/SourcesView.js |
| +++ b/Source/devtools/front_end/sources/SourcesView.js |
| @@ -78,6 +78,8 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) |
| this._shortcuts = {}; |
| this.element.addEventListener("keydown", this._handleKeyDown.bind(this), false); |
| + |
| + this.addEventListener(WebInspector.SourcesView.Events.EditorSelected, WebInspector.languageService.updateInferredMime, WebInspector.languageService); |
| } |
| WebInspector.SourcesView.Events = { |
| @@ -95,7 +97,7 @@ WebInspector.SourcesView.uiSourceCodeHighlighterType = function(uiSourceCode) |
| if (networkContentType) |
| return networkContentType.canonicalMimeType(); |
| - var mimeType = WebInspector.ResourceType.mimeTypesForExtensions[uiSourceCode.extension().toLowerCase()]; |
| + var mimeType = WebInspector.ResourceType.mimeFromUrl(uiSourceCode.uri()); |
|
wes
2015/08/14 00:55:05
I've been wavering about this for awhile - is .uri
pfeldman
2015/08/17 21:15:52
uri is the URI within workspace, contentURL is whe
wes
2015/08/25 18:13:18
Alright - I think I've gone through and changed al
|
| return mimeType || uiSourceCode.contentType().canonicalMimeType(); |
| } |