| 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 a0516cc7f112be6588e2e4e6170857061f87361a..368d8388bac7f1b666d691a2e13fd54dd351c53a 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,11 +110,12 @@ WebInspector.TextEditorAutocompleteController = class {
|
| * @param {!WebInspector.TextRange} queryRange
|
| * @param {!WebInspector.TextRange} substituteRange
|
| * @param {boolean=} force
|
| + * @param {string=} tokenType
|
| * @return {!Promise.<!WebInspector.SuggestBox.Suggestions>}
|
| */
|
| - _wordsWithQuery(queryRange, substituteRange, force) {
|
| + _wordsWithQuery(queryRange, substituteRange, force, tokenType) {
|
| var external =
|
| - this._config.suggestionsCallback ? this._config.suggestionsCallback(queryRange, substituteRange, force) : null;
|
| + this._config.suggestionsCallback ? this._config.suggestionsCallback(queryRange, substituteRange, force, tokenType) : null;
|
| if (external)
|
| return external;
|
|
|
| @@ -233,8 +234,9 @@ WebInspector.TextEditorAutocompleteController = class {
|
| var hadSuggestBox = false;
|
| if (this._suggestBox)
|
| hadSuggestBox = true;
|
| -
|
| - this._wordsWithQuery(queryRange, substituteRange, force).then(wordsAcquired.bind(this));
|
| + var token = this._textEditor.tokenAtTextPosition(substituteRange.startLine, substituteRange.startColumn);
|
| + var tokenType = (token && token.type) || '';
|
| + this._wordsWithQuery(queryRange, substituteRange, force, tokenType).then(wordsAcquired.bind(this));
|
|
|
| /**
|
| * @param {!WebInspector.SuggestBox.Suggestions} wordsWithQuery
|
|
|