[webkit-changes] [WebKit/WebKit] 14ea1c: Web Inspector: console's code completion should be...
Qianlang Chen
noreply at github.com
Thu May 23 08:02:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 14ea1c16323321db0dd237aad3aa22a9e48f9a54
https://github.com/WebKit/WebKit/commit/14ea1c16323321db0dd237aad3aa22a9e48f9a54
Author: Qianlang Chen <qianlangchen at apple.com>
Date: 2024-05-23 (Thu, 23 May 2024)
Changed paths:
M LayoutTests/inspector/console/js-completions-expected.txt
M LayoutTests/inspector/console/js-completions.html
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
M Source/WebInspectorUI/UserInterface/Base/Setting.js
M Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js
M Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js
M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js
Log Message:
-----------
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
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list