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

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js

Issue 2760583002: DevTools: Don't give up autocomplete after a fancy character in a string (Closed)
Patch Set: merge Created 3 years, 9 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
Index: third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js b/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
index 0364441afb78c9994e0ae2576c003908f8286a79..7f508b465491f994f71217f6d2ba9c06ff0cdeae 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
@@ -110,13 +110,11 @@ TextEditor.TextEditorAutocompleteController = class {
* @param {!Common.TextRange} queryRange
* @param {!Common.TextRange} substituteRange
* @param {boolean=} force
- * @param {string=} tokenType
* @return {!Promise.<!UI.SuggestBox.Suggestions>}
*/
- _wordsWithQuery(queryRange, substituteRange, force, tokenType) {
- var external = this._config.suggestionsCallback ?
- this._config.suggestionsCallback(queryRange, substituteRange, force, tokenType) :
- null;
+ _wordsWithQuery(queryRange, substituteRange, force) {
+ var external =
+ this._config.suggestionsCallback ? this._config.suggestionsCallback(queryRange, substituteRange, force) : null;
if (external)
return external;
@@ -235,9 +233,7 @@ TextEditor.TextEditorAutocompleteController = class {
var hadSuggestBox = false;
if (this._suggestBox)
hadSuggestBox = true;
- var token = this._textEditor.tokenAtTextPosition(substituteRange.startLine, substituteRange.startColumn);
- var tokenType = (token && token.type) || '';
- this._wordsWithQuery(queryRange, substituteRange, force, tokenType).then(wordsAcquired.bind(this));
+ this._wordsWithQuery(queryRange, substituteRange, force).then(wordsAcquired.bind(this));
/**
* @param {!UI.SuggestBox.Suggestions} wordsWithQuery

Powered by Google App Engine
This is Rietveld 408576698