Changeset 181930 in webkit


Ignore:
Timestamp:
Mar 24, 2015 9:27:33 PM (9 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: IndexedDB / Databases ContentViews should have refresh button
https://bugs.webkit.org/show_bug.cgi?id=142996

Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:

Remove unused strings.

  • UserInterface/Images/ReloadFull.svg: Added.

This is the same as Reload.svg but adjusted to fill the viewbox edge to edge.
The only change is to the viewbox.

  • UserInterface/Protocol/RemoteObject.js:

(WebInspector.RemoteObject.prototype.release):
Some clients would call release not knowing if this was an object or not.
Act gracefully in the case that this was not an object that needs a
remote release.

  • UserInterface/Views/DatabaseTableContentView.js:

(WebInspector.DatabaseTableContentView):
(WebInspector.DatabaseTableContentView.prototype.get navigationItems):
(WebInspector.DatabaseTableContentView.prototype._queryError):
(WebInspector.DatabaseTableContentView.prototype._refreshButtonClicked):

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:

(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._refreshButtonClicked):
Give the storage content views a refresh button to reload the content.

Location:
trunk/Source/WebInspectorUI
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r181929 r181930  
     12015-03-24  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: IndexedDB / Databases ContentViews should have refresh button
     4        https://bugs.webkit.org/show_bug.cgi?id=142996
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * Localizations/en.lproj/localizedStrings.js:
     9        Remove unused strings.
     10
     11        * UserInterface/Images/ReloadFull.svg: Added.
     12        This is the same as Reload.svg but adjusted to fill the viewbox edge to edge.
     13        The only change is to the viewbox.
     14
     15        * UserInterface/Protocol/RemoteObject.js:
     16        (WebInspector.RemoteObject.prototype.release):
     17        Some clients would call release not knowing if this was an object or not.
     18        Act gracefully in the case that this was not an object that needs a
     19        remote release.
     20
     21        * UserInterface/Views/DatabaseTableContentView.js:
     22        (WebInspector.DatabaseTableContentView):
     23        (WebInspector.DatabaseTableContentView.prototype.get navigationItems):
     24        (WebInspector.DatabaseTableContentView.prototype._queryError):
     25        (WebInspector.DatabaseTableContentView.prototype._refreshButtonClicked):
     26        * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
     27        (WebInspector.IndexedDatabaseObjectStoreContentView):
     28        (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
     29        (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
     30        (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._refreshButtonClicked):
     31        Give the storage content views a refresh button to reload the content.
     32
    1332015-03-24  Joseph Pecoraro  <pecoraro@apple.com>
    234
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r181872 r181930  
    7878localizedStrings["Boundary"] = "Boundary";
    7979localizedStrings["Box Model"] = "Box Model";
    80 localizedStrings["Breakpoints"] = "Breakpoints";
    8180localizedStrings["Bubbling"] = "Bubbling";
    8281localizedStrings["Busy"] = "Busy";
     
    194193localizedStrings["Element is the root element"] = "Element is the root element";
    195194localizedStrings["Element overlaps other compositing element"] = "Element overlaps other compositing element";
    196 localizedStrings["Empty Collection"] = "Empty Collection";
    197195localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
    198196localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
  • trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js

    r181061 r181930  
    503503    release: function()
    504504    {
    505         RuntimeAgent.releaseObject(this._objectId);
     505        if (this._objectId)
     506            RuntimeAgent.releaseObject(this._objectId);
    506507    },
    507508
  • trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js

    r178155 r181930  
    3030    this.element.classList.add(WebInspector.DatabaseTableContentView.StyleClassName);
    3131
     32    var refreshSource, refreshSize;
     33    if (WebInspector.Platform.isLegacyMacOS) {
     34        refreshSource = "Images/Legacy/Reload.svg";
     35        refreshSize = 16;
     36    } else {
     37        refreshSource = "Images/ReloadFull.svg";
     38        refreshSize = 13;
     39    }
     40
     41    this._refreshButtonNavigationItem = new WebInspector.ButtonNavigationItem("database-table-refresh", WebInspector.UIString("Refresh"), refreshSource, refreshSize, refreshSize);
     42    this._refreshButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._refreshButtonClicked, this);
     43
    3244    this.update();
    3345};
     
    3749WebInspector.DatabaseTableContentView.prototype = {
    3850    constructor: WebInspector.DatabaseTableContentView,
     51    __proto__: WebInspector.ContentView.prototype,
    3952
    4053    // Public
     54
     55    get navigationItems()
     56    {
     57        return [this._refreshButtonNavigationItem];
     58    },
    4159
    4260    get allowedNavigationSidebarPanels()
     
    102120        this.element.removeChildren();
    103121        this.element.appendChild(WebInspector.createMessageTextView(WebInspector.UIString("An error occured trying to\nread the “%s” table.").format(this.representedObject.name), true));
     122    },
     123
     124    _refreshButtonClicked: function()
     125    {
     126        this.update();
    104127    }
    105128};
    106 
    107 WebInspector.DatabaseTableContentView.prototype.__proto__ = WebInspector.ContentView.prototype;
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js

    r164543 r181930  
    6767
    6868    this._dataGrid = new WebInspector.DataGrid(columnInfo);
     69    this._dataGrid.scrollContainer.addEventListener("scroll", this._dataGridScrolled.bind(this));
    6970    this.element.appendChild(this._dataGrid.element);
    70 
    71     this._dataGrid.scrollContainer.addEventListener("scroll", this._dataGridScrolled.bind(this));
    7271
    7372    this._entries = [];
    7473
    7574    this._fetchMoreData();
     75
     76    var refreshSource, refreshSize;
     77    if (WebInspector.Platform.isLegacyMacOS) {
     78        refreshSource = "Images/Legacy/Reload.svg";
     79        refreshSize = 16;
     80    } else {
     81        refreshSource = "Images/ReloadFull.svg";
     82        refreshSize = 13;
     83    }
     84
     85    this._refreshButtonNavigationItem = new WebInspector.ButtonNavigationItem("indexed-database-object-store-refresh", WebInspector.UIString("Refresh"), refreshSource, refreshSize, refreshSize);
     86    this._refreshButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._refreshButtonClicked, this);
    7687};
    7788
     
    8394
    8495    // Public
     96
     97    get navigationItems()
     98    {
     99        return [this._refreshButtonNavigationItem];
     100    },
    85101
    86102    closed: function()
     
    149165
    150166        WebInspector.storageManager.requestIndexedDatabaseData(this._objectStore, this._objectStoreIndex, this._entries.length, 25, processEntries.bind(this));
     167    },
     168
     169    _refreshButtonClicked: function()
     170    {
     171        this._reset();
     172        this._fetchMoreData();
    151173    }
    152174};
Note: See TracChangeset for help on using the changeset viewer.