Title: [121533] trunk
Revision
121533
Author
[email protected]
Date
2012-06-29 02:05:58 -0700 (Fri, 29 Jun 2012)

Log Message

Web Inspector: IDBObjectStore.autoIncrement flag not exposed
https://bugs.webkit.org/show_bug.cgi?id=89701

Reviewed by Yury Semikhatsky.

Source/WebCore:

Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip.

* English.lproj/localizedStrings.js:
* inspector/Inspector.json:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):
* inspector/front-end/IndexedDBModel.js:
(WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
(WebInspector.IndexedDBModel.prototype._loadDatabase):
(WebInspector.IndexedDBModel.ObjectStore):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):

LayoutTests:

* http/tests/inspector/indexeddb/database-structure-expected.txt:
* http/tests/inspector/indexeddb/database-structure.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (121532 => 121533)


--- trunk/LayoutTests/ChangeLog	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/LayoutTests/ChangeLog	2012-06-29 09:05:58 UTC (rev 121533)
@@ -1,3 +1,13 @@
+2012-06-27  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: IDBObjectStore.autoIncrement flag not exposed
+        https://bugs.webkit.org/show_bug.cgi?id=89701
+
+        Reviewed by Yury Semikhatsky.
+
+        * http/tests/inspector/indexeddb/database-structure-expected.txt:
+        * http/tests/inspector/indexeddb/database-structure.html:
+
 2012-06-28  Alexander Pavlov  <[email protected]>
 
         Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination

Modified: trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure-expected.txt (121532 => 121533)


--- trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure-expected.txt	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure-expected.txt	2012-06-29 09:05:58 UTC (rev 121533)
@@ -22,6 +22,7 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
 
 Dumping database:
@@ -30,9 +31,11 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
     testObjectStore2
         keyPath: null
+        autoIncrement: false
         indexes: 
 
 Dumping database:
@@ -41,9 +44,11 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
     testObjectStore2
         keyPath: null
+        autoIncrement: false
         indexes: 
         testIndexName1
             keyPath: ""
@@ -56,9 +61,11 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
     testObjectStore2
         keyPath: null
+        autoIncrement: false
         indexes: 
         testIndexName1
             keyPath: ""
@@ -75,9 +82,11 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
     testObjectStore2
         keyPath: null
+        autoIncrement: false
         indexes: 
         testIndexName1
             keyPath: ""
@@ -90,9 +99,11 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
     testObjectStore2
         keyPath: null
+        autoIncrement: false
         indexes: 
 
 Dumping database:
@@ -101,6 +112,7 @@
     objectStores:
     testObjectStore1
         keyPath: "test.key.path"
+        autoIncrement: true
         indexes: 
 
 Dumping database:

Modified: trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure.html (121532 => 121533)


--- trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure.html	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/LayoutTests/http/tests/inspector/indexeddb/database-structure.html	2012-06-29 09:05:58 UTC (rev 121533)
@@ -28,6 +28,7 @@
             var objectStore = database.objectStores[objectStoreNames[i]];
             InspectorTest.addResult("    " + objectStore.name);
             InspectorTest.addResult("        keyPath: " + JSON.stringify(objectStore.keyPath));
+            InspectorTest.addResult("        autoIncrement: " + objectStore.autoIncrement);
             InspectorTest.addResult("        indexes: ");
             var indexNames = [];
             for (var indexName in objectStore.indexes)

Modified: trunk/Source/WebCore/ChangeLog (121532 => 121533)


