| OLD | NEW |
| 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'); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 textInput.addEventListener('input', this._onTextInput.bind(this), false); | 60 textInput.addEventListener('input', this._onTextInput.bind(this), false); |
| 61 textInput.addEventListener('blur', this._onTextBlur.bind(this), false); | 61 textInput.addEventListener('blur', this._onTextBlur.bind(this), false); |
| 62 return textInput; | 62 return textInput; |
| 63 } | 63 } |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * @param {!Element} field | 66 * @param {!Element} field |
| 67 * @return {!Element} | 67 * @return {!Element} |
| 68 */ | 68 */ |
| 69 _createSlider(field) { | 69 _createSlider(field) { |
| 70 var slider = createSliderLabel(0, UI.CSSShadowEditor.maxRange, -1); | 70 var slider = UI.createSliderLabel(0, UI.CSSShadowEditor.maxRange, -1); |
| 71 slider.addEventListener('input', this._onSliderInput.bind(this), false); | 71 slider.addEventListener('input', this._onSliderInput.bind(this), false); |
| 72 field.appendChild(slider); | 72 field.appendChild(slider); |
| 73 return slider; | 73 return slider; |
| 74 } | 74 } |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @override | 77 * @override |
| 78 */ | 78 */ |
| 79 wasShown() { | 79 wasShown() { |
| 80 this._updateUI(); | 80 this._updateUI(); |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 }; | 420 }; |
| 421 | 421 |
| 422 /** @type {number} */ | 422 /** @type {number} */ |
| 423 UI.CSSShadowEditor.maxRange = 20; | 423 UI.CSSShadowEditor.maxRange = 20; |
| 424 /** @type {string} */ | 424 /** @type {string} */ |
| 425 UI.CSSShadowEditor.defaultUnit = 'px'; | 425 UI.CSSShadowEditor.defaultUnit = 'px'; |
| 426 /** @type {number} */ | 426 /** @type {number} */ |
| 427 UI.CSSShadowEditor.sliderThumbRadius = 6; | 427 UI.CSSShadowEditor.sliderThumbRadius = 6; |
| 428 /** @type {number} */ | 428 /** @type {number} */ |
| 429 UI.CSSShadowEditor.canvasSize = 88; | 429 UI.CSSShadowEditor.canvasSize = 88; |
| OLD | NEW |