| 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Object} | 7 * @extends {WebInspector.Object} |
| 8 */ | 8 */ |
| 9 WebInspector.SwatchPopoverHelper = function() | 9 WebInspector.SwatchPopoverHelper = function() |
| 10 { | 10 { |
| 11 this._popover = new WebInspector.Popover(); | 11 this._popover = new WebInspector.Popover(); |
| 12 this._popover.setCanShrink(false); | 12 this._popover.setCanShrink(false); |
| 13 this._popover.setNoMargins(true); | 13 this._popover.setNoPadding(true); |
| 14 this._popover.element.addEventListener("mousedown", (e) => e.consume(), fals
e); | 14 this._popover.element.addEventListener("mousedown", (e) => e.consume(), fals
e); |
| 15 | 15 |
| 16 this._hideProxy = this.hide.bind(this, true); | 16 this._hideProxy = this.hide.bind(this, true); |
| 17 this._boundOnKeyDown = this._onKeyDown.bind(this); | 17 this._boundOnKeyDown = this._onKeyDown.bind(this); |
| 18 this._boundFocusOut = this._onFocusOut.bind(this); | 18 this._boundFocusOut = this._onFocusOut.bind(this); |
| 19 this._isHidden = true; | 19 this._isHidden = true; |
| 20 } | 20 } |
| 21 | 21 |
| 22 WebInspector.SwatchPopoverHelper.prototype = { | 22 WebInspector.SwatchPopoverHelper.prototype = { |
| 23 /** | 23 /** |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return; | 113 return; |
| 114 } | 114 } |
| 115 if (event.key === "Escape") { | 115 if (event.key === "Escape") { |
| 116 this.hide(false); | 116 this.hide(false); |
| 117 event.consume(true); | 117 event.consume(true); |
| 118 } | 118 } |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 __proto__: WebInspector.Object.prototype | 121 __proto__: WebInspector.Object.prototype |
| 122 } | 122 } |
| OLD | NEW |