<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164541] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164541">164541</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2014-02-22 08:06:41 -0800 (Sat, 22 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add inspection user interface for IndexedDB.
https://bugs.webkit.org/show_bug.cgi?id=129162
Reviewed by Joseph Pecoraro.
Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/IndexedDatabase.js: Added.
(WebInspector.IndexedDatabase):
(WebInspector.IndexedDatabase.prototype.get name):
(WebInspector.IndexedDatabase.prototype.get securityOrigin):
(WebInspector.IndexedDatabase.prototype.get host):
(WebInspector.IndexedDatabase.prototype.get version):
(WebInspector.IndexedDatabase.prototype.get objectStores):
(WebInspector.IndexedDatabase.prototype.saveIdentityToCookie):
* UserInterface/IndexedDatabaseEntryDataGridNode.js: Added.
(WebInspector.IndexedDatabaseEntryDataGridNode):
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.get entry):
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
* UserInterface/IndexedDatabaseHostTreeElement.js: Added.
(WebInspector.IndexedDatabaseHostTreeElement):
(WebInspector.IndexedDatabaseHostTreeElement.prototype.get name):
(WebInspector.IndexedDatabaseHostTreeElement.prototype.get categoryName):
* UserInterface/IndexedDatabaseObjectStore.js: Added.
(WebInspector.IndexedDatabaseObjectStore):
(WebInspector.IndexedDatabaseObjectStore.prototype.get name):
(WebInspector.IndexedDatabaseObjectStore.prototype.get keyPath):
(WebInspector.IndexedDatabaseObjectStore.prototype.get autoIncrement):
(WebInspector.IndexedDatabaseObjectStore.prototype.get parentDatabase):
(WebInspector.IndexedDatabaseObjectStore.prototype.get indexes):
(WebInspector.IndexedDatabaseObjectStore.prototype.saveIdentityToCookie):
(WebInspector.IndexedDatabaseObjectStore.prototype.establishRelationship):
* UserInterface/IndexedDatabaseObjectStoreContentView.css: Added.
(.content-view.indexed-database-object-store > .data-grid):
(.content-view.indexed-database-object-store > .data-grid td .section .header):
(.content-view.indexed-database-object-store > .data-grid td .section .header::before):
(.content-view.indexed-database-object-store > .data-grid td .section .header .title):
(.content-view.indexed-database-object-store > .data-grid table.data):
(.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(even)):
(.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(odd)):
(.content-view.indexed-database-object-store > .data-grid table.data tr.filler):
(.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .section .header::before):
(.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .section.expanded .header::before):
(.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li.parent::before):
(.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li.parent.expanded::before):
(.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li *):
* UserInterface/IndexedDatabaseObjectStoreContentView.js: Added.
(WebInspector.IndexedDatabaseObjectStoreContentView.displayKeyPath):
(WebInspector.IndexedDatabaseObjectStoreContentView):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.closed):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.saveToCookie):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype.updateLayout):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._reset):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._dataGridScrolled):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
(WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
* UserInterface/IndexedDatabaseObjectStoreIndex.js: Added.
(WebInspector.IndexedDatabaseObjectStoreIndex):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get name):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get keyPath):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get unique):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get multiEntry):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get parentObjectStore):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.saveIdentityToCookie):
(WebInspector.IndexedDatabaseObjectStoreIndex.prototype.establishRelationship):
* UserInterface/IndexedDatabaseObjectStoreIndexTreeElement.js: Added.
(WebInspector.IndexedDatabaseObjectStoreIndexTreeElement):
(WebInspector.IndexedDatabaseObjectStoreIndexTreeElement.prototype.get objectStoreIndex):
* UserInterface/IndexedDatabaseObjectStoreTreeElement.js: Added.
(WebInspector.IndexedDatabaseObjectStoreTreeElement):
(WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.get objectStore):
(WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.oncollapse):
(WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.onpopulate):
* UserInterface/IndexedDatabaseTreeElement.js: Added.
(WebInspector.IndexedDatabaseTreeElement):
(WebInspector.IndexedDatabaseTreeElement.prototype.get indexedDatabase):
(WebInspector.IndexedDatabaseTreeElement.prototype.oncollapse):
(WebInspector.IndexedDatabaseTreeElement.prototype.onpopulate):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._indexedDatabaseWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._storageCleared):
* UserInterface/StorageManager.js:
(WebInspector.StorageManager):
(WebInspector.StorageManager.prototype.initialize):
(WebInspector.StorageManager.prototype.processData):
(WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
(WebInspector.StorageManager.prototype._mainResourceDidChange):
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processDatabaseNames):
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processDatabase):
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded):
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processObjectStore):
(WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processObjectStoreIndex):
(WebInspector.StorageManager.prototype._securityOriginDidChange):
* UserInterface/URLUtilities.js:
(parseSecurityOrigin):
LayoutTests:
* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorTest.initializeInspectorModels): Add IndexedDatabase models and StorageManager.
* inspector-protocol/indexeddb/basics-expected.txt: Added.
* inspector-protocol/indexeddb/basics.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorprotocolresourcesInspectorTestjs">trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceContentViewjs">trunk/Source/WebInspectorUI/UserInterface/ContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceInspectorWebBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceLegacy60InspectorWebBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorWebBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceLegacy70InspectorWebBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorWebBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainjs">trunk/Source/WebInspectorUI/UserInterface/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceResourceSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/ResourceSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceStorageManagerjs">trunk/Source/WebInspectorUI/UserInterface/StorageManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceURLUtilitiesjs">trunk/Source/WebInspectorUI/UserInterface/URLUtilities.js</a></li>
<li><a href="#trunkSourceWebInspectorUIVersionsInspectoriOS60json">trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json</a></li>
<li><a href="#trunkSourceWebInspectorUIVersionsInspectoriOS70json">trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/inspector-protocol/indexeddb/</li>
<li><a href="#trunkLayoutTestsinspectorprotocolindexeddbbasicsexpectedtxt">trunk/LayoutTests/inspector-protocol/indexeddb/basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocolindexeddbbasicshtml">trunk/LayoutTests/inspector-protocol/indexeddb/basics.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabasejs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabase.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseEntryDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseEntryDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseHostTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseHostTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStorejs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStore.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStoreContentViewcss">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStoreContentView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStoreContentViewjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStoreContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStoreIndexjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStoreIndex.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStoreIndexTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStoreIndexTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseObjectStoreTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseObjectStoreTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceIndexedDatabaseTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/IndexedDatabaseTreeElement.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (164540 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-22 15:29:13 UTC (rev 164540)
+++ trunk/LayoutTests/ChangeLog        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-02-21 Timothy Hatcher <timothy@apple.com>
+
+ Add inspection user interface for IndexedDB.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129162
+
+ Reviewed by Joseph Pecoraro.
+
+ * http/tests/inspector-protocol/resources/InspectorTest.js:
+ (InspectorTest.initializeInspectorModels): Add IndexedDatabase models and StorageManager.
+ * inspector-protocol/indexeddb/basics-expected.txt: Added.
+ * inspector-protocol/indexeddb/basics.html: Added.
+
</ins><span class="cx"> 2014-02-21 Dirk Schulze <krit@webkit.org>
</span><span class="cx">
</span><span class="cx"> Replace svg/clip-path pixel tests by reference tests
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorprotocolresourcesInspectorTestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js (164540 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js        2014-02-22 15:29:13 UTC (rev 164540)
+++ trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -227,7 +227,12 @@
</span><span class="cx"> "ProbeManager",
</span><span class="cx"> "ProbeSetDataFrame",
</span><span class="cx"> "ProbeSetDataTable",
</span><del>- "RemoteObject"
</del><ins>+ "RemoteObject",
+ "DOMStorageObject",
+ "IndexedDatabase",
+ "IndexedDatabaseObjectStore",
+ "IndexedDatabaseObjectStoreIndex",
+ "StorageManager"
</ins><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> // This corresponds to loading the scripts in Main.hml.
</span><span class="lines">@@ -252,6 +257,7 @@
</span><span class="cx"> InspectorBackend.registerRuntimeDispatcher(new WebInspector.RuntimeObserver);
</span><span class="cx">
</span><span class="cx"> WebInspector.frameResourceManager = new WebInspector.FrameResourceManager;
</span><ins>+ WebInspector.storageManager = new WebInspector.StorageManager;
</ins><span class="cx"> WebInspector.domTreeManager = new WebInspector.DOMTreeManager;
</span><span class="cx"> WebInspector.cssStyleManager = new WebInspector.CSSStyleManager;
</span><span class="cx"> WebInspector.debuggerManager = new WebInspector.DebuggerManager;
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolindexeddbbasicsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector-protocol/indexeddb/basics-expected.txt (0 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/indexeddb/basics-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector-protocol/indexeddb/basics-expected.txt        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+IndexedDatabaseWasAdded: test-inspector-database
+ - Object Store: People (key path: null, auto increment: false)
+ - Index: name (key path: name, unique: true, multi entry: false)
+ - Index: weight (key path: weight, unique: false, multi entry: false)
+ - Index: height (key path: height, unique: false, multi entry: false)
+
+Index Data (name):
+0: 237-23-7733, Ann, Object
+1: 237-23-7732, Bob, Object
+2: 237-23-7739, Jef, Object
+3: 237-23-7736, Joe, Object
+4: 237-23-7738, Leo, Object
+5: 237-23-7737, Pat, Object
+6: 237-23-7734, Ron, Object
+7: 237-23-7740, Sam, Object
+8: 237-23-7735, Sue, Object
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolindexeddbbasicshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector-protocol/indexeddb/basics.html (0 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/indexeddb/basics.html         (rev 0)
+++ trunk/LayoutTests/inspector-protocol/indexeddb/basics.html        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -0,0 +1,100 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector-protocol/resources/protocol-test.js"></script>
+</head>
+<body>
+<script>
+if (!window.testRunner)
+ throw "This test requires DumpRenderTree";
+
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+
+const databaseName = "test-inspector-database";
+
+indexedDB.deleteDatabase(databaseName).onsuccess = function() {
+ var openRequest = indexedDB.open(databaseName);
+ openRequest.onupgradeneeded = prepareDatabase;
+ openRequest.onsuccess = inspectDatabase;
+};
+
+function prepareDatabase(event)
+{
+ const db = event.target.result;
+ const objectStore = db.createObjectStore("People");
+
+ const indexData = [
+ {name: "name", keyPath: "name", options: {unique: true}},
+ {name: "height", keyPath: "height", options: {}},
+ {name: "weight", keyPath: "weight", options: {}}
+ ];
+
+ for (var data of indexData)
+ objectStore.createIndex(data.name, data.keyPath, data.options);
+
+ const objectStoreData = [
+ {key: "237-23-7732", value: {name: "Bob", height: 60, weight: 120}},
+ {key: "237-23-7733", value: {name: "Ann", height: 52, weight: 110}},
+ {key: "237-23-7734", value: {name: "Ron", height: 73, weight: 180}},
+ {key: "237-23-7735", value: {name: "Sue", height: 58, weight: 130}},
+ {key: "237-23-7736", value: {name: "Joe", height: 65, weight: 150}},
+ {key: "237-23-7737", value: {name: "Pat", height: 65, weight: 100}},
+ {key: "237-23-7738", value: {name: "Leo", height: 65, weight: 180}},
+ {key: "237-23-7739", value: {name: "Jef", height: 65, weight: 120}},
+ {key: "237-23-7740", value: {name: "Sam", height: 73, weight: 110}}
+ ];
+
+ for (var data of objectStoreData)
+ objectStore.put(data.value, data.key);
+}
+
+function inspectDatabase()
+{
+ runTest();
+
+ // Balance the extra testRunner.waitUntilDone().
+ // FIXME: No good way to do this without an arbitrary timeout.
+ setTimeout(function() { testRunner.notifyDone(); }, 500);
+}
+
+function test()
+{
+ InspectorTest.initializeInspectorModels();
+
+ function databaseAdded(event)
+ {
+ var db = event.data.indexedDatabase;
+
+ InspectorTest.log("IndexedDatabaseWasAdded: " + db.name);
+
+ for (var objectStore of db.objectStores) {
+ InspectorTest.log(" - Object Store: " + objectStore.name + " (key path: " + objectStore.keyPath + ", auto increment: " + objectStore.autoIncrement + ")");
+
+ for (var index of objectStore.indexes) {
+ InspectorTest.log(" - Index: " + index.name + " (key path: " + index.keyPath + ", unique: " + index.unique + ", multi entry: " + index.multiEntry + ")");
+
+ // FIXME: Only one requestIndexedDatabaseData is allowed at a time due to limitations of the backend. So we only print the name data.
+
+ if (index.keyPath === "name")
+ WebInspector.storageManager.requestIndexedDatabaseData(objectStore, index, 0, 15, processData);
+ }
+ }
+ }
+
+ function processData(entries, moreAvailable)
+ {
+ InspectorTest.log("");
+ InspectorTest.log("Index Data (name):");
+
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ InspectorTest.log(i + ": " + entry.primaryKey.description + ", " + entry.key.description + ", " + entry.value.description);
+ }
+ }
+
+ WebInspector.storageManager.addEventListener(WebInspector.StorageManager.Event.IndexedDatabaseWasAdded, databaseAdded);
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (164540 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2014-02-22 15:29:13 UTC (rev 164540)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> ### START OF (2) Failures without bug reports
</span><span class="cx">
</span><span class="cx"> # IndexedDB is not yet enabled in Mac WK1
</span><ins>+inspector-protocol/indexeddb
</ins><span class="cx"> storage/indexeddb
</span><span class="cx"> http/tests/security/cross-origin-indexeddb-allowed.html
</span><span class="cx"> http/tests/security/cross-origin-indexeddb.html
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (164540 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-02-22 15:29:13 UTC (rev 164540)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -1,3 +1,109 @@
</span><ins>+2014-02-21 Timothy Hatcher <timothy@apple.com>
+
+ Add inspection user interface for IndexedDB.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129162
+
+ Reviewed by Joseph Pecoraro.
+
+ * Localizations/en.lproj/localizedStrings.js: Updated.
+ * UserInterface/ContentView.js:
+ (WebInspector.ContentView):
+ (WebInspector.ContentView.isViewable):
+ * UserInterface/IndexedDatabase.js: Added.
+ (WebInspector.IndexedDatabase):
+ (WebInspector.IndexedDatabase.prototype.get name):
+ (WebInspector.IndexedDatabase.prototype.get securityOrigin):
+ (WebInspector.IndexedDatabase.prototype.get host):
+ (WebInspector.IndexedDatabase.prototype.get version):
+ (WebInspector.IndexedDatabase.prototype.get objectStores):
+ (WebInspector.IndexedDatabase.prototype.saveIdentityToCookie):
+ * UserInterface/IndexedDatabaseEntryDataGridNode.js: Added.
+ (WebInspector.IndexedDatabaseEntryDataGridNode):
+ (WebInspector.IndexedDatabaseEntryDataGridNode.prototype.get entry):
+ (WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
+ * UserInterface/IndexedDatabaseHostTreeElement.js: Added.
+ (WebInspector.IndexedDatabaseHostTreeElement):
+ (WebInspector.IndexedDatabaseHostTreeElement.prototype.get name):
+ (WebInspector.IndexedDatabaseHostTreeElement.prototype.get categoryName):
+ * UserInterface/IndexedDatabaseObjectStore.js: Added.
+ (WebInspector.IndexedDatabaseObjectStore):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.get name):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.get keyPath):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.get autoIncrement):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.get parentDatabase):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.get indexes):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.saveIdentityToCookie):
+ (WebInspector.IndexedDatabaseObjectStore.prototype.establishRelationship):
+ * UserInterface/IndexedDatabaseObjectStoreContentView.css: Added.
+ (.content-view.indexed-database-object-store > .data-grid):
+ (.content-view.indexed-database-object-store > .data-grid td .section .header):
+ (.content-view.indexed-database-object-store > .data-grid td .section .header::before):
+ (.content-view.indexed-database-object-store > .data-grid td .section .header .title):
+ (.content-view.indexed-database-object-store > .data-grid table.data):
+ (.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(even)):
+ (.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(odd)):
+ (.content-view.indexed-database-object-store > .data-grid table.data tr.filler):
+ (.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .section .header::before):
+ (.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .section.expanded .header::before):
+ (.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li.parent::before):
+ (.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li.parent.expanded::before):
+ (.content-view.indexed-database-object-store > .data-grid :focus tr.selected td .properties-tree li *):
+ * UserInterface/IndexedDatabaseObjectStoreContentView.js: Added.
+ (WebInspector.IndexedDatabaseObjectStoreContentView.displayKeyPath):
+ (WebInspector.IndexedDatabaseObjectStoreContentView):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.closed):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.saveToCookie):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.updateLayout):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._reset):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._dataGridScrolled):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
+ (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
+ * UserInterface/IndexedDatabaseObjectStoreIndex.js: Added.
+ (WebInspector.IndexedDatabaseObjectStoreIndex):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get name):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get keyPath):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get unique):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get multiEntry):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.get parentObjectStore):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.saveIdentityToCookie):
+ (WebInspector.IndexedDatabaseObjectStoreIndex.prototype.establishRelationship):
+ * UserInterface/IndexedDatabaseObjectStoreIndexTreeElement.js: Added.
+ (WebInspector.IndexedDatabaseObjectStoreIndexTreeElement):
+ (WebInspector.IndexedDatabaseObjectStoreIndexTreeElement.prototype.get objectStoreIndex):
+ * UserInterface/IndexedDatabaseObjectStoreTreeElement.js: Added.
+ (WebInspector.IndexedDatabaseObjectStoreTreeElement):
+ (WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.get objectStore):
+ (WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.oncollapse):
+ (WebInspector.IndexedDatabaseObjectStoreTreeElement.prototype.onpopulate):
+ * UserInterface/IndexedDatabaseTreeElement.js: Added.
+ (WebInspector.IndexedDatabaseTreeElement):
+ (WebInspector.IndexedDatabaseTreeElement.prototype.get indexedDatabase):
+ (WebInspector.IndexedDatabaseTreeElement.prototype.oncollapse):
+ (WebInspector.IndexedDatabaseTreeElement.prototype.onpopulate):
+ * UserInterface/Main.html:
+ * UserInterface/Main.js:
+ (WebInspector.sidebarPanelForRepresentedObject):
+ * UserInterface/ResourceSidebarPanel.js:
+ (WebInspector.ResourceSidebarPanel):
+ (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
+ (WebInspector.ResourceSidebarPanel.prototype._indexedDatabaseWasAdded):
+ (WebInspector.ResourceSidebarPanel.prototype._storageCleared):
+ * UserInterface/StorageManager.js:
+ (WebInspector.StorageManager):
+ (WebInspector.StorageManager.prototype.initialize):
+ (WebInspector.StorageManager.prototype.processData):
+ (WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
+ (WebInspector.StorageManager.prototype._mainResourceDidChange):
+ (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processDatabaseNames):
+ (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processDatabase):
+ (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded):
+ (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processObjectStore):
+ (WebInspector.StorageManager.prototype._addIndexedDBDatabasesIfNeeded.processObjectStoreIndex):
+ (WebInspector.StorageManager.prototype._securityOriginDidChange):
+ * UserInterface/URLUtilities.js:
+ (parseSecurityOrigin):
+
</ins><span class="cx"> 2014-02-22 Antoine Quint <graouts@webkit.org>
</span><span class="cx">
</span><span class="cx"> Web Inspector: allow drag-to-adjust on angle input of gradients editor
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (164540 => 164541)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-02-22 15:29:13 UTC (rev 164540)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-02-22 16:06:41 UTC (rev 164541)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">