Web Inspector: Styles Redesign: navigating away from empty value should remove CSS...
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 06:19:57 +0000 (06:19 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 06:19:57 +0000 (06:19 +0000)
commitcd3d030a4bb8fa97a640f50ee226ee873c095406
tree584d0a3e3e741b7fafe305d8a053e3838dd7fab2
parent78e4962afb487ba51d24b761fb95ca85723bd443
Web Inspector: Styles Redesign: navigating away from empty value should remove CSS property
https://bugs.webkit.org/show_bug.cgi?id=180508

Reviewed by Devin Rousso.

Remove a property when navigating away from it (e.g. to the next/previous property,
or outside of the styles panel entirely) and either its name or value is empty:

    color: [ ]->
    <-[ ]: red
    <-[color]:

Don't remove a property when navigating from an empty value to a non-empty name:

    color: <-[ ]

Always remove a property when both name and value are empty.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype._handleBlur):
(WI.SpreadsheetTextField.prototype.get valueBeforeEditing): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js