WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200237
Web Inspector: Styles: variable swatch not shown for var() with a fallback
https://bugs.webkit.org/show_bug.cgi?id=200237
Summary
Web Inspector: Styles: variable swatch not shown for var() with a fallback
Devin Rousso
Reported
2019-07-29 13:26:44 PDT
var(--test) shows a swatch var(--test, 0) does NOT show a swatch
Attachments
Patch
(9.05 KB, patch)
2019-07-29 15:34 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-highsierra-wk2
(2.83 MB, application/zip)
2019-07-29 16:39 PDT
,
EWS Watchlist
no flags
Details
Patch
(31.65 KB, patch)
2019-08-03 15:23 PDT
,
Devin Rousso
joepeck
: review+
Details
Formatted Diff
Diff
Patch
(31.65 KB, patch)
2019-08-05 15:28 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2019-07-29 15:34:43 PDT
Created
attachment 375111
[details]
Patch
EWS Watchlist
Comment 2
2019-07-29 16:39:06 PDT
Comment hidden (obsolete)
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
EWS Watchlist
Comment 3
2019-07-29 16:39:08 PDT
Comment hidden (obsolete)
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
Joseph Pecoraro
Comment 4
2019-08-02 20:18:05 PDT
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.
Devin Rousso
Comment 5
2019-08-03 12:16:08 PDT
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.
Devin Rousso
Comment 6
2019-08-03 15:23:59 PDT
Created
attachment 375491
[details]
Patch
Joseph Pecoraro
Comment 7
2019-08-05 13:51:24 PDT
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?
Devin Rousso
Comment 8
2019-08-05 15:28:09 PDT
Created
attachment 375571
[details]
Patch
WebKit Commit Bot
Comment 9
2019-08-05 16:40:47 PDT
Comment on
attachment 375571
[details]
Patch Clearing flags on attachment: 375571 Committed
r248279
: <
https://trac.webkit.org/changeset/248279
>
WebKit Commit Bot
Comment 10
2019-08-05 16:40:48 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2019-08-05 16:41:20 PDT
<
rdar://problem/53964395
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug