Bug 224010

Summary: Web Inspector: Autocomplete experimental CSS Color values (hwb, lch, lab, color-mix, color-contrast)
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ews-watchlist, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Nikita Vasilyev 2021-03-31 12:27:01 PDT
Web Inspector should show completions for these when the corresponding experimental settings are enabled.
Comment 1 Radar WebKit Bug Importer 2021-03-31 12:27:11 PDT
<rdar://problem/76065217>
Comment 2 Nikita Vasilyev 2021-03-31 12:30:35 PDT
Created attachment 424801 [details]
Patch
Comment 3 Joseph Pecoraro 2021-03-31 12:44:37 PDT
Comment on attachment 424801 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424801&action=review

> Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:166
> +WI.CSSKeywordCompletions.getExperimentalProperties = function(properties) {

Style: Put the `{` on the next line?

> Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:169
> +        if (CSS.supports(test))

The `CSS.supports` is neat, but why not do it all time?

You could be on a macOS system that doesn't support the syntax and inspecting an iOS target that does support it. In that case we'd probably still want completion to work. So might as well do it all the time.
Comment 4 Nikita Vasilyev 2021-03-31 12:55:17 PDT
Created attachment 424808 [details]
Patch
Comment 5 BJ Burg 2021-03-31 15:10:00 PDT
Comment on attachment 424808 [details]
Patch

r=me
Comment 6 EWS 2021-03-31 15:31:58 PDT
Committed r275310: <https://commits.webkit.org/r275310>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424808 [details].