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

Side by Side Diff: Source/devtools/front_end/InplaceFormatterEditorAction.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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {WebInspector.SourcesPanel.EditorAction} 8 * @implements {WebInspector.SourcesPanel.EditorAction}
9 */ 9 */
10 WebInspector.InplaceFormatterEditorAction = function() 10 WebInspector.InplaceFormatterEditorAction = function()
(...skipping 18 matching lines...) Expand all
29 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); 29 var wasSelected = /** @type {boolean} */ (event.data.wasSelected);
30 if (wasSelected) 30 if (wasSelected)
31 this._updateButton(null); 31 this._updateButton(null);
32 }, 32 },
33 33
34 /** 34 /**
35 * @param {?WebInspector.UISourceCode} uiSourceCode 35 * @param {?WebInspector.UISourceCode} uiSourceCode
36 */ 36 */
37 _updateButton: function(uiSourceCode) 37 _updateButton: function(uiSourceCode)
38 { 38 {
39 this._button.element.enableStyleClass("hidden", !this._isFormattable(uiS ourceCode)); 39 this._button.element.classList.toggle("hidden", !this._isFormattable(uiS ourceCode));
40 }, 40 },
41 41
42 /** 42 /**
43 * @param {!WebInspector.SourcesPanel} panel 43 * @param {!WebInspector.SourcesPanel} panel
44 * @return {!Element} 44 * @return {!Element}
45 */ 45 */
46 button: function(panel) 46 button: function(panel)
47 { 47 {
48 if (this._button) 48 if (this._button)
49 return this._button.element; 49 return this._button.element;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 var start = [0, 0]; 106 var start = [0, 0];
107 if (sourceFrame) { 107 if (sourceFrame) {
108 var selection = sourceFrame.selection(); 108 var selection = sourceFrame.selection();
109 start = formatterMapping.originalToFormatted(selection.startLine , selection.startColumn); 109 start = formatterMapping.originalToFormatted(selection.startLine , selection.startColumn);
110 } 110 }
111 uiSourceCode.setWorkingCopy(formattedContent); 111 uiSourceCode.setWorkingCopy(formattedContent);
112 this._panel.showUISourceCode(uiSourceCode, start[0], start[1]); 112 this._panel.showUISourceCode(uiSourceCode, start[0], start[1]);
113 } 113 }
114 }, 114 },
115 } 115 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/FilteredItemSelectionDialog.js ('k') | Source/devtools/front_end/LayerTree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698