Title: [109349] trunk/Source/WebCore
- Revision
- 109349
- Author
- [email protected]
- Date
- 2012-03-01 08:34:05 -0800 (Thu, 01 Mar 2012)
Log Message
Web Inspector: [InspectorIndexedDB] Show tooltips with IndexedDB objects meta information
https://bugs.webkit.org/show_bug.cgi?id=80022
Reviewed by Pavel Feldman.
Added tooltips with meta information for IndexedDB databases, object stores and indexes.
Added keyPath: prefix to key columns in IndexedDB data grid.
* English.lproj/localizedStrings.js:
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView.prototype._createDataGrid):
(WebInspector.IDBDataView.prototype._keyPathHeader):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.IDBDatabaseTreeElement.prototype.update):
(WebInspector.IDBDatabaseTreeElement.prototype._updateTooltip):
(WebInspector.IDBObjectStoreTreeElement.prototype.update):
(WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
(WebInspector.IDBIndexTreeElement.prototype.update):
(WebInspector.IDBIndexTreeElement.prototype._updateTooltip):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109348 => 109349)
--- trunk/Source/WebCore/ChangeLog 2012-03-01 16:16:54 UTC (rev 109348)
+++ trunk/Source/WebCore/ChangeLog 2012-03-01 16:34:05 UTC (rev 109349)
@@ -1,3 +1,25 @@
+2012-03-01 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: [InspectorIndexedDB] Show tooltips with IndexedDB objects meta information
+ https://bugs.webkit.org/show_bug.cgi?id=80022
+
+ Reviewed by Pavel Feldman.
+
+ Added tooltips with meta information for IndexedDB databases, object stores and indexes.
+ Added keyPath: prefix to key columns in IndexedDB data grid.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/IndexedDBViews.js:
+ (WebInspector.IDBDataView.prototype._createDataGrid):
+ (WebInspector.IDBDataView.prototype._keyPathHeader):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.IDBDatabaseTreeElement.prototype.update):
+ (WebInspector.IDBDatabaseTreeElement.prototype._updateTooltip):
+ (WebInspector.IDBObjectStoreTreeElement.prototype.update):
+ (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
+ (WebInspector.IDBIndexTreeElement.prototype.update):
+ (WebInspector.IDBIndexTreeElement.prototype._updateTooltip):
+
2012-03-01 Pavel Feldman <[email protected]>
Web Inspector: hide color picker on Esc and Enter.
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js
(Binary files differ)
Modified: trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js (109348 => 109349)
--- trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2012-03-01 16:16:54 UTC (rev 109348)
+++ trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2012-03-01 16:34:05 UTC (rev 109349)
@@ -140,12 +140,12 @@
var keyPath = this._isIndex ? this._index.keyPath : this._objectStore.keyPath;
columns["key"] = {};
- var keyColumnTitle = WebInspector.UIString("Key") + (keyPath ? " (" + keyPath + ")" : "");
+ var keyColumnTitle = WebInspector.UIString("Key") + this._keyPathHeader(keyPath);
columns["key"].title = keyColumnTitle;
if (this._isIndex) {
columns["primaryKey"] = {};
- var primaryKeyColumnTitle = WebInspector.UIString("Primary key") + (this._objectStore.keyPath ? " (" + this._objectStore.keyPath + ")" : "");
+ var primaryKeyColumnTitle = WebInspector.UIString("Primary key") + this._keyPathHeader(this._objectStore.keyPath);
columns["primaryKey"].title = primaryKeyColumnTitle;
}
@@ -157,6 +157,16 @@
},
/**
+ * @return {string}
+ */
+ _keyPathHeader: function(keyPath)
+ {
+ if (!keyPath)
+ return "";
+ return " (" + WebInspector.UIString("keyPath") + ": \"" + keyPath + "\")";
+ },
+
+ /**
* @return {Element}
*/
_createEditorToolbar: function()
Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (109348 => 109349)
--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2012-03-01 16:16:54 UTC (rev 109348)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2012-03-01 16:34:05 UTC (rev 109349)
@@ -1679,8 +1679,15 @@
if (this._view)
this._view.update(database);
+
+ this._updateTooltip();
},
+ _updateTooltip: function()
+ {
+ this.tooltip = WebInspector.UIString("Version") + ": " + this._database.version;
+ },
+
onselect: function()
{
WebInspector.BaseStorageTreeElement.prototype.onselect.call(this);
@@ -1747,8 +1754,15 @@
if (this._view)
this._view.update(this._objectStore);
+
+ this._updateTooltip();
},
+ _updateTooltip: function()
+ {
+ this.tooltip = this._objectStore.keyPath ? (WebInspector.UIString("Key path") + ": " + this._objectStore.keyPath) : "";
+ },
+
onselect: function()
{
WebInspector.BaseStorageTreeElement.prototype.onselect.call(this);
@@ -1794,8 +1808,21 @@
if (this._view)
this._view.update(this._index);
+
+ this._updateTooltip();
},
+ _updateTooltip: function()
+ {
+ var tooltipLines = [];
+ tooltipLines.push(WebInspector.UIString("Key path") + ": " + this._index.keyPath);
+ if (this._index.unique)
+ tooltipLines.push(WebInspector.UIString("unique"));
+ if (this._index.multiEntry)
+ tooltipLines.push(WebInspector.UIString("multiEntry"));
+ this.tooltip = tooltipLines.join("\n");
+ },
+
onselect: function()
{
WebInspector.BaseStorageTreeElement.prototype.onselect.call(this);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes