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

Side by Side Diff: Source/devtools/front_end/DataGrid.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/DOMExtension.js ('k') | Source/devtools/front_end/Drawer.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 /** 682 /**
683 * @param {string} columnIdentifier 683 * @param {string} columnIdentifier
684 * @param {boolean} visible 684 * @param {boolean} visible
685 */ 685 */
686 setColumnVisible: function(columnIdentifier, visible) 686 setColumnVisible: function(columnIdentifier, visible)
687 { 687 {
688 if (visible === !this.columns[columnIdentifier].hidden) 688 if (visible === !this.columns[columnIdentifier].hidden)
689 return; 689 return;
690 690
691 this.columns[columnIdentifier].hidden = !visible; 691 this.columns[columnIdentifier].hidden = !visible;
692 this.element.enableStyleClass("hide-" + columnIdentifier + "-column", !v isible); 692 this.element.classList.toggle("hide-" + columnIdentifier + "-column", !v isible);
693 }, 693 },
694 694
695 get scrollContainer() 695 get scrollContainer()
696 { 696 {
697 return this._scrollContainer; 697 return this._scrollContainer;
698 }, 698 },
699 699
700 /** 700 /**
701 * @return {boolean} 701 * @return {boolean}
702 */ 702 */
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 set hasChildren(x) 1243 set hasChildren(x)
1244 { 1244 {
1245 if (this._hasChildren === x) 1245 if (this._hasChildren === x)
1246 return; 1246 return;
1247 1247
1248 this._hasChildren = x; 1248 this._hasChildren = x;
1249 1249
1250 if (!this._element) 1250 if (!this._element)
1251 return; 1251 return;
1252 1252
1253 this._element.enableStyleClass("parent", this._hasChildren); 1253 this._element.classList.toggle("parent", this._hasChildren);
1254 this._element.enableStyleClass("expanded", this._hasChildren && this.exp anded); 1254 this._element.classList.toggle("expanded", this._hasChildren && this.exp anded);
1255 }, 1255 },
1256 1256
1257 get hasChildren() 1257 get hasChildren()
1258 { 1258 {
1259 return this._hasChildren; 1259 return this._hasChildren;
1260 }, 1260 },
1261 1261
1262 set revealed(x) 1262 set revealed(x)
1263 { 1263 {
1264 if (this._revealed === x) 1264 if (this._revealed === x)
1265 return; 1265 return;
1266 1266
1267 this._revealed = x; 1267 this._revealed = x;
1268 1268
1269 if (this._element) 1269 if (this._element)
1270 this._element.enableStyleClass("revealed", this._revealed); 1270 this._element.classList.toggle("revealed", this._revealed);
1271 1271
1272 for (var i = 0; i < this.children.length; ++i) 1272 for (var i = 0; i < this.children.length; ++i)
1273 this.children[i].revealed = x && this.expanded; 1273 this.children[i].revealed = x && this.expanded;
1274 }, 1274 },
1275 1275
1276 get depth() 1276 get depth()
1277 { 1277 {
1278 if ("_depth" in this) 1278 if ("_depth" in this)
1279 return this._depth; 1279 return this._depth;
1280 if (this.parent && !this.parent._isRoot) 1280 if (this.parent && !this.parent._isRoot)
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 1818
1819 WebInspector.CreationDataGridNode.prototype = { 1819 WebInspector.CreationDataGridNode.prototype = {
1820 makeNormal: function() 1820 makeNormal: function()
1821 { 1821 {
1822 delete this.isCreationNode; 1822 delete this.isCreationNode;
1823 delete this.makeNormal; 1823 delete this.makeNormal;
1824 }, 1824 },
1825 1825
1826 __proto__: WebInspector.DataGridNode.prototype 1826 __proto__: WebInspector.DataGridNode.prototype
1827 } 1827 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/DOMExtension.js ('k') | Source/devtools/front_end/Drawer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698