Web Inspector: Support smart-pasting in the Rules sidebar panel
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jul 2015 23:56:51 +0000 (23:56 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jul 2015 23:56:51 +0000 (23:56 +0000)
commitd00d035bedd0fd7def0b1de23ff5e75cef3acc53
treed9ae19d0313730eac5f3cc79ac54ef710c688522
parent2b2c074d83904ffcbd1268a4b8e9472c674e4739
Web Inspector: Support smart-pasting in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147362

Reviewed by Timothy Hatcher.

When pasting over the selector, if the pasted text matches CSS rule
formatting, replace the selected rule with the selector and text in
the pasted data.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeRule.changeCompleted):
(WebInspector.DOMNodeStyles.prototype.changeRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
(WebInspector.DOMNodeStyles.prototype.changeRule.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection):

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