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

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

Issue 2924883002: DevTools: migrate SSP Classes and ElementState toolbar widgets to shadow (Closed)
Patch Set: Created 3 years, 6 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
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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Elements.ElementStatePaneWidget = class extends UI.Widget { 7 Elements.ElementStatePaneWidget = class extends UI.Widget {
8 constructor() { 8 constructor() {
9 super(); 9 super(true);
10 this.element.className = 'styles-element-state-pane'; 10 this.registerRequiredCSS('elements/elementStatePaneWidget.css');
11 this.element.createChild('div').createTextChild(Common.UIString('Force eleme nt state')); 11 this.contentElement.className = 'styles-element-state-pane';
12 this.contentElement.createChild('div').createTextChild(Common.UIString('Forc e element state'));
12 var table = createElementWithClass('table', 'source-code'); 13 var table = createElementWithClass('table', 'source-code');
13 14
14 var inputs = []; 15 var inputs = [];
15 this._inputs = inputs; 16 this._inputs = inputs;
16 17
17 /** 18 /**
18 * @param {!Event} event 19 * @param {!Event} event
19 */ 20 */
20 function clickListener(event) { 21 function clickListener(event) {
21 var node = UI.context.flavor(SDK.DOMNode); 22 var node = UI.context.flavor(SDK.DOMNode);
(...skipping 18 matching lines...) Expand all
40 } 41 }
41 42
42 var tr = table.createChild('tr'); 43 var tr = table.createChild('tr');
43 tr.appendChild(createCheckbox.call(null, 'active')); 44 tr.appendChild(createCheckbox.call(null, 'active'));
44 tr.appendChild(createCheckbox.call(null, 'hover')); 45 tr.appendChild(createCheckbox.call(null, 'hover'));
45 46
46 tr = table.createChild('tr'); 47 tr = table.createChild('tr');
47 tr.appendChild(createCheckbox.call(null, 'focus')); 48 tr.appendChild(createCheckbox.call(null, 'focus'));
48 tr.appendChild(createCheckbox.call(null, 'visited')); 49 tr.appendChild(createCheckbox.call(null, 'visited'));
49 50
50 this.element.appendChild(table); 51 this.contentElement.appendChild(table);
51 UI.context.addFlavorChangeListener(SDK.DOMNode, this._update, this); 52 UI.context.addFlavorChangeListener(SDK.DOMNode, this._update, this);
52 } 53 }
53 54
54 /** 55 /**
55 * @param {?SDK.CSSModel} cssModel 56 * @param {?SDK.CSSModel} cssModel
56 */ 57 */
57 _updateModel(cssModel) { 58 _updateModel(cssModel) {
58 if (this._cssModel === cssModel) 59 if (this._cssModel === cssModel)
59 return; 60 return;
60 if (this._cssModel) 61 if (this._cssModel)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 114 }
114 115
115 /** 116 /**
116 * @override 117 * @override
117 * @return {!UI.ToolbarItem} 118 * @return {!UI.ToolbarItem}
118 */ 119 */
119 item() { 120 item() {
120 return this._button; 121 return this._button;
121 } 122 }
122 }; 123 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698