- Revision
- 181613
- Author
- [email protected]
- Date
- 2015-03-16 21:41:34 -0700 (Mon, 16 Mar 2015)
Log Message
Web Inspector: Object Previews in Indexed DB tables
https://bugs.webkit.org/show_bug.cgi?id=140813
Reviewed by Timothy Hatcher.
Source/WebCore:
* inspector/InspectorIndexedDBAgent.cpp:
Include previews with object store objects.
Source/WebInspectorUI:
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Add a boolean param for ObjectTree construction if it should force allowing object expansion.
* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
Switch to creating an ObjectTree or FormattedValue.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid tr.selected):
Change row selection color to match the console's lighter blue instead of dark blue.
(.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
Adjust object tree disclosure triangle placement for larger line heights.
(.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
Remove now unnecessary styles.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree .object-tree-array-index > .icon):
Increase the specificity to override ".data-grid td .icon" styles.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (181612 => 181613)
--- trunk/Source/WebCore/ChangeLog 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebCore/ChangeLog 2015-03-17 04:41:34 UTC (rev 181613)
@@ -1,3 +1,13 @@
+2015-03-16 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Object Previews in Indexed DB tables
+ https://bugs.webkit.org/show_bug.cgi?id=140813
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/InspectorIndexedDBAgent.cpp:
+ Include previews with object store objects.
+
2015-03-16 Jer Noble <[email protected]>
[Mac] Update missing image UI
Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (181612 => 181613)
--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp 2015-03-17 04:41:34 UTC (rev 181613)
@@ -470,9 +470,9 @@
}
RefPtr<DataEntry> dataEntry = DataEntry::create()
- .setKey(m_injectedScript.wrapObject(idbCursor->key(), String()))
- .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String()))
- .setValue(m_injectedScript.wrapObject(idbCursor->value(), String()))
+ .setKey(m_injectedScript.wrapObject(idbCursor->key(), String(), true))
+ .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String(), true))
+ .setValue(m_injectedScript.wrapObject(idbCursor->value(), String(), true))
.release();
m_result->addItem(WTF::move(dataEntry));
Modified: trunk/Source/WebInspectorUI/ChangeLog (181612 => 181613)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-03-17 04:41:34 UTC (rev 181613)
@@ -1,5 +1,41 @@
2015-03-16 Joseph Pecoraro <[email protected]>
+ Web Inspector: Object Previews in Indexed DB tables
+ https://bugs.webkit.org/show_bug.cgi?id=140813
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/FormattedValue.js:
+ (WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
+ Add a boolean param for ObjectTree construction if it should force allowing object expansion.
+
+ * UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
+ (WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
+ Switch to creating an ObjectTree or FormattedValue.
+
+ * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
+ (.content-view.indexed-database-object-store > .data-grid tr.selected):
+ Change row selection color to match the console's lighter blue instead of dark blue.
+
+ (.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
+ Adjust object tree disclosure triangle placement for larger line heights.
+
+ (.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
+ (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
+ Remove now unnecessary styles.
+
+ * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
+ (.object-tree .object-tree-array-index > .icon):
+ Increase the specificity to override ".data-grid td .icon" styles.
+
+2015-03-16 Joseph Pecoraro <[email protected]>
+
Web Inspector: Better Console Previews for Arrays / Small Objects
https://bugs.webkit.org/show_bug.cgi?id=142322
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js (181612 => 181613)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js 2015-03-17 04:41:34 UTC (rev 181613)
@@ -120,13 +120,13 @@
return WebInspector.FormattedValue.createElementForTypesAndValue(propertyPreview.type, propertyPreview.subtype, propertyPreview.value, undefined, true, false);
};
-WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject = function(object, propertyPath)
+WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject = function(object, propertyPath, forceExpanding)
{
if (object.subtype === "node")
return WebInspector.FormattedValue.createElementForNode(object);
if (object.type === "object") {
- var objectTree = new WebInspector.ObjectTreeView(object, WebInspector.ObjectTreeView.Mode.Properties, propertyPath);
+ var objectTree = new WebInspector.ObjectTreeView(object, WebInspector.ObjectTreeView.Mode.Properties, propertyPath, forceExpanding);
return objectTree.element;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseEntryDataGridNode.js (181612 => 181613)
--- trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseEntryDataGridNode.js 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseEntryDataGridNode.js 2015-03-17 04:41:34 UTC (rev 181613)
@@ -44,23 +44,9 @@
createCellContent: function(columnIdentifier, cell)
{
var value = this._entry[columnIdentifier];
+ if (value instanceof WebInspector.RemoteObject)
+ return WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject(value, null, true);
- if (value instanceof WebInspector.RemoteObject) {
- switch (value.type) {
- case "object":
- case "array":
- var propertiesSection = new WebInspector.ObjectPropertiesSection(value, value.description);
- propertiesSection.editable = false;
- return propertiesSection.element;
-
- case "string":
- return "\"" + value.description + "\"";
-
- default:
- return value.description;
- }
- }
-
return WebInspector.DataGridNode.prototype.createCellContent.call(this, columnIdentifier, cell);
}
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.css (181612 => 181613)
--- trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.css 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.css 2015-03-17 04:41:34 UTC (rev 181613)
@@ -31,20 +31,6 @@
bottom: 0;
}
-.content-view.indexed-database-object-store > .data-grid td .section .header {
- padding: 0 0 0 18px;
- min-height: initial;
- color: inherit;
-}
-
-.content-view.indexed-database-object-store > .data-grid td .section .header::before {
- top: 2px;
-}
-
-.content-view.indexed-database-object-store > .data-grid td .section .header .title {
- line-height: initial;
-}
-
.content-view.indexed-database-object-store > .data-grid table.data {
background-image: none;
}
@@ -62,22 +48,15 @@
background-color: white;
}
-.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-closed-selected);
+.content-view.indexed-database-object-store > .data-grid tr.selected {
+ background-color: hsl(210, 90%, 90%) !important;
}
-.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-open-selected);
+.content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child) {
+ border-right-color: hsl(210, 70%, 75%);
}
-.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-closed-selected);
+.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before {
+ /* The line-height inside a data-grid is 17px instead of 13px, this will center vertically on the top line. */
+ top: 2px;
}
-
-.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-open-selected);
-}
-
-.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li * {
- color: inherit;
-}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css (181612 => 181613)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css 2015-03-17 04:41:31 UTC (rev 181612)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css 2015-03-17 04:41:34 UTC (rev 181613)
@@ -30,8 +30,8 @@
margin-bottom: 1px;
}
-.object-tree-array-index > .disclosure-button,
-.object-tree-array-index > .icon {
+.object-tree .object-tree-array-index > .disclosure-button,
+.object-tree .object-tree-array-index > .icon {
display: none;
}