| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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.StylesPopoverHelper = function() | 9 WebInspector.StylesPopoverHelper = function() |
| 10 { | 10 { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @return {boolean} | 34 * @return {boolean} |
| 35 */ | 35 */ |
| 36 isShowing: function() | 36 isShowing: function() |
| 37 { | 37 { |
| 38 return this._popover.isShowing(); | 38 return this._popover.isShowing(); |
| 39 }, | 39 }, |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * @param {!WebInspector.View} view | 42 * @param {!WebInspector.Widget} view |
| 43 * @param {!Element} anchorElement | 43 * @param {!Element} anchorElement |
| 44 * @param {function(boolean)=} hiddenCallback | 44 * @param {function(boolean)=} hiddenCallback |
| 45 */ | 45 */ |
| 46 show: function(view, anchorElement, hiddenCallback) | 46 show: function(view, anchorElement, hiddenCallback) |
| 47 { | 47 { |
| 48 if (this._popover.isShowing()) { | 48 if (this._popover.isShowing()) { |
| 49 if (this._anchorElement === anchorElement) | 49 if (this._anchorElement === anchorElement) |
| 50 return; | 50 return; |
| 51 | 51 |
| 52 // Reopen the picker for another anchor element. | 52 // Reopen the picker for another anchor element. |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 this._spectrum.removeEventListener(WebInspector.Spectrum.Events.ColorCha
nged, this._boundSpectrumChanged); | 339 this._spectrum.removeEventListener(WebInspector.Spectrum.Events.ColorCha
nged, this._boundSpectrumChanged); |
| 340 delete this._spectrum; | 340 delete this._spectrum; |
| 341 | 341 |
| 342 var propertyText = commitEdit ? this._treeElement.renderedPropertyText()
: this._originalPropertyText; | 342 var propertyText = commitEdit ? this._treeElement.renderedPropertyText()
: this._originalPropertyText; |
| 343 this._treeElement.applyStyleText(propertyText, true); | 343 this._treeElement.applyStyleText(propertyText, true); |
| 344 this._treeElement.parentPane().setEditingStyle(false); | 344 this._treeElement.parentPane().setEditingStyle(false); |
| 345 delete this._originalPropertyText; | 345 delete this._originalPropertyText; |
| 346 } | 346 } |
| 347 } | 347 } |
| OLD | NEW |