-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Inspector: console's code completion should be case-insensitive
rdar://124544458 https://bugs.webkit.org/show_bug.cgi?id=270925 Reviewed by Devin Rousso. Convert both strings into lowercase when trying to match prefixes for function, variable, or property names. Also add an experimental setting item for this feature enhancement. * Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._applyCompletionHint.update): (WI.CodeMirrorCompletionController.prototype._applyCompletionHint): - Since case-insensitive matching may be used, only show the watermark text on the prompt if the typed text exactly, case-sensitively matches the prefix. * Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.): (WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): * Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames): (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded): (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare): Deleted. - Optionally perform case-insensitive prefix matching when filtering the code completion suggestions. * Source/WebInspectorUI/UserInterface/Base/Setting.js: * Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js: * Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js: - Add the experimental setting item for this change in the Settings tab's Experimental sub-tab. * LayoutTests/inspector/console/js-completions-expected.txt: * LayoutTests/inspector/console/js-completions.html: - Add a test case for the code completions' ordering since now it gets slightly more involved with case-insensitive matching. Canonical link: https://commits.webkit.org/279195@main
- Loading branch information
1 parent
5e0f9b3
commit 14ea1c1
Showing
7 changed files
with
248 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters