| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 * @param {!WebInspector.StylePropertyTreeElement.Context} context | 2450 * @param {!WebInspector.StylePropertyTreeElement.Context} context |
| 2451 * @param {!Event} event | 2451 * @param {!Event} event |
| 2452 */ | 2452 */ |
| 2453 _editingNameValueInput(context, event) { | 2453 _editingNameValueInput(context, event) { |
| 2454 // Do not live-edit "content" property of pseudo elements. crbug.com/433889 | 2454 // Do not live-edit "content" property of pseudo elements. crbug.com/433889 |
| 2455 if (!context.isEditingName && (!this._parentPane.node().pseudoType() || this
.name !== 'content')) | 2455 if (!context.isEditingName && (!this._parentPane.node().pseudoType() || this
.name !== 'content')) |
| 2456 this._applyFreeFlowStyleTextEdit(); | 2456 this._applyFreeFlowStyleTextEdit(); |
| 2457 } | 2457 } |
| 2458 | 2458 |
| 2459 _applyFreeFlowStyleTextEdit() { | 2459 _applyFreeFlowStyleTextEdit() { |
| 2460 var valueText = this.valueElement.textContent; | 2460 var valueText = this._prompt.textWithCurrentSuggestion(); |
| 2461 if (valueText.indexOf(';') === -1) | 2461 if (valueText.indexOf(';') === -1) |
| 2462 this.applyStyleText(this.nameElement.textContent + ': ' + valueText, false
); | 2462 this.applyStyleText(this.nameElement.textContent + ': ' + valueText, false
); |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 kickFreeFlowStyleEditForTest() { | 2465 kickFreeFlowStyleEditForTest() { |
| 2466 this._applyFreeFlowStyleTextEdit(); | 2466 this._applyFreeFlowStyleTextEdit(); |
| 2467 } | 2467 } |
| 2468 | 2468 |
| 2469 /** | 2469 /** |
| 2470 * @param {!WebInspector.StylePropertyTreeElement.Context} context | 2470 * @param {!WebInspector.StylePropertyTreeElement.Context} context |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3069 } | 3069 } |
| 3070 | 3070 |
| 3071 /** | 3071 /** |
| 3072 * @override | 3072 * @override |
| 3073 * @return {!WebInspector.ToolbarItem} | 3073 * @return {!WebInspector.ToolbarItem} |
| 3074 */ | 3074 */ |
| 3075 item() { | 3075 item() { |
| 3076 return this._button; | 3076 return this._button; |
| 3077 } | 3077 } |
| 3078 }; | 3078 }; |
| OLD | NEW |