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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ClassesPaneWidget.js

Issue 2096183002: DevTools: Added styling to focused checkboxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/UIUtils.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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.ElementsPanel.BaseToolbarPaneWidget} 7 * @extends {WebInspector.ElementsPanel.BaseToolbarPaneWidget}
8 * @param {!WebInspector.ToolbarItem} toolbarItem 8 * @param {!WebInspector.ToolbarItem} toolbarItem
9 */ 9 */
10 WebInspector.ClassesPaneWidget = function(toolbarItem) 10 WebInspector.ClassesPaneWidget = function(toolbarItem)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 var node = WebInspector.context.flavor(WebInspector.DOMNode); 81 var node = WebInspector.context.flavor(WebInspector.DOMNode);
82 if (!node) 82 if (!node)
83 return Promise.resolve(); 83 return Promise.resolve();
84 84
85 var classes = this._nodeClasses(node); 85 var classes = this._nodeClasses(node);
86 var keys = classes.keysArray(); 86 var keys = classes.keysArray();
87 keys.sort(String.caseInsensetiveComparator); 87 keys.sort(String.caseInsensetiveComparator);
88 for (var i = 0; i < keys.length; ++i) { 88 for (var i = 0; i < keys.length; ++i) {
89 var className = keys[i]; 89 var className = keys[i];
90 var label = createCheckboxLabel(className, classes.get(className)); 90 var label = createCheckboxLabel(className, classes.get(className));
91 label.visualizeFocus = true;
91 label.classList.add("monospace"); 92 label.classList.add("monospace");
92 label.checkboxElement.addEventListener("click", this._onClick.bind(t his, className), false); 93 label.checkboxElement.addEventListener("click", this._onClick.bind(t his, className), false);
93 this._classesContainer.appendChild(label); 94 this._classesContainer.appendChild(label);
94 } 95 }
95 return Promise.resolve(); 96 return Promise.resolve();
96 }, 97 },
97 98
98 /** 99 /**
99 * @param {string} className 100 * @param {string} className
100 * @param {!Event} event 101 * @param {!Event} event
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 213
213 _nodeChanged: function() 214 _nodeChanged: function()
214 { 215 {
215 var node = WebInspector.context.flavor(WebInspector.DOMNode); 216 var node = WebInspector.context.flavor(WebInspector.DOMNode);
216 var enabled = !!node; 217 var enabled = !!node;
217 this._button.setEnabled(enabled); 218 this._button.setEnabled(enabled);
218 if (!enabled && this._button.toggled()) 219 if (!enabled && this._button.toggled())
219 WebInspector.ElementsPanel.instance().showToolbarPane(null); 220 WebInspector.ElementsPanel.instance().showToolbarPane(null);
220 } 221 }
221 } 222 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698