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

Side by Side Diff: Source/devtools/front_end/OverridesView.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 (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 * @param {!WebInspector.Event} event 63 * @param {!WebInspector.Event} event
64 */ 64 */
65 _tabSelected: function(event) 65 _tabSelected: function(event)
66 { 66 {
67 this._lastSelectedTabSetting.set(this._tabbedPane.selectedTabId); 67 this._lastSelectedTabSetting.set(this._tabbedPane.selectedTabId);
68 }, 68 },
69 69
70 _overridesWarningUpdated: function() 70 _overridesWarningUpdated: function()
71 { 71 {
72 var message = WebInspector.overridesSupport.warningMessage(); 72 var message = WebInspector.overridesSupport.warningMessage();
73 this._warningFooter.enableStyleClass("hidden", !message); 73 this._warningFooter.classList.toggle("hidden", !message);
74 this._warningFooter.textContent = message; 74 this._warningFooter.textContent = message;
75 }, 75 },
76 76
77 __proto__: WebInspector.View.prototype 77 __proto__: WebInspector.View.prototype
78 } 78 }
79 79
80 /** 80 /**
81 * @constructor 81 * @constructor
82 * @extends {WebInspector.View} 82 * @extends {WebInspector.View}
83 * @param {string} id 83 * @param {string} id
(...skipping 19 matching lines...) Expand all
103 this._tabbedPane = tabbedPane; 103 this._tabbedPane = tabbedPane;
104 tabbedPane.appendTab(this._id, this._name, this); 104 tabbedPane.appendTab(this._id, this._name, this);
105 this._updateActiveState(); 105 this._updateActiveState();
106 }, 106 },
107 107
108 _updateActiveState: function() 108 _updateActiveState: function()
109 { 109 {
110 var active = false; 110 var active = false;
111 for (var i = 0; !active && i < this._settings.length; ++i) 111 for (var i = 0; !active && i < this._settings.length; ++i)
112 active = this._settings[i].get(); 112 active = this._settings[i].get();
113 this._tabbedPane.element.enableStyleClass("overrides-activate-" + this._ id, active); 113 this._tabbedPane.element.classList.toggle("overrides-activate-" + this._ id, active);
114 this._tabbedPane.changeTabTitle(this._id, active ? this._name + " \u2713 " : this._name); 114 this._tabbedPane.changeTabTitle(this._id, active ? this._name + " \u2713 " : this._name);
115 }, 115 },
116 116
117 /** 117 /**
118 * Creates an input element under the parentElement with the given id and de faultText. 118 * Creates an input element under the parentElement with the given id and de faultText.
119 * It also sets an onblur event listener. 119 * It also sets an onblur event listener.
120 * @param {!Element} parentElement 120 * @param {!Element} parentElement
121 * @param {string} id 121 * @param {string} id
122 * @param {string} defaultText 122 * @param {string} defaultText
123 * @param {function(*)} eventListener 123 * @param {function(*)} eventListener
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1089
1090 __proto__ : WebInspector.OverridesView.Tab.prototype 1090 __proto__ : WebInspector.OverridesView.Tab.prototype
1091 } 1091 }
1092 1092
1093 /** @enum {string} */ 1093 /** @enum {string} */
1094 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = { 1094 WebInspector.OverridesView.SensorsTab.DeviceOrientationModificationSource = {
1095 UserInput: "userInput", 1095 UserInput: "userInput",
1096 UserDrag: "userDrag", 1096 UserDrag: "userDrag",
1097 ResetButton: "resetButton" 1097 ResetButton: "resetButton"
1098 } 1098 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/NetworkPanel.js ('k') | Source/devtools/front_end/PlatformFontsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698