Fixes the issue were a Database view could still be visible after navigating to a...
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2008 20:55:15 +0000 (20:55 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2008 20:55:15 +0000 (20:55 +0000)
Reviewed by Darin Adler.

* page/inspector/DatabasesPanel.js:
(WebInspector.DatabasesPanel.prototype.reset): Delete the _tableViews and _queryView properties
from all databases. Remove all the children from databaseViews.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32347 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/inspector/DatabasesPanel.js

index 24f2e7c..04f4da2 100644 (file)
@@ -1,5 +1,15 @@
 2008-04-21  Timothy Hatcher  <timothy@apple.com>
 
+        Fixes the issue were a Database view could still be visible after navigating to a new page.
+
+        Reviewed by Darin Adler.
+
+        * page/inspector/DatabasesPanel.js:
+        (WebInspector.DatabasesPanel.prototype.reset): Delete the _tableViews and _queryView properties
+        from all databases. Remove all the children from databaseViews.
+
+2008-04-21  Timothy Hatcher  <timothy@apple.com>
+
         Adds the ability to enter multi-line commands in the console by holding the
         alt/option key when pressing enter/return.
 
index 1a3bb39..79adab0 100644 (file)
@@ -69,9 +69,20 @@ WebInspector.DatabasesPanel.prototype = {
 
     reset: function()
     {
+        if (this._databases) {
+            var databasesLength = this._databases.length;
+            for (var i = 0; i < databasesLength; ++i) {
+                var database = this._databases[i];
+
+                delete database._tableViews;
+                delete database._queryView;
+            }
+        }
+
         this._databases = [];
 
         this.sidebarTree.removeChildren();
+        this.databaseViews.removeChildren();
     },
 
     handleKeyEvent: function(event)