RESOLVED FIXED 240715
Web Inspector: Assertion Failed: Expect an array of string values CSSCompletions.js:39
https://bugs.webkit.org/show_bug.cgi?id=240715
Summary Web Inspector: Assertion Failed: Expect an array of string values CSSCompleti...
Razvan Caliman
Reported 2022-05-20 07:28:23 PDT
``` [Error] Assertion Failed: Expect an array of string values – [] (0) CSSCompletions (CSSCompletions.js:39) (anonymous function) (CSSKeywordCompletions.js:233) (anonymous function) (CSSKeywordCompletions.js:129) _valueCompletionDataProvider _updateCompletions (SpreadsheetTextField.js:435) _handleInput (SpreadsheetTextField.js:422) _handleInput ``` **Steps to reproduce** - Open Web Inspector, go to Styles sidebar panel - Type `var(` on any CSS value **Result** No issue in UI or UX, but the assertion above is hit. **Explanation** It happens because the `WI.CSSCompletions` instance created in `WI.CSSKeywordCompletions.forFunction()` is initially given an empty array for "var" functions. The actual values are added immediately after instantiation via `WI.CSSCompletions.addValues()`. They come from the custom completion provider referenced by the `additionalFunctionValueCompletionsProvider` option. There's no reason to have this two step approach. We can provide the result of `additionalFunctionValueCompletionsProvider("var")` at `WI.CSSCompletions` instantiation.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-05-20 07:29:02 PDT
Razvan Caliman
Comment 2 2022-05-20 07:50:00 PDT
EWS
Comment 3 2022-05-24 13:55:35 PDT
Committed r294763 (250929@main): <https://commits.webkit.org/250929@main> Reviewed commits have been landed. Closing PR #831 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.