Web Inspector: DOM Storage Editing is broken in many ways, frustrating
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Oct 2014 17:34:06 +0000 (17:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Oct 2014 17:34:06 +0000 (17:34 +0000)
commit648c2a8720f16ca951767668ad9c894e0f052761
tree46f50d674d0f749a595e2bf55504308dc73154dc
parent7aa7a9afec7369bf18b224fc9baa066907086232
Web Inspector: DOM Storage Editing is broken in many ways, frustrating
https://bugs.webkit.org/show_bug.cgi?id=137547

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-09
Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.getEntries): Deleted.
When getting entires, populate the model object with these keys/values
so we can accurately detect duplicates in editing.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.determineNextCell):
(WebInspector.DataGrid.prototype.moveToNextCell):
When the users uses "Enter" to commit, stop editing.

(WebInspector.DataGrid.prototype._editingCommitted):
Fix title property accessor. This is not a map. This fixes an exception
when showing context menus on editable data grid rows.

* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.cleanup):
(WebInspector.DOMStorageContentView.prototype.restoreOriginalValues):
(WebInspector.DOMStorageContentView.prototype._editingCallback):
Completely rewrite editing here. As soon as an edit is made, enter
an uncommitted state with the original key/value. When a commit is
allowed, update as appropriate based on the original values.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/DOMStorageObject.js
Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js
Source/WebInspectorUI/UserInterface/Views/DataGrid.js