Web Inspector: CSS: there should be a way to inline-replace a variable with it's...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 19:11:52 +0000 (19:11 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 19:11:52 +0000 (19:11 +0000)
commit542a5103a793acc536ffc74353753d9e48674207
tree82e2d7a569111828e6b499d5a378b6a3b1208da1
parent51a03ac29d7c1cbf45ce7a50186235ee825fc33a
Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
https://bugs.webkit.org/show_bug.cgi?id=195335

Reviewed by Joseph Pecoraro.

* UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch):
(WI.InlineSwatch.prototype.didDismissPopover):
(WI.InlineSwatch.prototype._swatchElementClicked):
(WI.InlineSwatch.prototype._swatchElementClicked.optionsForType): Added.
Shift-clicking a variable swatch replaces the text with the variable's value.
Drive-by: try to create a readonly swatch for the variable's value (e.g. a color indicator).
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
If the value of a variable swatch changes, re-render the value.

* UserInterface/Views/CodeMirrorTextMarkers.js:
(createCodeMirrorTextMarkers):
(createCodeMirrorColorTextMarkers):
(createCodeMirrorGradientTextMarkers):
(createCodeMirrorBezierTextMarkers):
(createCodeMirrorSpringTextMarkers):
Refactor function parameters for more flexibility.

* Localizations/en.lproj/localizedStrings.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Views/CodeMirrorTextMarkers.js
Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js