+2012-07-02 Taiju Tsuiki <tzik@chromium.org>
+
+ Web Inspector: Add refresh button to FileSystemView status bar
+ https://bugs.webkit.org/show_bug.cgi?id=90244
+
+ Reviewed by Vsevolod Vlasov.
+
+ * http/tests/inspector/filesystem/directory-tree.html:
+
2012-07-02 Zan Dobersek <zandobersek@gmail.com>
Unreviewed GTK gardening, removing GTK-specific baseline that's
+2012-07-02 Taiju Tsuiki <tzik@chromium.org>
+
+ Web Inspector: Add refresh button to FileSystemView status bar
+ https://bugs.webkit.org/show_bug.cgi?id=90244
+
+ Reviewed by Vsevolod Vlasov.
+
+ * 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):
+
2012-06-22 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Implement snippets evaluation.
this.element.addStyleClass("storage-view");
var directoryTreeElement = this.element.createChild("ol", "filesystem-directory-tree");
- this.directoryTree = new TreeOutline(directoryTreeElement);
+ this._directoryTree = new TreeOutline(directoryTreeElement);
this.sidebarElement.appendChild(directoryTreeElement);
this.sidebarElement.addStyleClass("outline-disclosure");
this.sidebarElement.addStyleClass("sidebar");
var rootItem = new WebInspector.FileSystemView.EntryTreeElement(this, fileSystem.root);
rootItem.expanded = true;
- this.directoryTree.appendChild(rootItem);
+ this._directoryTree.appendChild(rootItem);
this._visibleView = null;
+
+ this._refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
+ this._refreshButton.visible = true;
+ this._refreshButton.addEventListener("click", this._refresh, this);
}
WebInspector.FileSystemView.prototype = {
+ get statusBarItems()
+ {
+ return [this._refreshButton.element];
+ },
+
/**
* @param {WebInspector.View} view
*/
this._visibleView.detach();
this._visibleView = view;
view.show(this.mainElement);
+ },
+
+ _refresh: function()
+ {
+ this._directoryTree.children[0].refresh();
}
}
var order = newEntry.name.localeCompare(oldChild._entry.name);
if (order === 0) {
- if (oldChild._entry.isDirectory && oldChild.expanded)
- oldChild.refresh();
+ if (oldChild._entry.isDirectory)
+ oldChild.shouldRefreshChildren = true;
++newEntryIndex;
++oldChildIndex;
++currentTreeItem;