Title: [121675] trunk
- Revision
- 121675
- Author
- [email protected]
- Date
- 2012-07-02 06:10:11 -0700 (Mon, 02 Jul 2012)
Log Message
Web Inspector: Add refresh button to FileSystemView status bar
https://bugs.webkit.org/show_bug.cgi?id=90244
Patch by Taiju Tsuiki <[email protected]> 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:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (121674 => 121675)
--- trunk/LayoutTests/ChangeLog 2012-07-02 12:56:38 UTC (rev 121674)
+++ trunk/LayoutTests/ChangeLog 2012-07-02 13:10:11 UTC (rev 121675)
@@ -1,3 +1,12 @@
+2012-07-02 Taiju Tsuiki <[email protected]>
+
+ 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 <[email protected]>
Unreviewed GTK gardening, removing GTK-specific baseline that's
Modified: trunk/LayoutTests/http/tests/inspector/filesystem/directory-tree.html (121674 => 121675)
--- trunk/LayoutTests/http/tests/inspector/filesystem/directory-tree.html 2012-07-02 12:56:38 UTC (rev 121674)
+++ trunk/LayoutTests/http/tests/inspector/filesystem/directory-tree.html 2012-07-02 13:10:11 UTC (rev 121675)
@@ -52,7 +52,7 @@
fileSystemItem.select();
fileSystemView = fileSystemItem._fileSystemView;
- directoryTree = fileSystemView.directoryTree;
+ directoryTree = fileSystemView._directoryTree;
InspectorTest.callOnRequestCompleted(testStep.shift());
},
Modified: trunk/Source/WebCore/ChangeLog (121674 => 121675)
--- trunk/Source/WebCore/ChangeLog 2012-07-02 12:56:38 UTC (rev 121674)
+++ trunk/Source/WebCore/ChangeLog 2012-07-02 13:10:11 UTC (rev 121675)
@@ -1,3 +1,17 @@
+2012-07-02 Taiju Tsuiki <[email protected]>
+
+ 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 <[email protected]>
Web Inspector: Implement snippets evaluation.
Modified: trunk/Source/WebCore/inspector/front-end/FileSystemView.js (121674 => 121675)
--- trunk/Source/WebCore/inspector/front-end/FileSystemView.js 2012-07-02 12:56:38 UTC (rev 121674)
+++ trunk/Source/WebCore/inspector/front-end/FileSystemView.js 2012-07-02 13:10:11 UTC (rev 121675)
@@ -40,18 +40,27 @@
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
*/
@@ -63,6 +72,11 @@
this._visibleView.detach();
this._visibleView = view;
view.show(this.mainElement);
+ },
+
+ _refresh: function()
+ {
+ this._directoryTree.children[0].refresh();
}
}
@@ -138,8 +152,8 @@
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;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes