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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/CSSShadowEditor.js

Issue 2514353006: DevTools: all swatches get default focused element (reland with fix) (Closed)
Patch Set: DevTools: all swatches get default focused element (reland with fix) Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI.CSSShadowEditor = class extends UI.VBox { 7 UI.CSSShadowEditor = class extends UI.VBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 this.registerRequiredCSS('ui/cssShadowEditor.css'); 10 this.registerRequiredCSS('ui/cssShadowEditor.css');
11 this.contentElement.tabIndex = 0; 11 this.contentElement.tabIndex = 0;
12 this.setDefaultFocusedElement(this.contentElement);
12 13
13 this._typeField = this.contentElement.createChild('div', 'shadow-editor-fiel d'); 14 this._typeField = this.contentElement.createChild('div', 'shadow-editor-fiel d');
14 this._typeField.createChild('label', 'shadow-editor-label').textContent = Co mmon.UIString('Type'); 15 this._typeField.createChild('label', 'shadow-editor-label').textContent = Co mmon.UIString('Type');
15 this._outsetButton = this._typeField.createChild('button', 'shadow-editor-bu tton-left'); 16 this._outsetButton = this._typeField.createChild('button', 'shadow-editor-bu tton-left');
16 this._outsetButton.textContent = Common.UIString('Outset'); 17 this._outsetButton.textContent = Common.UIString('Outset');
17 this._outsetButton.addEventListener('click', this._onButtonClick.bind(this), false); 18 this._outsetButton.addEventListener('click', this._onButtonClick.bind(this), false);
18 this._insetButton = this._typeField.createChild('button', 'shadow-editor-but ton-right'); 19 this._insetButton = this._typeField.createChild('button', 'shadow-editor-but ton-right');
19 this._insetButton.textContent = Common.UIString('Inset'); 20 this._insetButton.textContent = Common.UIString('Inset');
20 this._insetButton.addEventListener('click', this._onButtonClick.bind(this), false); 21 this._insetButton.addEventListener('click', this._onButtonClick.bind(this), false);
21 22
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 }; 420 };
420 421
421 /** @type {number} */ 422 /** @type {number} */
422 UI.CSSShadowEditor.maxRange = 20; 423 UI.CSSShadowEditor.maxRange = 20;
423 /** @type {string} */ 424 /** @type {string} */
424 UI.CSSShadowEditor.defaultUnit = 'px'; 425 UI.CSSShadowEditor.defaultUnit = 'px';
425 /** @type {number} */ 426 /** @type {number} */
426 UI.CSSShadowEditor.sliderThumbRadius = 6; 427 UI.CSSShadowEditor.sliderThumbRadius = 6;
427 /** @type {number} */ 428 /** @type {number} */
428 UI.CSSShadowEditor.canvasSize = 88; 429 UI.CSSShadowEditor.canvasSize = 88;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698