[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 14:49:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a0cc91fdfa687d42a05a8acd877844fa6d34bb0a
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 21 08:44:32 2010 +0000
2010-10-20 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: Convert sidebar into the browsing tree in the Storage panel.
https://bugs.webkit.org/show_bug.cgi?id=47988
* English.lproj/localizedStrings.js:
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleMessage.prototype._formatMessage):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView):
* inspector/front-end/DatabaseTableView.js:
(WebInspector.DatabaseTableView.prototype._queryFinished):
* inspector/front-end/StoragePanel.js:
(WebInspector.StoragePanel):
(WebInspector.StoragePanel.prototype.reset):
(WebInspector.StoragePanel.prototype.addDatabase):
(WebInspector.StoragePanel.prototype.addCookieDomain):
(WebInspector.StoragePanel.prototype.addDOMStorage):
(WebInspector.StoragePanel.prototype.addApplicationCache):
(WebInspector.StoragePanel.prototype.showDatabase):
(WebInspector.StoragePanel.prototype.showDOMStorage):
(WebInspector.StoragePanel.prototype.showCookies):
(WebInspector.StoragePanel.prototype.showApplicationCache):
(WebInspector.StoragePanel.prototype.showCategoryView):
(WebInspector.StoragePanel.prototype._innerShowView):
(WebInspector.BaseStorageTreeElement):
(WebInspector.BaseStorageTreeElement.prototype.onattach):
(WebInspector.StorageCategoryTreeElement):
(WebInspector.StorageCategoryTreeElement.prototype.onselect):
(WebInspector.DatabaseTreeElement):
(WebInspector.DatabaseTreeElement.prototype.onselect):
(WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
(WebInspector.DatabaseTreeElement.prototype.onpopulate):
(WebInspector.DatabaseTableTreeElement):
(WebInspector.DatabaseTableTreeElement.prototype.onselect):
(WebInspector.DOMStorageTreeElement):
(WebInspector.DOMStorageTreeElement.prototype.onselect):
(WebInspector.CookieTreeElement):
(WebInspector.CookieTreeElement.prototype.onselect):
(WebInspector.ApplicationCacheTreeElement):
(WebInspector.ApplicationCacheTreeElement.prototype.onselect):
(WebInspector.StorageCategoryView):
(WebInspector.StorageCategoryView.prototype.setText):
* inspector/front-end/inspector.css:
(.properties-tree ol):
(.properties-tree ol.expanded):
(.database-storage-tree-item .icon):
(.database-table-storage-tree-item .icon):
(.domstorage-storage-tree-item.local-storage .icon):
(.domstorage-storage-tree-item.session-storage .icon):
(.cookie-storage-tree-item .icon):
(.application-cache-storage-tree-item .icon):
(.storage.panel .sidebar):
(.storage.panel .outline-disclosure > ol):
(.storage.panel .outline-disclosure li):
(.storage.panel .outline-disclosure li .selection):
(.storage.panel .sidebar-resizer-vertical):
(.storage-base-tree-element-title):
(.storage.panel .outline-disclosure ol):
(.storage.panel .outline-disclosure li.selected):
(.storage.panel .outline-disclosure .icon):
(.storage-empty-view, .storage-view.table .storage-table-error):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1c7b397..8049e6b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,70 @@
+2010-10-20 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Convert sidebar into the browsing tree in the Storage panel.
+ https://bugs.webkit.org/show_bug.cgi?id=47988
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ApplicationCacheItemsView.js:
+ (WebInspector.ApplicationCacheItemsView):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._formatMessage):
+ * inspector/front-end/CookieItemsView.js:
+ (WebInspector.CookieItemsView):
+ * inspector/front-end/DatabaseTableView.js:
+ (WebInspector.DatabaseTableView.prototype._queryFinished):
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel):
+ (WebInspector.StoragePanel.prototype.reset):
+ (WebInspector.StoragePanel.prototype.addDatabase):
+ (WebInspector.StoragePanel.prototype.addCookieDomain):
+ (WebInspector.StoragePanel.prototype.addDOMStorage):
+ (WebInspector.StoragePanel.prototype.addApplicationCache):
+ (WebInspector.StoragePanel.prototype.showDatabase):
+ (WebInspector.StoragePanel.prototype.showDOMStorage):
+ (WebInspector.StoragePanel.prototype.showCookies):
+ (WebInspector.StoragePanel.prototype.showApplicationCache):
+ (WebInspector.StoragePanel.prototype.showCategoryView):
+ (WebInspector.StoragePanel.prototype._innerShowView):
+ (WebInspector.BaseStorageTreeElement):
+ (WebInspector.BaseStorageTreeElement.prototype.onattach):
+ (WebInspector.StorageCategoryTreeElement):
+ (WebInspector.StorageCategoryTreeElement.prototype.onselect):
+ (WebInspector.DatabaseTreeElement):
+ (WebInspector.DatabaseTreeElement.prototype.onselect):
+ (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
+ (WebInspector.DatabaseTreeElement.prototype.onpopulate):
+ (WebInspector.DatabaseTableTreeElement):
+ (WebInspector.DatabaseTableTreeElement.prototype.onselect):
+ (WebInspector.DOMStorageTreeElement):
+ (WebInspector.DOMStorageTreeElement.prototype.onselect):
+ (WebInspector.CookieTreeElement):
+ (WebInspector.CookieTreeElement.prototype.onselect):
+ (WebInspector.ApplicationCacheTreeElement):
+ (WebInspector.ApplicationCacheTreeElement.prototype.onselect):
+ (WebInspector.StorageCategoryView):
+ (WebInspector.StorageCategoryView.prototype.setText):
+ * inspector/front-end/inspector.css:
+ (.properties-tree ol):
+ (.properties-tree ol.expanded):
+ (.database-storage-tree-item .icon):
+ (.database-table-storage-tree-item .icon):
+ (.domstorage-storage-tree-item.local-storage .icon):
+ (.domstorage-storage-tree-item.session-storage .icon):
+ (.cookie-storage-tree-item .icon):
+ (.application-cache-storage-tree-item .icon):
+ (.storage.panel .sidebar):
+ (.storage.panel .outline-disclosure > ol):
+ (.storage.panel .outline-disclosure li):
+ (.storage.panel .outline-disclosure li .selection):
+ (.storage.panel .sidebar-resizer-vertical):
+ (.storage-base-tree-element-title):
+ (.storage.panel .outline-disclosure ol):
+ (.storage.panel .outline-disclosure li.selected):
+ (.storage.panel .outline-disclosure .icon):
+ (.storage-empty-view, .storage-view.table .storage-table-error):
+
2010-10-21 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index 8f3a228..fc8fd2e 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/inspector/front-end/ApplicationCacheItemsView.js b/WebCore/inspector/front-end/ApplicationCacheItemsView.js
index f450938..f5147e3 100644
--- a/WebCore/inspector/front-end/ApplicationCacheItemsView.js
+++ b/WebCore/inspector/front-end/ApplicationCacheItemsView.js
@@ -64,7 +64,7 @@ WebInspector.ApplicationCacheItemsView = function(treeElement, appcacheDomain)
this._appcacheDomain = appcacheDomain;
this._emptyMsgElement = document.createElement("div");
- this._emptyMsgElement.className = "storage-table-empty";
+ this._emptyMsgElement.className = "storage-empty-view";
this._emptyMsgElement.textContent = WebInspector.UIString("No Application Cache information available.");
this.element.appendChild(this._emptyMsgElement);
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 8cd5d52..c547c0d 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -678,7 +678,7 @@ WebInspector.ConsoleMessage.prototype = {
case WebInspector.ConsoleMessage.MessageType.Trace:
case WebInspector.ConsoleMessage.MessageType.UncaughtException:
var ol = document.createElement("ol");
- ol.addStyleClass("stack-trace");
+ ol.className = "outline-disclosure";
var treeOutline = new TreeOutline(ol);
var messageText;
if (this.type === WebInspector.ConsoleMessage.MessageType.Assert)
diff --git a/WebCore/inspector/front-end/CookieItemsView.js b/WebCore/inspector/front-end/CookieItemsView.js
index 88cbe05..0b05f2a 100644
--- a/WebCore/inspector/front-end/CookieItemsView.js
+++ b/WebCore/inspector/front-end/CookieItemsView.js
@@ -45,7 +45,7 @@ WebInspector.CookieItemsView = function(treeElement, cookieDomain)
this._cookieDomain = cookieDomain;
this._emptyMsgElement = document.createElement("div");
- this._emptyMsgElement.className = "storage-table-empty";
+ this._emptyMsgElement.className = "storage-empty-view";
this._emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
this.element.appendChild(this._emptyMsgElement);
}
diff --git a/WebCore/inspector/front-end/DatabaseTableView.js b/WebCore/inspector/front-end/DatabaseTableView.js
index 5440763..b234b9a 100644
--- a/WebCore/inspector/front-end/DatabaseTableView.js
+++ b/WebCore/inspector/front-end/DatabaseTableView.js
@@ -61,7 +61,7 @@ WebInspector.DatabaseTableView.prototype = {
var dataGrid = WebInspector.panels.storage.dataGridForResult(columnNames, values);
if (!dataGrid) {
var emptyMsgElement = document.createElement("div");
- emptyMsgElement.className = "storage-table-empty";
+ emptyMsgElement.className = "storage-empty-view";
emptyMsgElement.textContent = WebInspector.UIString("The “%s”\ntable is empty.", this.tableName);
this.element.appendChild(emptyMsgElement);
return;
diff --git a/WebCore/inspector/front-end/StoragePanel.js b/WebCore/inspector/front-end/StoragePanel.js
index e033b57..0bff136 100644
--- a/WebCore/inspector/front-end/StoragePanel.js
+++ b/WebCore/inspector/front-end/StoragePanel.js
@@ -32,28 +32,28 @@ WebInspector.StoragePanel = function(database)
WebInspector.Panel.call(this, "storage");
this.createSidebar();
+ this.sidebarElement.addStyleClass("outline-disclosure filter-all children small");
- this.databasesListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("DATABASES"), {}, true);
+ this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Databases"), "database-storage-tree-item");
this.sidebarTree.appendChild(this.databasesListTreeElement);
this.databasesListTreeElement.expand();
- this.localStorageListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("LOCAL STORAGE"), {}, true);
+ this.localStorageListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Local Storage"), "domstorage-storage-tree-item local-storage");
this.sidebarTree.appendChild(this.localStorageListTreeElement);
this.localStorageListTreeElement.expand();
- this.sessionStorageListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("SESSION STORAGE"), {}, true);
+ this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Session Storage"), "domstorage-storage-tree-item session-storage");
this.sidebarTree.appendChild(this.sessionStorageListTreeElement);
this.sessionStorageListTreeElement.expand();
- this.cookieListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("COOKIES"), {}, true);
+ this.cookieListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Cookies"), "cookie-storage-tree-item");
this.sidebarTree.appendChild(this.cookieListTreeElement);
this.cookieListTreeElement.expand();
-
- this.applicationCacheListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("APPLICATION CACHE"), {}, true);
+ this.applicationCacheListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Application Cache"), "application-cache-storage-tree-item");
this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
this.applicationCacheListTreeElement.expand();
-
+
this.storageViews = document.createElement("div");
this.storageViews.id = "storage-views";
this.element.appendChild(this.storageViews);
@@ -61,7 +61,9 @@ WebInspector.StoragePanel = function(database)
this.storageViewStatusBarItemsContainer = document.createElement("div");
this.storageViewStatusBarItemsContainer.className = "status-bar-items";
- this.reset();
+ this._databases = [];
+ this._domStorage = [];
+ this._cookieViews = {};
}
WebInspector.StoragePanel.prototype = {
@@ -77,27 +79,18 @@ WebInspector.StoragePanel.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;
- }
+ for (var i = 0; i < this._databases.length; ++i) {
+ var database = this._databases[i];
+ delete database._tableViews;
+ delete database._queryView;
}
-
this._databases = [];
- if (this._domStorage) {
- var domStorageLength = this._domStorage.length;
- for (var i = 0; i < domStorageLength; ++i) {
- var domStorage = this._domStorage[i];
-
- delete domStorage._domStorageView;
- }
+ var domStorageLength = this._domStorage.length;
+ for (var i = 0; i < this._domStorage.length; ++i) {
+ var domStorage = this._domStorage[i];
+ delete domStorage._domStorageView;
}
-
this._domStorage = [];
this._cookieViews = {};
@@ -109,7 +102,6 @@ WebInspector.StoragePanel.prototype = {
this.localStorageListTreeElement.removeChildren();
this.sessionStorageListTreeElement.removeChildren();
this.cookieListTreeElement.removeChildren();
-
this.applicationCacheListTreeElement.removeChildren();
this.storageViews.removeChildren();
@@ -124,21 +116,21 @@ WebInspector.StoragePanel.prototype = {
{
this._databases.push(database);
- var databaseTreeElement = new WebInspector.DatabaseSidebarTreeElement(database);
+ var databaseTreeElement = new WebInspector.DatabaseTreeElement(this, database);
database._databasesTreeElement = databaseTreeElement;
this.databasesListTreeElement.appendChild(databaseTreeElement);
},
addCookieDomain: function(domain)
{
- var cookieDomainTreeElement = new WebInspector.CookieSidebarTreeElement(domain);
+ var cookieDomainTreeElement = new WebInspector.CookieTreeElement(this, domain);
this.cookieListTreeElement.appendChild(cookieDomainTreeElement);
},
addDOMStorage: function(domStorage)
{
this._domStorage.push(domStorage);
- var domStorageTreeElement = new WebInspector.DOMStorageSidebarTreeElement(domStorage, (domStorage.isLocalStorage ? "local-storage" : "session-storage"));
+ var domStorageTreeElement = new WebInspector.DOMStorageTreeElement(this, domStorage, (domStorage.isLocalStorage ? "local-storage" : "session-storage"));
domStorage._domStorageTreeElement = domStorageTreeElement;
if (domStorage.isLocalStorage)
this.localStorageListTreeElement.appendChild(domStorageTreeElement);
@@ -148,7 +140,7 @@ WebInspector.StoragePanel.prototype = {
addApplicationCache: function(domain)
{
- var applicationCacheTreeElement = new WebInspector.ApplicationCacheSidebarTreeElement(domain);
+ var applicationCacheTreeElement = new WebInspector.ApplicationCacheTreeElement(this, domain);
this.applicationCacheListTreeElement.appendChild(applicationCacheTreeElement);
},
@@ -179,9 +171,6 @@ WebInspector.StoragePanel.prototype = {
if (!database)
return;
- if (this.visibleView)
- this.visibleView.hide();
-
var view;
if (tableName) {
if (!("_tableViews" in database))
@@ -199,7 +188,7 @@ WebInspector.StoragePanel.prototype = {
}
}
- this._genericViewSetup(view);
+ this._innerShowView(view);
},
showDOMStorage: function(domStorage)
@@ -207,9 +196,6 @@ WebInspector.StoragePanel.prototype = {
if (!domStorage)
return;
- if (this.visibleView)
- this.visibleView.hide();
-
var view;
view = domStorage._domStorageView;
if (!view) {
@@ -217,42 +203,47 @@ WebInspector.StoragePanel.prototype = {
domStorage._domStorageView = view;
}
- this._genericViewSetup(view);
+ this._innerShowView(view);
},
showCookies: function(treeElement, cookieDomain)
{
- if (this.visibleView)
- this.visibleView.hide();
-
var view = this._cookieViews[cookieDomain];
if (!view) {
view = new WebInspector.CookieItemsView(treeElement, cookieDomain);
this._cookieViews[cookieDomain] = view;
}
- this._genericViewSetup(view);
+ this._innerShowView(view);
},
showApplicationCache: function(treeElement, appcacheDomain)
{
- if (this.visibleView)
- this.visibleView.hide();
-
var view = this._applicationCacheView;
if (!view) {
view = new WebInspector.ApplicationCacheItemsView(treeElement, appcacheDomain);
this._applicationCacheView = view;
}
- this._genericViewSetup(view);
+ this._innerShowView(view);
if ("_cachedApplicationCacheViewStatus" in this)
this._applicationCacheView.updateStatus(this._cachedApplicationCacheViewStatus);
},
- _genericViewSetup: function(view)
+ showCategoryView: function(categoryName)
+ {
+ if (!this._categoryView)
+ this._categoryView = new WebInspector.StorageCategoryView();
+ this._categoryView.setText(categoryName);
+ this._innerShowView(this._categoryView);
+ },
+
+ _innerShowView: function(view)
{
+ if (this.visibleView)
+ this.visibleView.hide();
+
view.show(this.storageViews);
this.visibleView = view;
@@ -423,19 +414,61 @@ WebInspector.StoragePanel.prototype = {
WebInspector.StoragePanel.prototype.__proto__ = WebInspector.Panel.prototype;
-WebInspector.DatabaseSidebarTreeElement = function(database)
+WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClass, hasChildren)
+{
+ TreeElement.call(this, "", null, hasChildren);
+ this._storagePanel = storagePanel;
+ this._titleText = title;
+ this._iconClass = iconClass;
+}
+
+WebInspector.BaseStorageTreeElement.prototype = {
+ onattach: function()
+ {
+ this.listItemElement.removeChildren();
+ this.listItemElement.addStyleClass(this._iconClass);
+
+ var imageElement = document.createElement("img");
+ imageElement.className = "icon";
+ this.listItemElement.appendChild(imageElement);
+
+ var titleElement = document.createElement("span");
+ titleElement.textContent = this._titleText;
+ titleElement.className = "storage-base-tree-element-title";
+ this.listItemElement.appendChild(titleElement);
+
+ var selectionElement = document.createElement("div");
+ selectionElement.className = "selection";
+ this.listItemElement.appendChild(selectionElement);
+ }
+}
+
+WebInspector.BaseStorageTreeElement.prototype.__proto__ = TreeElement.prototype;
+
+WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, iconClass)
{
- this.database = database;
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, categoryName, iconClass, true);
+ this._categoryName = categoryName;
+}
- WebInspector.SidebarTreeElement.call(this, "database-sidebar-tree-item", "", "", database, true);
+WebInspector.StorageCategoryTreeElement.prototype = {
+ onselect: function()
+ {
+ this._storagePanel.showCategoryView(this._categoryName);
+ }
+}
+WebInspector.StorageCategoryTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
- this.refreshTitles();
+WebInspector.DatabaseTreeElement = function(storagePanel, database)
+{
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, database.name, "database-storage-tree-item", true);
+ this._database = database;
}
-WebInspector.DatabaseSidebarTreeElement.prototype = {
+WebInspector.DatabaseTreeElement.prototype = {
onselect: function()
{
- WebInspector.panels.storage.showDatabase(this.database);
+ this._storagePanel.showDatabase(this._database);
},
oncollapse: function()
@@ -449,170 +482,91 @@ WebInspector.DatabaseSidebarTreeElement.prototype = {
{
this.removeChildren();
- var self = this;
function tableNamesCallback(tableNames)
{
var tableNamesLength = tableNames.length;
for (var i = 0; i < tableNamesLength; ++i)
- self.appendChild(new WebInspector.SidebarDatabaseTableTreeElement(self.database, tableNames[i]));
+ this.appendChild(new WebInspector.DatabaseTableTreeElement(this._storagePanel, this._database, tableNames[i]));
}
- this.database.getTableNames(tableNamesCallback);
- },
-
- get mainTitle()
- {
- return this.database.name;
- },
-
- set mainTitle(x)
- {
- // Do nothing.
- },
-
- get subtitle()
- {
- return this.database.displayDomain;
- },
-
- set subtitle(x)
- {
- // Do nothing.
+ this._database.getTableNames(tableNamesCallback.bind(this));
}
-}
-WebInspector.DatabaseSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
+}
+WebInspector.DatabaseTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
-WebInspector.SidebarDatabaseTableTreeElement = function(database, tableName)
+WebInspector.DatabaseTableTreeElement = function(storagePanel, database, tableName)
{
- this.database = database;
- this.tableName = tableName;
-
- WebInspector.SidebarTreeElement.call(this, "database-table-sidebar-tree-item small", tableName, "", null, false);
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, tableName, "database-storage-tree-item");
+ this._database = database;
+ this._tableName = tableName;
}
-WebInspector.SidebarDatabaseTableTreeElement.prototype = {
+WebInspector.DatabaseTableTreeElement.prototype = {
onselect: function()
{
- WebInspector.panels.storage.showDatabase(this.database, this.tableName);
+ this._storagePanel.showDatabase(this._database, this._tableName);
}
}
+WebInspector.DatabaseTableTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
-WebInspector.SidebarDatabaseTableTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
-
-WebInspector.DOMStorageSidebarTreeElement = function(domStorage, className)
+WebInspector.DOMStorageTreeElement = function(storagePanel, domStorage, className)
{
-
- this.domStorage = domStorage;
-
- WebInspector.SidebarTreeElement.call(this, "domstorage-sidebar-tree-item " + className, domStorage, "", null, false);
-
- this.refreshTitles();
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, domStorage.domain ? domStorage.domain : WebInspector.UIString("Local Files"), "domstorage-storage-tree-item " + className);
+ this._domStorage = domStorage;
}
-WebInspector.DOMStorageSidebarTreeElement.prototype = {
+WebInspector.DOMStorageTreeElement.prototype = {
onselect: function()
{
- WebInspector.panels.storage.showDOMStorage(this.domStorage);
- },
-
- get mainTitle()
- {
- return this.domStorage.domain ? this.domStorage.domain : WebInspector.UIString("Local Files");
- },
-
- set mainTitle(x)
- {
- // Do nothing.
- },
-
- get subtitle()
- {
- return ""; //this.database.displayDomain;
- },
-
- set subtitle(x)
- {
- // Do nothing.
+ this._storagePanel.showDOMStorage(this._domStorage);
}
}
+WebInspector.DOMStorageTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
-WebInspector.DOMStorageSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
-
-WebInspector.CookieSidebarTreeElement = function(cookieDomain)
+WebInspector.CookieTreeElement = function(storagePanel, cookieDomain)
{
- WebInspector.SidebarTreeElement.call(this, "cookie-sidebar-tree-item", cookieDomain, "", null, false);
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, cookieDomain ? cookieDomain : WebInspector.UIString("Local Files"), "cookie-storage-tree-item");
this._cookieDomain = cookieDomain;
- this._subtitle = "";
-
- this.refreshTitles();
}
-WebInspector.CookieSidebarTreeElement.prototype = {
+WebInspector.CookieTreeElement.prototype = {
onselect: function()
{
- WebInspector.panels.storage.showCookies(this, this._cookieDomain);
- },
-
- get mainTitle()
- {
- return this._cookieDomain ? this._cookieDomain : WebInspector.UIString("Local Files");
- },
-
- set mainTitle(x)
- {
- // Do nothing.
- },
-
- get subtitle()
- {
- return this._subtitle;
- },
-
- set subtitle(x)
- {
- this._subtitle = x;
- this.refreshTitles();
+ this._storagePanel.showCookies(this, this._cookieDomain);
}
}
+WebInspector.CookieTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
-WebInspector.CookieSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
-
-WebInspector.ApplicationCacheSidebarTreeElement = function(appcacheDomain)
+WebInspector.ApplicationCacheTreeElement = function(storagePanel, appcacheDomain)
{
- WebInspector.SidebarTreeElement.call(this, "application-cache-sidebar-tree-item", appcacheDomain, "", null, false);
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, appcacheDomain ? appcacheDomain : WebInspector.UIString("Local Files"), "application-cache-storage-tree-item");
this._appcacheDomain = appcacheDomain;
- this._subtitle = "";
- this._mainTitle = this._appcacheDomain;
- this.refreshTitles();
}
-WebInspector.ApplicationCacheSidebarTreeElement.prototype = {
+WebInspector.ApplicationCacheTreeElement.prototype = {
onselect: function()
{
- WebInspector.panels.storage.showApplicationCache(this, this._appcacheDomain);
- },
+ this._storagePanel.showApplicationCache(this, this._appcacheDomain);
+ }
+}
+WebInspector.ApplicationCacheTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
- get mainTitle()
- {
- return this._mainTitle;
- },
+WebInspector.StorageCategoryView = function()
+{
+ WebInspector.View.call(this);
- set mainTitle(x)
- {
- this._mainTitle = x;
- this.refreshTitles();
- },
+ this.element.addStyleClass("storage-view");
- get subtitle()
- {
- return this._subtitle;
- },
+ this._emptyMsgElement = document.createElement("div");
+ this._emptyMsgElement.className = "storage-empty-view";
+ this.element.appendChild(this._emptyMsgElement);
+}
- set subtitle(x)
+WebInspector.StorageCategoryView.prototype = {
+ setText: function(text)
{
- this._subtitle = x;
- this.refreshTitles();
+ this._emptyMsgElement.textContent = text;
}
}
-WebInspector.ApplicationCacheSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
+WebInspector.StorageCategoryView.prototype.__proto__ = WebInspector.View.prototype;
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 0662954..7012eb6 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -715,11 +715,6 @@ body.platform-linux .monospace, body.platform-linux .source-code {
content: url(Images/treeDownTriangleBlack.png);
}
-.console-message.repeated-message > ol.stack-trace {
- margin-top: -14px;
- margin-left: 18px;
-}
-
.console-group-messages .section .header .title {
color: black;
font-weight: normal;
@@ -1190,7 +1185,6 @@ body.platform-linux .monospace, body.platform-linux .source-code {
margin-left: -12px;
}
-.stack-trace li.parent::before,
.outline-disclosure li.parent::before {
content: url(Images/treeRightTriangleBlack.png);
float: left;
@@ -1200,32 +1194,26 @@ body.platform-linux .monospace, body.platform-linux .source-code {
padding-right: 2px;
}
-.stack-trace li.parent::before,
.outline-disclosure li.parent::before {
content: url(Images/treeRightTriangleBlack.png);
}
-.stack-trace ol:focus li.parent.selected::before,
.outline-disclosure ol:focus li.parent.selected::before {
content: url(Images/treeRightTriangleWhite.png);
}
-.stack-trace li.parent.expanded::before,
.outline-disclosure li.parent.expanded::before {
content: url(Images/treeDownTriangleBlack.png);
}
-.stack-trace ol:focus li.parent.expanded.selected::before,
.outline-disclosure ol:focus li.parent.expanded.selected::before {
content: url(Images/treeDownTriangleWhite.png);
}
-.stack-trace ol.children,
.outline-disclosure ol.children {
display: none;
}
-.stack-trace ol.children.expanded,
.outline-disclosure ol.children.expanded {
display: block;
}
@@ -1430,21 +1418,17 @@ body.inactive .placard.selected {
padding-bottom: 3px;
}
-.properties-tree ol, .stack-trace ol, ol.stack-trace {
+.properties-tree ol {
display: none;
margin: 0;
-webkit-padding-start: 12px;
list-style: none;
}
-.properties-tree ol.expanded, .stack-trace ol, ol.stack-trace {
+.properties-tree ol.expanded {
display: block;
}
-ol.stack-trace {
- -webkit-padding-start: 0px;
-}
-
.event-listener-breakpoints .event-category {
font-size: 12px;
font-weight: bold;
@@ -1897,27 +1881,27 @@ body.inactive .sidebar {
background-color: rgb(232, 232, 232);
}
-.database-sidebar-tree-item .icon {
+.database-storage-tree-item .icon {
content: url(Images/database.png);
}
-.database-table-sidebar-tree-item .icon {
+.database-table-storage-tree-item .icon {
content: url(Images/databaseTable.png);
}
-.domstorage-sidebar-tree-item.local-storage .icon {
+.domstorage-storage-tree-item.local-storage .icon {
content: url(Images/localStorage.png);
}
-.domstorage-sidebar-tree-item.session-storage .icon {
+.domstorage-storage-tree-item.session-storage .icon {
content: url(Images/sessionStorage.png);
}
-.cookie-sidebar-tree-item .icon {
+.cookie-storage-tree-item .icon {
content: url(Images/cookie.png);
}
-.application-cache-sidebar-tree-item .icon {
+.application-cache-storage-tree-item .icon {
content: url(Images/applicationCache.png);
}
@@ -1929,6 +1913,54 @@ body.inactive .sidebar {
bottom: 0;
}
+.storage.panel .sidebar {
+ border-left: rgb(232, 232, 232);
+ background-color: transparent;
+ overflow-x: auto;
+}
+
+.storage.panel .outline-disclosure > ol {
+ margin-left: -12px;
+ padding-right: 0px !important;
+}
+
+.storage.panel .outline-disclosure li {
+ white-space: nowrap;
+}
+
+.storage.panel .outline-disclosure li .selection {
+ height: 17px;
+ margin-left: -100px;
+ display: inline-block;
+}
+
+.storage.panel .sidebar-resizer-vertical {
+ background: rgb(220, 220, 220);
+ border-left: 1px solid gray;
+ border-right: 1px solid gray;
+}
+
+.storage-base-tree-element-title {
+ position: relative;
+ bottom: 4px;
+ left: 3px;
+}
+
+.storage.panel .outline-disclosure ol {
+ -webkit-padding-start: 14px;
+}
+
+.storage.panel .outline-disclosure li.selected {
+ color: white;
+ background-color: transparent;
+}
+
+.storage.panel .outline-disclosure .icon {
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+}
+
.storage-view {
display: none;
overflow: hidden;
@@ -1952,7 +1984,7 @@ body.inactive .sidebar {
height: 100%;
}
-.storage-view.table .storage-table-empty, .storage-view.table .storage-table-error {
+.storage-empty-view, .storage-view.table .storage-table-error {
position: absolute;
top: 0;
bottom: 25%;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list