Modified: trunk/Source/WebInspectorUI/ChangeLog (236867 => 236868)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-10-05 03:03:21 UTC (rev 236867)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-10-05 04:04:10 UTC (rev 236868)
@@ -1,5 +1,25 @@
2018-10-04 Matt Baker <[email protected]>
+ Web Inspector: REGRESSION (r236766): Storage tab no longer updates after main frame navigation
+ https://bugs.webkit.org/show_bug.cgi?id=190298
+
+ Reviewed by Joseph Pecoraro.
+
+ Handle Cleared events from storage managers separately, so that successive
+ events during page load does not cause the Storage tab to destroy newly
+ created tree elements.
+
+ * UserInterface/Views/StorageSidebarPanel.js:
+ (WI.StorageSidebarPanel):
+ (WI.StorageSidebarPanel.prototype._closeContentViewForTreeElement):
+ (WI.StorageSidebarPanel.prototype._domStorageCleared):
+ (WI.StorageSidebarPanel.prototype._applicationCacheCleared):
+ (WI.StorageSidebarPanel.prototype._indexedDatabaseCleared):
+ (WI.StorageSidebarPanel.prototype._databaseCleared):
+ (WI.StorageSidebarPanel.prototype._storageCleared): Deleted.
+
+2018-10-04 Matt Baker <[email protected]>
+
Web Inspector: Table should support multiple selection and Cmd-click behavior
https://bugs.webkit.org/show_bug.cgi?id=189705
<rdar://problem/44571170>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js (236867 => 236868)
--- trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js 2018-10-05 03:03:21 UTC (rev 236867)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js 2018-10-05 04:04:10 UTC (rev 236868)
@@ -76,15 +76,15 @@
WI.domStorageManager.addEventListener(WI.DOMStorageManager.Event.CookieStorageObjectWasAdded, this._cookieStorageObjectWasAdded, this);
WI.domStorageManager.addEventListener(WI.DOMStorageManager.Event.DOMStorageObjectWasAdded, this._domStorageObjectWasAdded, this);
WI.domStorageManager.addEventListener(WI.DOMStorageManager.Event.DOMStorageObjectWasInspected, this._domStorageObjectWasInspected, this);
- WI.domStorageManager.addEventListener(WI.DOMStorageManager.Event.Cleared, this._storageCleared, this);
+ WI.domStorageManager.addEventListener(WI.DOMStorageManager.Event.Cleared, this._domStorageCleared, this);
WI.databaseManager.addEventListener(WI.DatabaseManager.Event.DatabaseWasAdded, this._databaseWasAdded, this);
WI.databaseManager.addEventListener(WI.DatabaseManager.Event.DatabaseWasInspected, this._databaseWasInspected, this);
- WI.databaseManager.addEventListener(WI.DatabaseManager.Event.Cleared, this._storageCleared, this);
+ WI.databaseManager.addEventListener(WI.DatabaseManager.Event.Cleared, this._databaseCleared, this);
WI.indexedDBManager.addEventListener(WI.IndexedDBManager.Event.IndexedDatabaseWasAdded, this._indexedDatabaseWasAdded, this);
- WI.indexedDBManager.addEventListener(WI.IndexedDBManager.Event.Cleared, this._storageCleared, this);
+ WI.indexedDBManager.addEventListener(WI.IndexedDBManager.Event.Cleared, this._indexedDatabaseCleared, this);
WI.applicationCacheManager.addEventListener(WI.ApplicationCacheManager.Event.FrameManifestAdded, this._frameManifestAdded, this);
WI.applicationCacheManager.addEventListener(WI.ApplicationCacheManager.Event.FrameManifestRemoved, this._frameManifestRemoved, this);
- WI.applicationCacheManager.addEventListener(WI.ApplicationCacheManager.Event.Cleared, this._storageCleared, this);
+ WI.applicationCacheManager.addEventListener(WI.ApplicationCacheManager.Event.Cleared, this._applicationCacheCleared, this);
this.contentTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._treeSelectionDidChange, this);
@@ -340,39 +340,69 @@
return parentElement;
}
- _storageCleared(event)
+ _closeContentViewForTreeElement(treeElement)
{
- this.contentBrowser.contentViewContainer.closeAllContentViews();
+ const _onlyExisting_ = true;
+ let contentView = this.contentBrowser.contentViewForRepresentedObject(treeElement.representedObject, onlyExisting);
+ if (contentView)
+ this.contentBrowser.contentViewContainer.closeContentView(contentView);
+ }
- if (this._localStorageRootTreeElement && this._localStorageRootTreeElement.parent)
+ _domStorageCleared(event)
+ {
+ if (this._localStorageRootTreeElement && this._localStorageRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._localStorageRootTreeElement);
this._localStorageRootTreeElement.parent.removeChild(this._localStorageRootTreeElement);
+ }
- if (this._sessionStorageRootTreeElement && this._sessionStorageRootTreeElement.parent)
+ if (this._sessionStorageRootTreeElement && this._sessionStorageRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._sessionStorageRootTreeElement);
this._sessionStorageRootTreeElement.parent.removeChild(this._sessionStorageRootTreeElement);
+ }
- if (this._databaseRootTreeElement && this._databaseRootTreeElement.parent)
- this._databaseRootTreeElement.parent.removeChild(this._databaseRootTreeElement);
-
- if (this._indexedDatabaseRootTreeElement && this._indexedDatabaseRootTreeElement.parent)
- this._indexedDatabaseRootTreeElement.parent.removeChild(this._indexedDatabaseRootTreeElement);
-
- if (this._cookieStorageRootTreeElement && this._cookieStorageRootTreeElement.parent)
+ if (this._cookieStorageRootTreeElement && this._cookieStorageRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._cookieStorageRootTreeElement);
this._cookieStorageRootTreeElement.parent.removeChild(this._cookieStorageRootTreeElement);
+ }
- if (this._applicationCacheRootTreeElement && this._applicationCacheRootTreeElement.parent)
- this._applicationCacheRootTreeElement.parent.removeChild(this._applicationCacheRootTreeElement);
-
this._localStorageRootTreeElement = null;
this._sessionStorageRootTreeElement = null;
- this._databaseRootTreeElement = null;
- this._databaseHostTreeElementMap.clear();
- this._indexedDatabaseRootTreeElement = null;
- this._indexedDatabaseHostTreeElementMap.clear();
this._cookieStorageRootTreeElement = null;
+ }
+
+ _applicationCacheCleared(event)
+ {
+ if (this._applicationCacheRootTreeElement && this._applicationCacheRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._applicationCacheRootTreeElement);
+ this._applicationCacheRootTreeElement.parent.removeChild(this._applicationCacheRootTreeElement);
+ }
+
this._applicationCacheRootTreeElement = null;
this._applicationCacheURLTreeElementMap.clear();
}
+ _indexedDatabaseCleared(event)
+ {
+ if (this._indexedDatabaseRootTreeElement && this._indexedDatabaseRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._indexedDatabaseRootTreeElement);
+ this._indexedDatabaseRootTreeElement.parent.removeChild(this._indexedDatabaseRootTreeElement);
+ }
+
+ this._indexedDatabaseRootTreeElement = null;
+ this._indexedDatabaseHostTreeElementMap.clear();
+ }
+
+ _databaseCleared(event)
+ {
+ if (this._databaseRootTreeElement && this._databaseRootTreeElement.parent) {
+ this._closeContentViewForTreeElement(this._databaseRootTreeElement);
+ this._databaseRootTreeElement.parent.removeChild(this._databaseRootTreeElement);
+ }
+
+ this._databaseRootTreeElement = null;
+ this._databaseHostTreeElementMap.clear();
+ }
+
_scopeBarSelectionDidChange(event)
{
this.updateFilter();