[webkit-reviews] review granted: [Bug 128620] Web Inspector: DOMStorageView should listen for events from DOMStorageObject : [Attachment 223894] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 11 16:32:09 PST 2014
Timothy Hatcher <timothy at apple.com> has granted Brian Burg <bburg at apple.com>'s
request for review:
Bug 128620: Web Inspector: DOMStorageView should listen for events from
DOMStorageObject
https://bugs.webkit.org/show_bug.cgi?id=128620
Attachment 223894: patch
https://bugs.webkit.org/attachment.cgi?id=223894&action=review
------- Additional Comments from Timothy Hatcher <timothy at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=223894&action=review
> Source/WebInspectorUI/ChangeLog:8
> + The storage manager used to have a map of DOMStorageViews and
delivered events
Yeah that was gross!
> Source/WebInspectorUI/UserInterface/DOMStorageObserver.js:70
> - WebInspector.storageManager.domStorageItemsCleared(storageId);
> + var object = WebInspector.storageManager.domStorageForId(storageId);
> + object.itemsCleared(storageId);
> },
>
> domStorageItemRemoved: function(storageId, key)
> {
> - WebInspector.storageManager.domStorageItemRemoved(storageId, key);
> + var object = WebInspector.storageManager.domStorageForId(storageId);
> + object.itemRemoved(storageId, key);
> },
>
> domStorageItemAdded: function(storageId, key, value)
> {
> - WebInspector.storageManager.domStorageItemAdded(storageId, key,
value);
> + var object = WebInspector.storageManager.domStorageForId(storageId);
> + object.itemAdded(storageId, key, value);
> },
>
> domStorageItemUpdated: function(storageId, key, oldValue, value)
> {
> - WebInspector.storageManager.domStorageItemUpdated(storageId, key,
oldValue, value);
> + var object = WebInspector.storageManager.domStorageForId(storageId);
> + object.itemUpdated(storageId, key, oldValue, value);
This differs from other observers. Usually the protocol observers are very thin
and do no work other than calling the right manager(s). That way any
compatibility work happens in the manager. Not that this way is entirely bad.
It would just push down compatibility massaging into the observer.
> Source/WebInspectorUI/UserInterface/StorageManager.js:108
> + domStorageForId: function(id)
domStorageForIdentifier
More information about the webkit-reviews
mailing list