- Revision
- 181930
- Author
- [email protected]
- Date
- 2015-03-24 21:27:33 -0700 (Tue, 24 Mar 2015)
Log 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.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (181929 => 181930)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-03-25 04:20:30 UTC (rev 181929)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-03-25 04:27:33 UTC (rev 181930)
@@ -1,5 +1,37 @@
2015-03-24 Joseph Pecoraro <[email protected]>
+ 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.
+
+2015-03-24 Joseph Pecoraro <[email protected]>
+
Setter should have a single formal parameter, Getter no parameters
https://bugs.webkit.org/show_bug.cgi?id=142903
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (181929 => 181930)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-03-25 04:20:30 UTC (rev 181929)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-03-25 04:27:33 UTC (rev 181930)
@@ -77,7 +77,6 @@
localizedStrings["Begin Capturing"] = "Begin Capturing";
localizedStrings["Boundary"] = "Boundary";
localizedStrings["Box Model"] = "Box Model";
-localizedStrings["Breakpoints"] = "Breakpoints";
localizedStrings["Bubbling"] = "Bubbling";
localizedStrings["Busy"] = "Busy";
localizedStrings["Cached"] = "Cached";
@@ -193,7 +192,6 @@
localizedStrings["Element is masked and composited descendants"] = "Element is masked and composited descendants";
localizedStrings["Element is the root element"] = "Element is the root element";
localizedStrings["Element overlaps other compositing element"] = "Element overlaps other compositing element";
-localizedStrings["Empty Collection"] = "Empty Collection";
localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
localizedStrings["Enable all breakpoints (%s)"] = "Enable all breakpoints (%s)";
Added: trunk/Source/WebInspectorUI/UserInterface/Images/ReloadFull.svg (0 => 181930)
--- trunk/Source/WebInspectorUI/UserInterface/Images/ReloadFull.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/ReloadFull.svg 2015-03-25 04:27:33 UTC (rev 181930)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2014 Apple Inc. All rights reserved. -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="1 1 13 13">
+ <path class="filled" d="M 12.007 8.01 L 12.007 8.488 L 12 8.488 C 12 10.974 9.985 12.988 7.5 12.988 C 5.015 12.988 3 10.974 3 8.488 C 3 6.17 4.759 4.284 7.012 4.037 L 7.012 6.549 L 11.519 3.775 L 7.012 1 L 7.012 3.013 C 4.203 3.26 2 5.615 2 8.488 C 2 11.526 4.462 13.988 7.5 13.988 C 10.509 13.988 12.95 11.571 12.996 8.572 L 13 8.572 L 13 8.01 L 12.007 8.01 Z"/>
+</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (181929 => 181930)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2015-03-25 04:20:30 UTC (rev 181929)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2015-03-25 04:27:33 UTC (rev 181930)
@@ -502,7 +502,8 @@
release: function()
{
- RuntimeAgent.releaseObject(this._objectId);
+ if (this._objectId)
+ RuntimeAgent.releaseObject(this._objectId);
},
arrayLength: function()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js (181929 => 181930)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js 2015-03-25 04:20:30 UTC (rev 181929)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js 2015-03-25 04:27:33 UTC (rev 181930)
@@ -29,6 +29,18 @@
this.element.classList.add(WebInspector.DatabaseTableContentView.StyleClassName);
+ var refreshSource, refreshSize;
+ if (WebInspector.Platform.isLegacyMacOS) {
+ refreshSource = "Images/Legacy/Reload.svg";
+ refreshSize = 16;
+ } else {
+ refreshSource = "Images/ReloadFull.svg";
+ refreshSize = 13;
+ }
+
+ this._refreshButtonNavigationItem = new WebInspector.ButtonNavigationItem("database-table-refresh", WebInspector.UIString("Refresh"), refreshSource, refreshSize, refreshSize);
+ this._refreshButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._refreshButtonClicked, this);
+
this.update();
};
@@ -36,9 +48,15 @@
WebInspector.DatabaseTableContentView.prototype = {
constructor: WebInspector.DatabaseTableContentView,
+ __proto__: WebInspector.ContentView.prototype,
// Public
+ get navigationItems()
+ {
+ return [this._refreshButtonNavigationItem];
+ },
+
get allowedNavigationSidebarPanels()
{
return [WebInspector.resourceSidebarPanel.identifier];
@@ -101,7 +119,10 @@
{
this.element.removeChildren();
this.element.appendChild(WebInspector.createMessageTextView(WebInspector.UIString("An error occured trying to\nread the “%s” table.").format(this.representedObject.name), true));
+ },
+
+ _refreshButtonClicked: function()
+ {
+ this.update();
}
};
-
-WebInspector.DatabaseTableContentView.prototype.__proto__ = WebInspector.ContentView.prototype;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js (181929 => 181930)
--- trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js 2015-03-25 04:20:30 UTC (rev 181929)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js 2015-03-25 04:27:33 UTC (rev 181930)
@@ -66,13 +66,24 @@
}
this._dataGrid = new WebInspector.DataGrid(columnInfo);
+ this._dataGrid.scrollContainer.addEventListener("scroll", this._dataGridScrolled.bind(this));
this.element.appendChild(this._dataGrid.element);
- this._dataGrid.scrollContainer.addEventListener("scroll", this._dataGridScrolled.bind(this));
-
this._entries = [];
this._fetchMoreData();
+
+ var refreshSource, refreshSize;
+ if (WebInspector.Platform.isLegacyMacOS) {
+ refreshSource = "Images/Legacy/Reload.svg";
+ refreshSize = 16;
+ } else {
+ refreshSource = "Images/ReloadFull.svg";
+ refreshSize = 13;
+ }
+
+ this._refreshButtonNavigationItem = new WebInspector.ButtonNavigationItem("indexed-database-object-store-refresh", WebInspector.UIString("Refresh"), refreshSource, refreshSize, refreshSize);
+ this._refreshButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._refreshButtonClicked, this);
};
WebInspector.IndexedDatabaseObjectStoreContentView.StyleClassName = "indexed-database-object-store";
@@ -83,6 +94,11 @@
// Public
+ get navigationItems()
+ {
+ return [this._refreshButtonNavigationItem];
+ },
+
closed: function()
{
this._reset();
@@ -148,5 +164,11 @@
this._fetchingMoreData = true;
WebInspector.storageManager.requestIndexedDatabaseData(this._objectStore, this._objectStoreIndex, this._entries.length, 25, processEntries.bind(this));
+ },
+
+ _refreshButtonClicked: function()
+ {
+ this._reset();
+ this._fetchMoreData();
}
};