Changeset 70214 in webkit


Ignore:
Timestamp:
Oct 21, 2010 1:44:32 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-10-20 Pavel Feldman <pfeldman@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):
Location:
trunk/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70211 r70214  
     12010-10-20  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Convert sidebar into the browsing tree in the Storage panel.
     6        https://bugs.webkit.org/show_bug.cgi?id=47988
     7
     8        * English.lproj/localizedStrings.js:
     9        * inspector/front-end/ApplicationCacheItemsView.js:
     10        (WebInspector.ApplicationCacheItemsView):
     11        * inspector/front-end/ConsoleView.js:
     12        (WebInspector.ConsoleMessage.prototype._formatMessage):
     13        * inspector/front-end/CookieItemsView.js:
     14        (WebInspector.CookieItemsView):
     15        * inspector/front-end/DatabaseTableView.js:
     16        (WebInspector.DatabaseTableView.prototype._queryFinished):
     17        * inspector/front-end/StoragePanel.js:
     18        (WebInspector.StoragePanel):
     19        (WebInspector.StoragePanel.prototype.reset):
     20        (WebInspector.StoragePanel.prototype.addDatabase):
     21        (WebInspector.StoragePanel.prototype.addCookieDomain):
     22        (WebInspector.StoragePanel.prototype.addDOMStorage):
     23        (WebInspector.StoragePanel.prototype.addApplicationCache):
     24        (WebInspector.StoragePanel.prototype.showDatabase):
     25        (WebInspector.StoragePanel.prototype.showDOMStorage):
     26        (WebInspector.StoragePanel.prototype.showCookies):
     27        (WebInspector.StoragePanel.prototype.showApplicationCache):
     28        (WebInspector.StoragePanel.prototype.showCategoryView):
     29        (WebInspector.StoragePanel.prototype._innerShowView):
     30        (WebInspector.BaseStorageTreeElement):
     31        (WebInspector.BaseStorageTreeElement.prototype.onattach):
     32        (WebInspector.StorageCategoryTreeElement):
     33        (WebInspector.StorageCategoryTreeElement.prototype.onselect):
     34        (WebInspector.DatabaseTreeElement):
     35        (WebInspector.DatabaseTreeElement.prototype.onselect):
     36        (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
     37        (WebInspector.DatabaseTreeElement.prototype.onpopulate):
     38        (WebInspector.DatabaseTableTreeElement):
     39        (WebInspector.DatabaseTableTreeElement.prototype.onselect):
     40        (WebInspector.DOMStorageTreeElement):
     41        (WebInspector.DOMStorageTreeElement.prototype.onselect):
     42        (WebInspector.CookieTreeElement):
     43        (WebInspector.CookieTreeElement.prototype.onselect):
     44        (WebInspector.ApplicationCacheTreeElement):
     45        (WebInspector.ApplicationCacheTreeElement.prototype.onselect):
     46        (WebInspector.StorageCategoryView):
     47        (WebInspector.StorageCategoryView.prototype.setText):
     48        * inspector/front-end/inspector.css:
     49        (.properties-tree ol):
     50        (.properties-tree ol.expanded):
     51        (.database-storage-tree-item .icon):
     52        (.database-table-storage-tree-item .icon):
     53        (.domstorage-storage-tree-item.local-storage .icon):
     54        (.domstorage-storage-tree-item.session-storage .icon):
     55        (.cookie-storage-tree-item .icon):
     56        (.application-cache-storage-tree-item .icon):
     57        (.storage.panel .sidebar):
     58        (.storage.panel .outline-disclosure > ol):
     59        (.storage.panel .outline-disclosure li):
     60        (.storage.panel .outline-disclosure li .selection):
     61        (.storage.panel .sidebar-resizer-vertical):
     62        (.storage-base-tree-element-title):
     63        (.storage.panel .outline-disclosure ol):
     64        (.storage.panel .outline-disclosure li.selected):
     65        (.storage.panel .outline-disclosure .icon):
     66        (.storage-empty-view, .storage-view.table .storage-table-error):
     67
    1682010-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
    269
  • trunk/WebCore/inspector/front-end/ApplicationCacheItemsView.js

    r64844 r70214  
    6565
    6666    this._emptyMsgElement = document.createElement("div");
    67     this._emptyMsgElement.className = "storage-table-empty";
     67    this._emptyMsgElement.className = "storage-empty-view";
    6868    this._emptyMsgElement.textContent = WebInspector.UIString("No Application Cache information available.");
    6969    this.element.appendChild(this._emptyMsgElement);
  • trunk/WebCore/inspector/front-end/ConsoleView.js

    r70046 r70214  
    679679            case WebInspector.ConsoleMessage.MessageType.UncaughtException:
    680680                var ol = document.createElement("ol");
    681                 ol.addStyleClass("stack-trace");
     681                ol.className = "outline-disclosure";
    682682                var treeOutline = new TreeOutline(ol);
    683683                var messageText;
  • trunk/WebCore/inspector/front-end/CookieItemsView.js

    r69947 r70214  
    4646
    4747    this._emptyMsgElement = document.createElement("div");
    48     this._emptyMsgElement.className = "storage-table-empty";
     48    this._emptyMsgElement.className = "storage-empty-view";
    4949    this._emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
    5050    this.element.appendChild(this._emptyMsgElement);
  • trunk/WebCore/inspector/front-end/DatabaseTableView.js

    r65149 r70214  
    6262        if (!dataGrid) {
    6363            var emptyMsgElement = document.createElement("div");
    64             emptyMsgElement.className = "storage-table-empty";
     64            emptyMsgElement.className = "storage-empty-view";
    6565            emptyMsgElement.textContent = WebInspector.UIString("The “%s”\ntable is empty.", this.tableName);
    6666            this.element.appendChild(emptyMsgElement);
  • trunk/WebCore/inspector/front-end/StoragePanel.js

    r68778 r70214  
    3333
    3434    this.createSidebar();
    35 
    36     this.databasesListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("DATABASES"), {}, true);
     35    this.sidebarElement.addStyleClass("outline-disclosure filter-all children small");
     36
     37    this.databasesListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Databases"), "database-storage-tree-item");
    3738    this.sidebarTree.appendChild(this.databasesListTreeElement);
    3839    this.databasesListTreeElement.expand();
    3940
    40     this.localStorageListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("LOCAL STORAGE"), {}, true);
     41    this.localStorageListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Local Storage"), "domstorage-storage-tree-item local-storage");
    4142    this.sidebarTree.appendChild(this.localStorageListTreeElement);
    4243    this.localStorageListTreeElement.expand();
    4344
    44     this.sessionStorageListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("SESSION STORAGE"), {}, true);
     45    this.sessionStorageListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Session Storage"), "domstorage-storage-tree-item session-storage");
    4546    this.sidebarTree.appendChild(this.sessionStorageListTreeElement);
    4647    this.sessionStorageListTreeElement.expand();
    4748
    48     this.cookieListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("COOKIES"), {}, true);
     49    this.cookieListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Cookies"), "cookie-storage-tree-item");
    4950    this.sidebarTree.appendChild(this.cookieListTreeElement);
    5051    this.cookieListTreeElement.expand();
    51 
    5252   
    53     this.applicationCacheListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("APPLICATION CACHE"), {}, true);
     53    this.applicationCacheListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Application Cache"), "application-cache-storage-tree-item");
    5454    this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
    5555    this.applicationCacheListTreeElement.expand();
    56    
     56
    5757    this.storageViews = document.createElement("div");
    5858    this.storageViews.id = "storage-views";
     
    6262    this.storageViewStatusBarItemsContainer.className = "status-bar-items";
    6363
    64     this.reset();
     64    this._databases = [];
     65    this._domStorage = [];
     66    this._cookieViews = {};
    6567}
    6668
     
    7880    reset: function()
    7981    {
    80         if (this._databases) {
    81             var databasesLength = this._databases.length;
    82             for (var i = 0; i < databasesLength; ++i) {
    83                 var database = this._databases[i];
    84 
    85                 delete database._tableViews;
    86                 delete database._queryView;
    87             }
    88         }
    89 
     82        for (var i = 0; i < this._databases.length; ++i) {
     83            var database = this._databases[i];
     84            delete database._tableViews;
     85            delete database._queryView;
     86        }
    9087        this._databases = [];
    9188
    92         if (this._domStorage) {
    93             var domStorageLength = this._domStorage.length;
    94             for (var i = 0; i < domStorageLength; ++i) {
    95                 var domStorage = this._domStorage[i];
    96 
    97                 delete domStorage._domStorageView;
    98             }
    99         }
    100 
     89        var domStorageLength = this._domStorage.length;
     90        for (var i = 0; i < this._domStorage.length; ++i) {
     91            var domStorage = this._domStorage[i];
     92            delete domStorage._domStorageView;
     93        }
    10194        this._domStorage = [];
    10295
     
    110103        this.sessionStorageListTreeElement.removeChildren();
    111104        this.cookieListTreeElement.removeChildren();
    112 
    113105        this.applicationCacheListTreeElement.removeChildren();
    114106
     
    125117        this._databases.push(database);
    126118
    127         var databaseTreeElement = new WebInspector.DatabaseSidebarTreeElement(database);
     119        var databaseTreeElement = new WebInspector.DatabaseTreeElement(this, database);
    128120        database._databasesTreeElement = databaseTreeElement;
    129121        this.databasesListTreeElement.appendChild(databaseTreeElement);
     
    132124    addCookieDomain: function(domain)
    133125    {
    134         var cookieDomainTreeElement = new WebInspector.CookieSidebarTreeElement(domain);
     126        var cookieDomainTreeElement = new WebInspector.CookieTreeElement(this, domain);
    135127        this.cookieListTreeElement.appendChild(cookieDomainTreeElement);
    136128    },
     
    139131    {
    140132        this._domStorage.push(domStorage);
    141         var domStorageTreeElement = new WebInspector.DOMStorageSidebarTreeElement(domStorage, (domStorage.isLocalStorage ? "local-storage" : "session-storage"));
     133        var domStorageTreeElement = new WebInspector.DOMStorageTreeElement(this, domStorage, (domStorage.isLocalStorage ? "local-storage" : "session-storage"));
    142134        domStorage._domStorageTreeElement = domStorageTreeElement;
    143135        if (domStorage.isLocalStorage)
     
    149141    addApplicationCache: function(domain)
    150142    {
    151         var applicationCacheTreeElement = new WebInspector.ApplicationCacheSidebarTreeElement(domain);
     143        var applicationCacheTreeElement = new WebInspector.ApplicationCacheTreeElement(this, domain);
    152144        this.applicationCacheListTreeElement.appendChild(applicationCacheTreeElement);
    153145    },
     
    179171        if (!database)
    180172            return;
    181 
    182         if (this.visibleView)
    183             this.visibleView.hide();
    184173
    185174        var view;
     
    200189        }
    201190
    202         this._genericViewSetup(view);
     191        this._innerShowView(view);
    203192    },
    204193
     
    207196        if (!domStorage)
    208197            return;
    209 
    210         if (this.visibleView)
    211             this.visibleView.hide();
    212198
    213199        var view;
     
    218204        }
    219205
    220         this._genericViewSetup(view);
     206        this._innerShowView(view);
    221207    },
    222208
    223209    showCookies: function(treeElement, cookieDomain)
    224210    {
    225         if (this.visibleView)
    226             this.visibleView.hide();
    227 
    228211        var view = this._cookieViews[cookieDomain];
    229212        if (!view) {
     
    232215        }
    233216
    234         this._genericViewSetup(view);
     217        this._innerShowView(view);
    235218    },
    236219
    237220    showApplicationCache: function(treeElement, appcacheDomain)
    238221    {
    239         if (this.visibleView)
    240             this.visibleView.hide();
    241 
    242222        var view = this._applicationCacheView;
    243223        if (!view) {
     
    246226        }
    247227
    248         this._genericViewSetup(view);
     228        this._innerShowView(view);
    249229
    250230        if ("_cachedApplicationCacheViewStatus" in this)
     
    252232    },
    253233
    254     _genericViewSetup: function(view)
    255     {
     234    showCategoryView: function(categoryName)
     235    {
     236        if (!this._categoryView)
     237            this._categoryView = new WebInspector.StorageCategoryView();
     238        this._categoryView.setText(categoryName);
     239        this._innerShowView(this._categoryView);
     240    },
     241
     242    _innerShowView: function(view)
     243    {
     244        if (this.visibleView)
     245            this.visibleView.hide();
     246
    256247        view.show(this.storageViews);
    257248        this.visibleView = view;
     
    424415WebInspector.StoragePanel.prototype.__proto__ = WebInspector.Panel.prototype;
    425416
    426 WebInspector.DatabaseSidebarTreeElement = function(database)
    427 {
    428     this.database = database;
    429 
    430     WebInspector.SidebarTreeElement.call(this, "database-sidebar-tree-item", "", "", database, true);
    431 
    432     this.refreshTitles();
    433 }
    434 
    435 WebInspector.DatabaseSidebarTreeElement.prototype = {
     417WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClass, hasChildren)
     418{
     419    TreeElement.call(this, "", null, hasChildren);
     420    this._storagePanel = storagePanel;
     421    this._titleText = title;
     422    this._iconClass = iconClass;
     423}
     424
     425WebInspector.BaseStorageTreeElement.prototype = {
     426    onattach: function()
     427    {
     428        this.listItemElement.removeChildren();
     429        this.listItemElement.addStyleClass(this._iconClass);
     430
     431        var imageElement = document.createElement("img");
     432        imageElement.className = "icon";
     433        this.listItemElement.appendChild(imageElement);
     434
     435        var titleElement = document.createElement("span");
     436        titleElement.textContent = this._titleText;
     437        titleElement.className = "storage-base-tree-element-title";
     438        this.listItemElement.appendChild(titleElement);
     439
     440        var selectionElement = document.createElement("div");
     441        selectionElement.className = "selection";
     442        this.listItemElement.appendChild(selectionElement);
     443    }
     444}
     445
     446WebInspector.BaseStorageTreeElement.prototype.__proto__ = TreeElement.prototype;
     447
     448WebInspector.StorageCategoryTreeElement = function(storagePanel, categoryName, iconClass)
     449{
     450    WebInspector.BaseStorageTreeElement.call(this, storagePanel, categoryName, iconClass, true);
     451    this._categoryName = categoryName;
     452}
     453
     454WebInspector.StorageCategoryTreeElement.prototype = {
    436455    onselect: function()
    437456    {
    438         WebInspector.panels.storage.showDatabase(this.database);
     457        this._storagePanel.showCategoryView(this._categoryName);
     458    }
     459}
     460WebInspector.StorageCategoryTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     461
     462WebInspector.DatabaseTreeElement = function(storagePanel, database)
     463{
     464    WebInspector.BaseStorageTreeElement.call(this, storagePanel, database.name, "database-storage-tree-item", true);
     465    this._database = database;
     466}
     467
     468WebInspector.DatabaseTreeElement.prototype = {
     469    onselect: function()
     470    {
     471        this._storagePanel.showDatabase(this._database);
    439472    },
    440473
     
    450483        this.removeChildren();
    451484
    452         var self = this;
    453485        function tableNamesCallback(tableNames)
    454486        {
    455487            var tableNamesLength = tableNames.length;
    456488            for (var i = 0; i < tableNamesLength; ++i)
    457                 self.appendChild(new WebInspector.SidebarDatabaseTableTreeElement(self.database, tableNames[i]));
    458         }
    459         this.database.getTableNames(tableNamesCallback);
    460     },
    461 
    462     get mainTitle()
    463     {
    464         return this.database.name;
    465     },
    466 
    467     set mainTitle(x)
    468     {
    469         // Do nothing.
    470     },
    471 
    472     get subtitle()
    473     {
    474         return this.database.displayDomain;
    475     },
    476 
    477     set subtitle(x)
    478     {
    479         // Do nothing.
    480     }
    481 }
    482 
    483 WebInspector.DatabaseSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
    484 
    485 WebInspector.SidebarDatabaseTableTreeElement = function(database, tableName)
    486 {
    487     this.database = database;
    488     this.tableName = tableName;
    489 
    490     WebInspector.SidebarTreeElement.call(this, "database-table-sidebar-tree-item small", tableName, "", null, false);
    491 }
    492 
    493 WebInspector.SidebarDatabaseTableTreeElement.prototype = {
     489                this.appendChild(new WebInspector.DatabaseTableTreeElement(this._storagePanel, this._database, tableNames[i]));
     490        }
     491        this._database.getTableNames(tableNamesCallback.bind(this));
     492    }
     493
     494}
     495WebInspector.DatabaseTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     496
     497WebInspector.DatabaseTableTreeElement = function(storagePanel, database, tableName)
     498{
     499    WebInspector.BaseStorageTreeElement.call(this, storagePanel, tableName, "database-storage-tree-item");
     500    this._database = database;
     501    this._tableName = tableName;
     502}
     503
     504WebInspector.DatabaseTableTreeElement.prototype = {
    494505    onselect: function()
    495506    {
    496         WebInspector.panels.storage.showDatabase(this.database, this.tableName);
    497     }
    498 }
    499 
    500 WebInspector.SidebarDatabaseTableTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
    501 
    502 WebInspector.DOMStorageSidebarTreeElement = function(domStorage, className)
    503 {
    504 
    505     this.domStorage = domStorage;
    506 
    507     WebInspector.SidebarTreeElement.call(this, "domstorage-sidebar-tree-item " + className, domStorage, "", null, false);
    508 
    509     this.refreshTitles();
    510 }
    511 
    512 WebInspector.DOMStorageSidebarTreeElement.prototype = {
     507        this._storagePanel.showDatabase(this._database, this._tableName);
     508    }
     509}
     510WebInspector.DatabaseTableTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     511
     512WebInspector.DOMStorageTreeElement = function(storagePanel, domStorage, className)
     513{
     514    WebInspector.BaseStorageTreeElement.call(this, storagePanel, domStorage.domain ? domStorage.domain : WebInspector.UIString("Local Files"), "domstorage-storage-tree-item " + className);
     515    this._domStorage = domStorage;
     516}
     517
     518WebInspector.DOMStorageTreeElement.prototype = {
    513519    onselect: function()
    514520    {
    515         WebInspector.panels.storage.showDOMStorage(this.domStorage);
    516     },
    517 
    518     get mainTitle()
    519     {
    520         return this.domStorage.domain ? this.domStorage.domain : WebInspector.UIString("Local Files");
    521     },
    522 
    523     set mainTitle(x)
    524     {
    525         // Do nothing.
    526     },
    527 
    528     get subtitle()
    529     {
    530         return ""; //this.database.displayDomain;
    531     },
    532 
    533     set subtitle(x)
    534     {
    535         // Do nothing.
    536     }
    537 }
    538 
    539 WebInspector.DOMStorageSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
    540 
    541 WebInspector.CookieSidebarTreeElement = function(cookieDomain)
    542 {
    543     WebInspector.SidebarTreeElement.call(this, "cookie-sidebar-tree-item", cookieDomain, "", null, false);
     521        this._storagePanel.showDOMStorage(this._domStorage);
     522    }
     523}
     524WebInspector.DOMStorageTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     525
     526WebInspector.CookieTreeElement = function(storagePanel, cookieDomain)
     527{
     528    WebInspector.BaseStorageTreeElement.call(this, storagePanel, cookieDomain ? cookieDomain : WebInspector.UIString("Local Files"), "cookie-storage-tree-item");
    544529    this._cookieDomain = cookieDomain;
    545     this._subtitle = "";
    546 
    547     this.refreshTitles();
    548 }
    549 
    550 WebInspector.CookieSidebarTreeElement.prototype = {
     530}
     531
     532WebInspector.CookieTreeElement.prototype = {
    551533    onselect: function()
    552534    {
    553         WebInspector.panels.storage.showCookies(this, this._cookieDomain);
    554     },
    555 
    556     get mainTitle()
    557     {
    558         return this._cookieDomain ? this._cookieDomain : WebInspector.UIString("Local Files");
    559     },
    560 
    561     set mainTitle(x)
    562     {
    563         // Do nothing.
    564     },
    565 
    566     get subtitle()
    567     {
    568         return this._subtitle;
    569     },
    570 
    571     set subtitle(x)
    572     {
    573         this._subtitle = x;
    574         this.refreshTitles();
    575     }
    576 }
    577 
    578 WebInspector.CookieSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
    579 
    580 WebInspector.ApplicationCacheSidebarTreeElement = function(appcacheDomain)
    581 {
    582     WebInspector.SidebarTreeElement.call(this, "application-cache-sidebar-tree-item", appcacheDomain, "", null, false);
     535        this._storagePanel.showCookies(this, this._cookieDomain);
     536    }
     537}
     538WebInspector.CookieTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     539
     540WebInspector.ApplicationCacheTreeElement = function(storagePanel, appcacheDomain)
     541{
     542    WebInspector.BaseStorageTreeElement.call(this, storagePanel, appcacheDomain ? appcacheDomain : WebInspector.UIString("Local Files"), "application-cache-storage-tree-item");
    583543    this._appcacheDomain = appcacheDomain;
    584     this._subtitle = "";
    585     this._mainTitle = this._appcacheDomain;
    586     this.refreshTitles();
    587 }
    588 
    589 WebInspector.ApplicationCacheSidebarTreeElement.prototype = {
     544}
     545
     546WebInspector.ApplicationCacheTreeElement.prototype = {
    590547    onselect: function()
    591548    {
    592         WebInspector.panels.storage.showApplicationCache(this, this._appcacheDomain);
    593     },
    594 
    595     get mainTitle()
    596     {
    597         return this._mainTitle;
    598     },
    599 
    600     set mainTitle(x)
    601     {
    602         this._mainTitle = x;
    603         this.refreshTitles();
    604     },
    605 
    606     get subtitle()
    607     {
    608         return this._subtitle;
    609     },
    610 
    611     set subtitle(x)
    612     {
    613         this._subtitle = x;
    614         this.refreshTitles();
    615     }
    616 }
    617 
    618 WebInspector.ApplicationCacheSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
     549        this._storagePanel.showApplicationCache(this, this._appcacheDomain);
     550    }
     551}
     552WebInspector.ApplicationCacheTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
     553
     554WebInspector.StorageCategoryView = function()
     555{
     556    WebInspector.View.call(this);
     557
     558    this.element.addStyleClass("storage-view");
     559
     560    this._emptyMsgElement = document.createElement("div");
     561    this._emptyMsgElement.className = "storage-empty-view";
     562    this.element.appendChild(this._emptyMsgElement);
     563}
     564
     565WebInspector.StorageCategoryView.prototype = {
     566    setText: function(text)
     567    {
     568        this._emptyMsgElement.textContent = text;
     569    }
     570}
     571
     572WebInspector.StorageCategoryView.prototype.__proto__ = WebInspector.View.prototype;
  • trunk/WebCore/inspector/front-end/inspector.css

    r69954 r70214  
    716716}
    717717
    718 .console-message.repeated-message > ol.stack-trace {
    719     margin-top: -14px;
    720     margin-left: 18px;
    721 }
    722 
    723718.console-group-messages .section .header .title {
    724719    color: black;
     
    11911186}
    11921187
    1193 .stack-trace li.parent::before,
    11941188.outline-disclosure li.parent::before {
    11951189    content: url(Images/treeRightTriangleBlack.png);
     
    12011195}
    12021196
    1203 .stack-trace li.parent::before,
    12041197.outline-disclosure li.parent::before {
    12051198    content: url(Images/treeRightTriangleBlack.png);
    12061199}
    12071200
    1208 .stack-trace ol:focus li.parent.selected::before,
    12091201.outline-disclosure ol:focus li.parent.selected::before {
    12101202    content: url(Images/treeRightTriangleWhite.png);
    12111203}
    12121204
    1213 .stack-trace li.parent.expanded::before,
    12141205.outline-disclosure li.parent.expanded::before {
    12151206    content: url(Images/treeDownTriangleBlack.png);
    12161207}
    12171208
    1218 .stack-trace ol:focus li.parent.expanded.selected::before,
    12191209.outline-disclosure ol:focus li.parent.expanded.selected::before {
    12201210    content: url(Images/treeDownTriangleWhite.png);
    12211211}
    12221212
    1223 .stack-trace ol.children,
    12241213.outline-disclosure ol.children {
    12251214    display: none;
    12261215}
    12271216
    1228 .stack-trace ol.children.expanded,
    12291217.outline-disclosure ol.children.expanded {
    12301218    display: block;
     
    14311419}
    14321420
    1433 .properties-tree ol, .stack-trace ol, ol.stack-trace {
     1421.properties-tree ol {
    14341422    display: none;
    14351423    margin: 0;
     
    14381426}
    14391427
    1440 .properties-tree ol.expanded, .stack-trace ol, ol.stack-trace {
     1428.properties-tree ol.expanded {
    14411429    display: block;
    1442 }
    1443 
    1444 ol.stack-trace {
    1445     -webkit-padding-start: 0px;
    14461430}
    14471431
     
    18981882}
    18991883
    1900 .database-sidebar-tree-item .icon {
     1884.database-storage-tree-item .icon {
    19011885    content: url(Images/database.png);
    19021886}
    19031887
    1904 .database-table-sidebar-tree-item .icon {
     1888.database-table-storage-tree-item .icon {
    19051889    content: url(Images/databaseTable.png);
    19061890}
    19071891
    1908 .domstorage-sidebar-tree-item.local-storage .icon {
     1892.domstorage-storage-tree-item.local-storage .icon {
    19091893    content: url(Images/localStorage.png);
    19101894}
    19111895
    1912 .domstorage-sidebar-tree-item.session-storage .icon {
     1896.domstorage-storage-tree-item.session-storage .icon {
    19131897    content: url(Images/sessionStorage.png);
    19141898}
    19151899
    1916 .cookie-sidebar-tree-item .icon {
     1900.cookie-storage-tree-item .icon {
    19171901    content: url(Images/cookie.png);
    19181902}
    19191903
    1920 .application-cache-sidebar-tree-item .icon {
     1904.application-cache-storage-tree-item .icon {
    19211905    content: url(Images/applicationCache.png);
    19221906}
     
    19281912    left: 200px;
    19291913    bottom: 0;
     1914}
     1915
     1916.storage.panel .sidebar {
     1917    border-left: rgb(232, 232, 232);
     1918    background-color: transparent;
     1919    overflow-x: auto;
     1920}
     1921
     1922.storage.panel .outline-disclosure > ol {
     1923    margin-left: -12px;
     1924    padding-right: 0px !important;
     1925}
     1926
     1927.storage.panel .outline-disclosure li {
     1928    white-space: nowrap;
     1929}
     1930
     1931.storage.panel .outline-disclosure li .selection {
     1932    height: 17px;
     1933    margin-left: -100px;
     1934    display: inline-block;
     1935}
     1936
     1937.storage.panel .sidebar-resizer-vertical {
     1938    background: rgb(220, 220, 220);
     1939    border-left: 1px solid gray;
     1940    border-right: 1px solid gray;
     1941}
     1942
     1943.storage-base-tree-element-title {
     1944    position: relative;
     1945    bottom: 4px;
     1946    left: 3px;
     1947}
     1948
     1949.storage.panel .outline-disclosure ol {
     1950    -webkit-padding-start: 14px;
     1951}
     1952
     1953.storage.panel .outline-disclosure li.selected {
     1954    color: white;
     1955    background-color: transparent;
     1956}
     1957
     1958.storage.panel .outline-disclosure .icon {
     1959    width: 16px;
     1960    height: 16px;
     1961    display: inline-block;
    19301962}
    19311963
     
    19531985}
    19541986
    1955 .storage-view.table .storage-table-empty, .storage-view.table .storage-table-error {
     1987.storage-empty-view, .storage-view.table .storage-table-error {
    19561988    position: absolute;
    19571989    top: 0;
Note: See TracChangeset for help on using the changeset viewer.