Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: Source/WebCore/inspector/front-end/StylesSidebarPane.js

Issue 9131006: Revert 105252 - Merge 105140 - Web Inspector: [TextPrompt] Autocomplete adds unwanted text that's... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/TextPrompt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/StylesSidebarPane.js
===================================================================
--- Source/WebCore/inspector/front-end/StylesSidebarPane.js (revision 105498)
+++ Source/WebCore/inspector/front-end/StylesSidebarPane.js (working copy)
@@ -2150,9 +2150,9 @@
_hasBeenModifiedIncrementally: function()
{
- // New properties applied via up/down or live editing have an originalPropertyText and will be deleted later
+ // New properties applied via up/down have an originalPropertyText and will be deleted later
// on, if cancelled, when the empty string gets applied as their style text.
- return typeof this.originalPropertyText === "string" || (!!this.property.propertyText && this._newProperty);
+ return typeof this.originalPropertyText === "string";
},
applyStyleText: function(styleText, updateInterface, majorChange, isRevert)
@@ -2178,7 +2178,7 @@
styleText = styleText.replace(/\s/g, " ").trim(); // Replace   with whitespace.
var styleTextLength = styleText.length;
if (!styleTextLength && updateInterface && !isRevert && this._newProperty && !this._hasBeenModifiedIncrementally()) {
- // The user deleted everything and never applied a new property value via Up/Down scrolling/live editing, so remove the tree element and update.
+ // The user deleted everything and never applied a new property value via Up/Down scrolling, so remove the tree element and update.
this.parent.removeChild(this);
section.afterUpdate();
return;
@@ -2252,19 +2252,17 @@
return;
}
break;
+ case "U+0009":
+ if (this.isSuggestBoxVisible()) {
+ this._suggestBox.acceptSuggestion();
+ return !this._isEditingName;
+ }
+ return this.acceptAutoComplete();
}
WebInspector.TextPrompt.prototype.onKeyDown.call(this, event);
},
- tabKeyPressed: function()
- {
- this.acceptAutoComplete();
-
- // Always tab to the next field.
- return false;
- },
-
_handleNameOrValueUpDown: function(event)
{
// Handle numeric value increment/decrement only at this point.
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/TextPrompt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698