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

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

Issue 2527503002: Revert of DevTools: all swatches should have a default focused element (Closed)
Patch Set: 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);
13 12
14 this._typeField = this.contentElement.createChild('div', 'shadow-editor-fiel d'); 13 this._typeField = this.contentElement.createChild('div', 'shadow-editor-fiel d');
15 this._typeField.createChild('label', 'shadow-editor-label').textContent = Co mmon.UIString('Type'); 14 this._typeField.createChild('label', 'shadow-editor-label').textContent = Co mmon.UIString('Type');
16 this._outsetButton = this._typeField.createChild('button', 'shadow-editor-bu tton-left'); 15 this._outsetButton = this._typeField.createChild('button', 'shadow-editor-bu tton-left');
17 this._outsetButton.textContent = Common.UIString('Outset'); 16 this._outsetButton.textContent = Common.UIString('Outset');
18 this._outsetButton.addEventListener('click', this._onButtonClick.bind(this), false); 17 this._outsetButton.addEventListener('click', this._onButtonClick.bind(this), false);
19 this._insetButton = this._typeField.createChild('button', 'shadow-editor-but ton-right'); 18 this._insetButton = this._typeField.createChild('button', 'shadow-editor-but ton-right');
20 this._insetButton.textContent = Common.UIString('Inset'); 19 this._insetButton.textContent = Common.UIString('Inset');
21 this._insetButton.addEventListener('click', this._onButtonClick.bind(this), false); 20 this._insetButton.addEventListener('click', this._onButtonClick.bind(this), false);
22 21
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 }; 422 };
424 423
425 /** @type {number} */ 424 /** @type {number} */
426 UI.CSSShadowEditor.maxRange = 20; 425 UI.CSSShadowEditor.maxRange = 20;
427 /** @type {string} */ 426 /** @type {string} */
428 UI.CSSShadowEditor.defaultUnit = 'px'; 427 UI.CSSShadowEditor.defaultUnit = 'px';
429 /** @type {number} */ 428 /** @type {number} */
430 UI.CSSShadowEditor.sliderThumbRadius = 6; 429 UI.CSSShadowEditor.sliderThumbRadius = 6;
431 /** @type {number} */ 430 /** @type {number} */
432 UI.CSSShadowEditor.canvasSize = 88; 431 UI.CSSShadowEditor.canvasSize = 88;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698