summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlushnikov <lushnikov@chromium.org>2016-01-20 13:42:13 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-20 21:43:24 +0000
commita7e83e63842dc92ed11d8217d3da7bb3a27fe7d2 (patch)
tree25463c4429dec83a914b7c1c235cdfefe683f6d0
parent790cc806fc0e7e1a8a52db624c87ca50750bb718 (diff)
downloadchromium_src-a7e83e63842dc92ed11d8217d3da7bb3a27fe7d2.zip
chromium_src-a7e83e63842dc92ed11d8217d3da7bb3a27fe7d2.tar.gz
chromium_src-a7e83e63842dc92ed11d8217d3da7bb3a27fe7d2.tar.bz2
Revert of Devtools Console: Tab to autocomplete and enter to execute command (patchset #2 id:40001 of https://codereview.chromium.org/1608673002/ )
Reason for revert: This patch breaks suggest box in Sources panel. As the patch is subject to merge, I revert this for now so that you would be able to merge a single patch. Original issue's description: > Devtools Console: Tab to autocomplete and enter to execute command > > BUG=578901 > > Committed: https://crrev.com/72c13ed8293f8bd61ecb91a4ccc23a975da30fb2 > Cr-Commit-Position: refs/heads/master@{#370302} TBR=paulirish@chromium.org,pfeldman@chromium.org,samli@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=578901 Review URL: https://codereview.chromium.org/1614473002 Cr-Commit-Position: refs/heads/master@{#370499}
-rw-r--r--third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html2
-rw-r--r--third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js6
-rw-r--r--third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js3
3 files changed, 7 insertions, 4 deletions
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html b/third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html
index 1f88e31..5113ef2 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/autocomplete-general.html
@@ -32,7 +32,7 @@ function test()
InspectorTest.typeIn(textEditor, "m");
function onAutocompletionSuggestBox()
{
- document.activeElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009"));
+ document.activeElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
dumpDictionary(next);
}
},
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
index f4c16c9..a6e2903 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
@@ -398,8 +398,8 @@ WebInspector.SuggestBox.prototype = {
return this.pageUpKeyPressed();
case "PageDown":
return this.pageDownKeyPressed();
- case "U+0009": // Tab
- return this.tabKeyPressed();
+ case "Enter":
+ return this.enterKeyPressed();
}
return false;
},
@@ -441,7 +441,7 @@ WebInspector.SuggestBox.prototype = {
/**
* @return {boolean}
*/
- tabKeyPressed: function()
+ enterKeyPressed: function()
{
var hasSelectedItem = !!this._selectedElement;
this.acceptSuggestion();
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
index 06bdb2a..f882cfd 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -285,6 +285,9 @@ WebInspector.TextPrompt.prototype = {
delete this._needUpdateAutocomplete;
switch (event.keyIdentifier) {
+ case "U+0009": // Tab
+ handled = this.tabKeyPressed(event);
+ break;
case "Left":
case "Home":
this._removeSuggestionAids();