Web Inspector: "Copy Rule" menu item does not propagate comments properly
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 18:21:04 +0000 (18:21 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 18:21:04 +0000 (18:21 +0000)
commitcf3f60dbec64edf51bfd71e34991c62f50465615
treebb33a7c4872d66a5a2a0296fcf40c5371705d4a1
parent7af7b55c0cab41ca5c01ac2dc34965bafd3ba979
Web Inspector: "Copy Rule" menu item does not propagate comments properly
https://bugs.webkit.org/show_bug.cgi?id=201095

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.commentOut):
(WI.CSSProperty.prototype.get formattedText):
Wrap the `text` in `/* ${text} */` if the `WI.CSSProperty` isn't `enabled` (e.g. commented out).

LayoutTests:

* inspector/css/generateCSSRuleString.html:
* inspector/css/generateCSSRuleString-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/css/generateCSSRuleString-expected.txt
LayoutTests/inspector/css/generateCSSRuleString.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSProperty.js