Changeset 121675 in webkit


Ignore:
Timestamp:
Jul 2, 2012 6:10:11 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add refresh button to FileSystemView status bar
https://bugs.webkit.org/show_bug.cgi?id=90244

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-07-02
Reviewed by Vsevolod Vlasov.

Source/WebCore:

  • inspector/front-end/FileSystemView.js:

(WebInspector.FileSystemView):
(WebInspector.FileSystemView.prototype.get statusBarItems):
(WebInspector.FileSystemView.prototype.showView):
(WebInspector.FileSystemView.prototype._refresh):
(WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):

LayoutTests:

  • http/tests/inspector/filesystem/directory-tree.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121674 r121675  
     12012-07-02  Taiju Tsuiki  <tzik@chromium.org>
     2
     3        Web Inspector: Add refresh button to FileSystemView status bar
     4        https://bugs.webkit.org/show_bug.cgi?id=90244
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * http/tests/inspector/filesystem/directory-tree.html:
     9
    1102012-07-02  Zan Dobersek  <zandobersek@gmail.com>
    211
  • trunk/LayoutTests/http/tests/inspector/filesystem/directory-tree.html

    r121542 r121675  
    5353            fileSystemItem.select();
    5454            fileSystemView = fileSystemItem._fileSystemView;
    55             directoryTree = fileSystemView.directoryTree;
     55            directoryTree = fileSystemView._directoryTree;
    5656
    5757            InspectorTest.callOnRequestCompleted(testStep.shift());
  • trunk/Source/WebCore/ChangeLog

    r121673 r121675  
     12012-07-02  Taiju Tsuiki  <tzik@chromium.org>
     2
     3        Web Inspector: Add refresh button to FileSystemView status bar
     4        https://bugs.webkit.org/show_bug.cgi?id=90244
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * inspector/front-end/FileSystemView.js:
     9        (WebInspector.FileSystemView):
     10        (WebInspector.FileSystemView.prototype.get statusBarItems):
     11        (WebInspector.FileSystemView.prototype.showView):
     12        (WebInspector.FileSystemView.prototype._refresh):
     13        (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
     14
    1152012-06-22  Vsevolod Vlasov  <vsevik@chromium.org>
    216
  • trunk/Source/WebCore/inspector/front-end/FileSystemView.js

    r121671 r121675  
    4141
    4242    var directoryTreeElement = this.element.createChild("ol", "filesystem-directory-tree");
    43     this.directoryTree = new TreeOutline(directoryTreeElement);
     43    this._directoryTree = new TreeOutline(directoryTreeElement);
    4444    this.sidebarElement.appendChild(directoryTreeElement);
    4545    this.sidebarElement.addStyleClass("outline-disclosure");
     
    4848    var rootItem = new WebInspector.FileSystemView.EntryTreeElement(this, fileSystem.root);
    4949    rootItem.expanded = true;
    50     this.directoryTree.appendChild(rootItem);
     50    this._directoryTree.appendChild(rootItem);
    5151    this._visibleView = null;
     52
     53    this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
     54    this._refreshButton.visible = true;
     55    this._refreshButton.addEventListener("click", this._refresh, this);
    5256}
    5357
    5458WebInspector.FileSystemView.prototype = {
     59    get statusBarItems()
     60    {
     61        return [this._refreshButton.element];
     62    },
     63
    5564    /**
    5665     * @param {WebInspector.View} view
     
    6473        this._visibleView = view;
    6574        view.show(this.mainElement);
     75    },
     76
     77    _refresh: function()
     78    {
     79        this._directoryTree.children[0].refresh();
    6680    }
    6781}
     
    139153
    140154            if (order === 0) {
    141                 if (oldChild._entry.isDirectory && oldChild.expanded)
    142                     oldChild.refresh();
     155                if (oldChild._entry.isDirectory)
     156                    oldChild.shouldRefreshChildren = true;
    143157                ++newEntryIndex;
    144158                ++oldChildIndex;
Note: See TracChangeset for help on using the changeset viewer.