| Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| index 82a5a0d13020d309c300c25eebf544e17231b7ba..9325f062ba194ca295ac7da8407b8918ee9017d0 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
|
| @@ -2344,7 +2344,6 @@ Elements.StylePropertyTreeElement = class extends UI.TreeElement {
|
| if (selectElement.parentElement)
|
| selectElement.parentElement.scrollIntoViewIfNeeded(false);
|
|
|
| - var applyItemCallback = !isEditingName ? this._applyFreeFlowStyleTextEdit.bind(this) : undefined;
|
| var cssCompletions = [];
|
| if (isEditingName) {
|
| cssCompletions = SDK.cssMetadata().allProperties();
|
| @@ -2357,16 +2356,16 @@ Elements.StylePropertyTreeElement = class extends UI.TreeElement {
|
|
|
| this._prompt = new Elements.StylesSidebarPane.CSSPropertyPrompt(cssCompletions, cssVariables, this, isEditingName);
|
| this._prompt.setAutocompletionTimeout(0);
|
| - if (applyItemCallback) {
|
| - this._prompt.addEventListener(UI.TextPrompt.Events.ItemApplied, applyItemCallback, this);
|
| - this._prompt.addEventListener(UI.TextPrompt.Events.ItemAccepted, applyItemCallback, this);
|
| - }
|
| +
|
| + // Do not live-edit "content" property of pseudo elements. crbug.com/433889
|
| + if (!isEditingName && (!this._parentPane.node().pseudoType() || this.name !== 'content'))
|
| + this._prompt.on(UI.TextPrompt.TextChangedEvent, this._applyFreeFlowStyleTextEdit.bind(this));
|
| +
|
| var proxyElement = this._prompt.attachAndStartEditing(selectElement, blurListener.bind(this, context));
|
| this._navigateToSource(selectElement, true);
|
|
|
| proxyElement.addEventListener('keydown', this._editingNameValueKeyDown.bind(this, context), false);
|
| proxyElement.addEventListener('keypress', this._editingNameValueKeyPress.bind(this, context), false);
|
| - proxyElement.addEventListener('input', this._editingNameValueInput.bind(this, context), false);
|
| if (isEditingName)
|
| proxyElement.addEventListener('paste', pasteHandler.bind(this, context), false);
|
|
|
| @@ -2455,16 +2454,6 @@ Elements.StylePropertyTreeElement = class extends UI.TreeElement {
|
| }
|
| }
|
|
|
| - /**
|
| - * @param {!Elements.StylePropertyTreeElement.Context} context
|
| - * @param {!Event} event
|
| - */
|
| - _editingNameValueInput(context, event) {
|
| - // Do not live-edit "content" property of pseudo elements. crbug.com/433889
|
| - if (!context.isEditingName && (!this._parentPane.node().pseudoType() || this.name !== 'content'))
|
| - this._applyFreeFlowStyleTextEdit();
|
| - }
|
| -
|
| _applyFreeFlowStyleTextEdit() {
|
| var valueText = this._prompt.textWithCurrentSuggestion();
|
| if (valueText.indexOf(';') === -1)
|
|
|