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

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js

Issue 2385793003: DevTools: Fix visible whitespace for cm_modes (Closed)
Patch Set: Use promises Created 4 years, 2 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
Index: third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
index ef722dc28ca57fc932a5c44851a890839cf8d99e..b8568d0a386feea5e1bf2f310838c26256a78085 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
@@ -485,11 +485,13 @@ WebInspector.SourcesTextEditor.prototype = {
/**
* @override
* @param {string} mimeType
+ * @return {!Promise}
*/
setMimeType: function(mimeType)
{
this._mimeType = mimeType;
- WebInspector.CodeMirrorTextEditor.prototype.setMimeType.call(this, this._applyWhitespaceMimetype(mimeType));
+ return WebInspector.CodeMirrorTextEditor.prototype.setMimeType.call(this, mimeType)
+ .then(() => this._codeMirror.setOption("mode", this._applyWhitespaceMimetype(mimeType)));
},
_updateWhitespace: function()

Powered by Google App Engine
This is Rietveld 408576698