--- trunk/Source/WebCore/ChangeLog	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/ChangeLog	2012-06-29 09:05:58 UTC (rev 121533)
@@ -1,3 +1,23 @@
+2012-06-27  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: IDBObjectStore.autoIncrement flag not exposed
+        https://bugs.webkit.org/show_bug.cgi?id=89701
+
+        Reviewed by Yury Semikhatsky.
+
+        Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip.
+
+        * English.lproj/localizedStrings.js:
+        * inspector/Inspector.json:
+        * inspector/InspectorIndexedDBAgent.cpp:
+        (WebCore):
+        * inspector/front-end/IndexedDBModel.js:
+        (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
+        (WebInspector.IndexedDBModel.prototype._loadDatabase):
+        (WebInspector.IndexedDBModel.ObjectStore):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
+
 2012-06-28  Alexander Pavlov  <[email protected]>
 
         Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination

Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js (121532 => 121533)


--- trunk/Source/WebCore/English.lproj/localizedStrings.js	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/English.lproj/localizedStrings.js	2012-06-29 09:05:58 UTC (rev 121533)
@@ -659,6 +659,7 @@
 localizedStrings["undefined × %d"] = "undefined × %d";
 localizedStrings["Version"] = "Version";
 localizedStrings["Key path: "] = "Key path: ";
+localizedStrings["autoIncrement"] = "autoIncrement";
 localizedStrings["unique"] = "unique";
 localizedStrings["multiEntry"] = "multiEntry";
 localizedStrings["Show each event category as a horizontal strip in overview"] = "Show each event category as a horizontal strip in overview";

Modified: trunk/Source/WebCore/inspector/Inspector.json (121532 => 121533)


--- trunk/Source/WebCore/inspector/Inspector.json	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/inspector/Inspector.json	2012-06-29 09:05:58 UTC (rev 121533)
@@ -1097,6 +1097,7 @@
                 "properties": [
                     { "name": "name", "type": "string", "description": "Object store name." },
                     { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." },
+                    { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." },
                     { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." }
                 ]
             },

Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (121532 => 121533)


--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2012-06-29 09:05:58 UTC (rev 121533)
@@ -330,10 +330,11 @@
                     .setMultiEntry(indexMetadata.multiEntry);
                 indexes->addItem(objectStoreIndex);
             }
-            // FIXME: add objectStoreMetadata.autoIncrement property http://webkit.org/b/89701
+
             RefPtr<ObjectStore> objectStore = ObjectStore::create()
                 .setName(objectStoreMetadata.name)
                 .setKeyPath(keyPathFromIDBKeyPath(objectStoreMetadata.keyPath))
+                .setAutoIncrement(objectStoreMetadata.autoIncrement)
                 .setIndexes(indexes);
             objectStores->addItem(objectStore);
         }

Modified: trunk/Source/WebCore/inspector/front-end/IndexedDBModel.js (121532 => 121533)


--- trunk/Source/WebCore/inspector/front-end/IndexedDBModel.js	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/inspector/front-end/IndexedDBModel.js	2012-06-29 09:05:58 UTC (rev 121533)
@@ -390,7 +390,7 @@
             for (var i = 0; i < databaseWithObjectStores.objectStores.length; ++i) {
                 var objectStore = databaseWithObjectStores.objectStores[i];
                 var objectStoreIDBKeyPath = WebInspector.IndexedDBModel.idbKeyPathFromKeyPath(objectStore.keyPath);
-                var objectStoreModel = new WebInspector.IndexedDBModel.ObjectStore(objectStore.name, objectStoreIDBKeyPath);
+                var objectStoreModel = new WebInspector.IndexedDBModel.ObjectStore(objectStore.name, objectStoreIDBKeyPath, objectStore.autoIncrement);
                 for (var j = 0; j < objectStore.indexes.length; ++j) {
                      var index = objectStore.indexes[j];
                      var indexIDBKeyPath = WebInspector.IndexedDBModel.idbKeyPathFromKeyPath(index.keyPath);
@@ -538,10 +538,11 @@
  * @param {string} name
  * @param {*} keyPath
  */
-WebInspector.IndexedDBModel.ObjectStore = function(name, keyPath)
+WebInspector.IndexedDBModel.ObjectStore = function(name, keyPath, autoIncrement)
 {
     this.name = name;
     this.keyPath = keyPath;
+    this.autoIncrement = autoIncrement;
     this.indexes = {};
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (121532 => 121533)


--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js	2012-06-29 09:02:18 UTC (rev 121532)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js	2012-06-29 09:05:58 UTC (rev 121533)
@@ -1722,8 +1722,12 @@
 
     _updateTooltip: function()
     {
+        
         var keyPathString = this._objectStore.keyPathString;
-        this.tooltip = keyPathString !== null ? (WebInspector.UIString("Key path: ") + keyPathString) : "";
+        var tooltipString = keyPathString !== null ? (WebInspector.UIString("Key path: ") + keyPathString) : "";
+        if (this._objectStore.autoIncrement)
+            tooltipString += "\n" + WebInspector.UIString("autoIncrement");
+        this.tooltip = tooltipString
     },
 
     onselect: function()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to