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

Unified Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 182113004: DevTools: Get rid of Element.prototype.enableStyleClass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 10 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 | « Source/devtools/front_end/CanvasProfileView.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
index fa440cc8483eefbe43591095d3055473cad480c7..2674cbd9edfcf7031ddfa882bad8da9de6270a09 100644
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -589,7 +589,7 @@ WebInspector.CodeMirrorTextEditor.prototype = {
_updateCodeMirrorMode: function()
{
var showWhitespaces = WebInspector.settings.showWhitespacesInEditor.get();
- this.element.enableStyleClass("show-whitespaces", showWhitespaces);
+ this.element.classList.toggle("show-whitespaces", showWhitespaces);
this._codeMirror.setOption("mode", showWhitespaces ? this._whitespaceOverlayMode(this._mimeType) : this._mimeType);
},
@@ -611,7 +611,7 @@ WebInspector.CodeMirrorTextEditor.prototype = {
*/
setReadOnly: function(readOnly)
{
- this.element.enableStyleClass("CodeMirror-readonly", readOnly)
+ this.element.classList.toggle("CodeMirror-readonly", readOnly)
this._codeMirror.setOption("readOnly", readOnly);
},
« no previous file with comments | « Source/devtools/front_end/CanvasProfileView.js ('k') | Source/devtools/front_end/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698