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

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

Issue 2510883002: DevTools: all swatches should have a default focused element (Closed)
Patch Set: ac Created 4 years, 1 month 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 }; 423 };
423 424
424 /** @type {number} */ 425 /** @type {number} */
425 UI.CSSShadowEditor.maxRange = 20; 426 UI.CSSShadowEditor.maxRange = 20;
426 /** @type {string} */ 427 /** @type {string} */
427 UI.CSSShadowEditor.defaultUnit = 'px'; 428 UI.CSSShadowEditor.defaultUnit = 'px';
428 /** @type {number} */ 429 /** @type {number} */
429 UI.CSSShadowEditor.sliderThumbRadius = 6; 430 UI.CSSShadowEditor.sliderThumbRadius = 6;
430 /** @type {number} */ 431 /** @type {number} */
431 UI.CSSShadowEditor.canvasSize = 88; 432 UI.CSSShadowEditor.canvasSize = 88;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698