var(--test) shows a swatch var(--test, 0) does NOT show a swatch
Created attachment 375111 [details] Patch
Comment on attachment 375111 [details] Patch Attachment 375111 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/12832490 New failing tests: fast/workers/worker-document-leak.html
Created attachment 375124 [details] Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 375111 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375111&action=review > Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:98 > +WI.CSSKeywordCompletions.isTimingFunctionAwareProperty = function(name) > +{ > + if (name in WI.CSSKeywordCompletions._timingFunctionAwareProperties) > + return true; > + > + let isNotPrefixed = name.charAt(0) !== "-"; > + if (isNotPrefixed && ("-webkit-" + name) in WI.CSSKeywordCompletions._timingFunctionAwareProperties) > + return true; I don't think this works at all. `_timingFunctionAwareProperties` is a Set and JavaScript's ` in ` syntax does not work with Sets. They should be like the other code that was updated: if (WI.CSSKeywordCompletions._timingFunctionAwareProperties.has(name)) ... if (isNotPrefixed && WI.CSSKeywordCompletions._timingFunctionAwareProperties.has("-webkit-" + name)) ... > Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:453 > + tokens = this._addVariableTokens(tokens); Did the order matter? This now creates an inline swatch for the variable earlier, before colors. I didn't follow this logic all the way to see if that would be good or bad.
Comment on attachment 375111 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375111&action=review >> Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:98 >> + return true; > > I don't think this works at all. `_timingFunctionAwareProperties` is a Set and JavaScript's ` in ` syntax does not work with Sets. > > They should be like the other code that was updated: > > if (WI.CSSKeywordCompletions._timingFunctionAwareProperties.has(name)) > ... > if (isNotPrefixed && WI.CSSKeywordCompletions._timingFunctionAwareProperties.has("-webkit-" + name)) > ... Oops! I changed `_colorAwareProperties`, but forgot about `_timingFunctionAwareProperties` 😅 >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:453 >> + tokens = this._addVariableTokens(tokens); > > Did the order matter? This now creates an inline swatch for the variable earlier, before colors. I didn't follow this logic all the way to see if that would be good or bad. Yes, the order does have an effect, because the various `_add*Tokens` replaces the token with an `WI.InlineSwatch`, meaning we no longer get access to the token data from CodeMirror. I actually need to rework this a tiny bit so we get swatches for fallback values.
Created attachment 375491 [details] Patch
Comment on attachment 375491 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375491&action=review r=me > Source/WebInspectorUI/ChangeLog:33 > + Follow the variable "path" until an ultimate value is reached. Follow the variable chain?
Created attachment 375571 [details] Patch
Comment on attachment 375571 [details] Patch Clearing flags on attachment: 375571 Committed r248279: <https://trac.webkit.org/changeset/248279>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53964395>