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

Side by Side Diff: Source/devtools/front_end/StatusBarButton.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
« no previous file with comments | « Source/devtools/front_end/SplitView.js ('k') | Source/devtools/front_end/StylesSidebarPane.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 get visible() 63 get visible()
64 { 64 {
65 return this._visible; 65 return this._visible;
66 }, 66 },
67 67
68 set visible(x) 68 set visible(x)
69 { 69 {
70 if (this._visible === x) 70 if (this._visible === x)
71 return; 71 return;
72 this.element.enableStyleClass("hidden", !x); 72 this.element.classList.toggle("hidden", !x);
73 this._visible = x; 73 this._visible = x;
74 }, 74 },
75 75
76 __proto__: WebInspector.Object.prototype 76 __proto__: WebInspector.Object.prototype
77 } 77 }
78 78
79 /** 79 /**
80 * @constructor 80 * @constructor
81 * @extends {WebInspector.StatusBarItem} 81 * @extends {WebInspector.StatusBarItem}
82 * @param {string} text 82 * @param {string} text
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 { 218 {
219 return this._state; 219 return this._state;
220 }, 220 },
221 221
222 set state(x) 222 set state(x)
223 { 223 {
224 if (this._state === x) 224 if (this._state === x)
225 return; 225 return;
226 226
227 if (this.states === 2) 227 if (this.states === 2)
228 this.element.enableStyleClass("toggled-on", x); 228 this.element.classList.toggle("toggled-on", x);
229 else { 229 else {
230 this.element.classList.remove("toggled-" + this._state); 230 this.element.classList.remove("toggled-" + this._state);
231 if (x !== 0) 231 if (x !== 0)
232 this.element.classList.add("toggled-" + x); 232 this.element.classList.add("toggled-" + x);
233 } 233 }
234 this._state = x; 234 this._state = x;
235 }, 235 },
236 236
237 get toggled() 237 get toggled()
238 { 238 {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 var options = []; 659 var options = [];
660 for (var index = 0; index < this._states.length; index++) { 660 for (var index = 0; index < this._states.length; index++) {
661 if (this._states[index] !== this.state && this._states[index] !== th is._currentState) 661 if (this._states[index] !== this.state && this._states[index] !== th is._currentState)
662 options.push(this._buttons[index]); 662 options.push(this._buttons[index]);
663 } 663 }
664 return options; 664 return options;
665 }, 665 },
666 666
667 __proto__: WebInspector.StatusBarButton.prototype 667 __proto__: WebInspector.StatusBarButton.prototype
668 } 668 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/SplitView.js ('k') | Source/devtools/front_end/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698