Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 14:07:51 +0000 (14:07 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 14:07:51 +0000 (14:07 +0000)
commit8be8eb124becb77827aecbfefce7577d6df7b789
tree200b21d033493504fb547a270a3557e227a02ff7
parentc86882f5783111184bcb0700b94412395f980cdf
Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147361

Reviewed by Timothy Hatcher.

Adds context menu option to non-inherited rules that, when clicked, creates
a new rule with the same selector and no properties, and then focuses it.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector.addedRule):
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNextNewInspectorRule):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js
Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js