Changeset 146057 in webkit
- Timestamp:
- Mar 18, 2013 5:52:47 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146056 r146057 1 2013-03-18 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: [Resources] Local Storage: duplicate keys are processed inappropriately. 4 https://bugs.webkit.org/show_bug.cgi?id=112402 5 6 Reviewed by Alexander Pavlov. 7 8 When user creates new items or renames existing one some existing item 9 may be overriden. If value is changed, then frontend will receive 10 notification and update record appropriately. 11 12 If item value hasn't been changed, then no notification comes. 13 But UI still expect / rely on this notification. 14 15 With this patch the "no notification" scenario is fixed: 16 duplicate items are removed. 17 18 Another scenario is when update notification comes when we started 19 editing value (after entering / renaming key). In this case 20 selected node should not be changed to leave user in editing mode. 21 22 * inspector/front-end/DOMStorageItemsView.js: 23 Added workarounds for "no notification" and "useless notification". 24 1 25 2013-03-18 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 26 -
trunk/Source/WebCore/inspector/front-end/DOMStorageItemsView.js
r145901 r146057 152 152 } 153 153 keyFound = true; 154 childNode.data.value = storageData.newValue; 155 childNode.refresh(); 156 childNode.select(); 157 childNode.reveal(); 154 if (childNode.data.value !== storageData.newValue) { 155 childNode.data.value = storageData.newValue; 156 childNode.refresh(); 157 childNode.select(); 158 childNode.reveal(); 159 } 158 160 this.deleteButton.visible = true; 159 161 } … … 228 230 if (oldText) 229 231 domStorage.removeItem(oldText); 230 231 232 domStorage.setItem(newText, editingNode.data.value); 233 this._removeDupes(editingNode); 232 234 } else 233 235 domStorage.setItem(editingNode.data.key, newText); 234 236 }, 235 237 238 /** 239 * @param {!WebInspector.DataGridNode} masterNode 240 */ 241 _removeDupes: function(masterNode) 242 { 243 var rootNode = this._dataGrid.rootNode(); 244 var children = rootNode.children; 245 for (var i = children.length - 1; i >= 0; --i) { 246 var childNode = children[i]; 247 if ((childNode.data.key === masterNode.data.key) && (masterNode !== childNode)) 248 rootNode.removeChild(childNode); 249 } 250 }, 251 236 252 _deleteCallback: function(node) 237 253 {
Note: See TracChangeset
for help on using the changeset viewer.