Bug 195335 - Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
Summary: Web Inspector: CSS: there should be a way to inline-replace a variable with i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-05 12:05 PST by Devin Rousso
Modified: 2019-03-07 11:12 PST (History)
6 users (show)

See Also:


Attachments
Patch (14.94 KB, patch)
2019-03-05 14:25 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (15.60 KB, patch)
2019-03-07 10:38 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-03-05 12:05:04 PST
This would be useful to see/edit a specific value, rather than having to go and find and edit the variable itself.
Comment 1 Devin Rousso 2019-03-05 14:25:45 PST
Created attachment 363688 [details]
Patch
Comment 2 Nikita Vasilyev 2019-03-05 14:35:40 PST
Comment on attachment 363688 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js:199
> +        if (event.target.closest("." + WI.InlineSwatch.className))
> +            return;

I don't think SpreadsheetTextField should know about WI.InlineSwatch.
Can we call `event.stopPropagation()` in WI.InlineSwatch.prototype._swatchElementClicked?
Comment 3 Joseph Pecoraro 2019-03-06 20:48:08 PST
Comment on attachment 363688 [details]
Patch

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

r=me.

The Shift+Click is hard to discover, even with a tooltip, but this is quite good for now.

>> Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js:199
>> +            return;
> 
> I don't think SpreadsheetTextField should know about WI.InlineSwatch.
> Can we call `event.stopPropagation()` in WI.InlineSwatch.prototype._swatchElementClicked?

I like this idea as well, it makes sense for the InlineSwatch to consume the click.
Comment 4 Devin Rousso 2019-03-07 10:38:39 PST
Created attachment 363893 [details]
Patch
Comment 5 WebKit Commit Bot 2019-03-07 11:11:58 PST
Comment on attachment 363893 [details]
Patch

Clearing flags on attachment: 363893

Committed r242602: <https://trac.webkit.org/changeset/242602>
Comment 6 WebKit Commit Bot 2019-03-07 11:11:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-03-07 11:12:26 PST
<rdar://problem/48682509>