⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181613 in webkit


Ignore:
Timestamp:
Mar 16, 2015, 9:41:34 PM (11 years ago)
Author:
Joseph Pecoraro
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.

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181608 r181613  
     12015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Object Previews in Indexed DB tables
     4        https://bugs.webkit.org/show_bug.cgi?id=140813
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/InspectorIndexedDBAgent.cpp:
     9        Include previews with object store objects.
     10
    1112015-03-16  Jer Noble  <jer.noble@apple.com>
    212
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

    r180116 r181613  
    471471
    472472        RefPtr<DataEntry> dataEntry = DataEntry::create()
    473             .setKey(m_injectedScript.wrapObject(idbCursor->key(), String()))
    474             .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String()))
    475             .setValue(m_injectedScript.wrapObject(idbCursor->value(), String()))
     473            .setKey(m_injectedScript.wrapObject(idbCursor->key(), String(), true))
     474            .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String(), true))
     475            .setValue(m_injectedScript.wrapObject(idbCursor->value(), String(), true))
    476476            .release();
    477477        m_result->addItem(WTF::move(dataEntry));
  • trunk/Source/WebInspectorUI/ChangeLog

    r181612 r181613  
     12015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Object Previews in Indexed DB tables
     4        https://bugs.webkit.org/show_bug.cgi?id=140813
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/FormattedValue.js:
     9        (WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
     10        Add a boolean param for ObjectTree construction if it should force allowing object expansion.
     11
     12        * UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
     13        (WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
     14        Switch to creating an ObjectTree or FormattedValue.
     15
     16        * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
     17        (.content-view.indexed-database-object-store > .data-grid tr.selected):
     18        Change row selection color to match the console's lighter blue instead of dark blue.
     19
     20        (.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
     21        Adjust object tree disclosure triangle placement for larger line heights.
     22
     23        (.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
     24        (.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
     25        (.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
     26        (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
     27        (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
     28        (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
     29        (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
     30        (.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
     31        Remove now unnecessary styles.
     32
     33        * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
     34        (.object-tree .object-tree-array-index > .icon):
     35        Increase the specificity to override ".data-grid td .icon" styles.
     36
    1372015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
    238
  • trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js

    r181061 r181613  
    121121};
    122122
    123 WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject = function(object, propertyPath)
     123WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject = function(object, propertyPath, forceExpanding)
    124124{
    125125    if (object.subtype === "node")
     
    127127
    128128    if (object.type === "object") {
    129         var objectTree = new WebInspector.ObjectTreeView(object, WebInspector.ObjectTreeView.Mode.Properties, propertyPath);
     129        var objectTree = new WebInspector.ObjectTreeView(object, WebInspector.ObjectTreeView.Mode.Properties, propertyPath, forceExpanding);
    130130        return objectTree.element;
    131131    }
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseEntryDataGridNode.js

    r164543 r181613  
    4545    {
    4646        var value = this._entry[columnIdentifier];
    47 
    48         if (value instanceof WebInspector.RemoteObject) {
    49             switch (value.type) {
    50             case "object":
    51             case "array":
    52                 var propertiesSection = new WebInspector.ObjectPropertiesSection(value, value.description);
    53                 propertiesSection.editable = false;
    54                 return propertiesSection.element;
    55 
    56             case "string":
    57                 return "\"" + value.description + "\"";
    58 
    59             default:
    60                 return value.description;
    61             }
    62         }
     47        if (value instanceof WebInspector.RemoteObject)
     48            return WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject(value, null, true);
    6349
    6450        return WebInspector.DataGridNode.prototype.createCellContent.call(this, columnIdentifier, cell);
  • trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.css

    r172399 r181613  
    3232}
    3333
    34 .content-view.indexed-database-object-store > .data-grid td .section .header {
    35     padding: 0 0 0 18px;
    36     min-height: initial;
    37     color: inherit;
    38 }
    39 
    40 .content-view.indexed-database-object-store > .data-grid td .section .header::before {
    41     top: 2px;
    42 }
    43 
    44 .content-view.indexed-database-object-store > .data-grid td .section .header .title {
    45     line-height: initial;
    46 }
    47 
    4834.content-view.indexed-database-object-store > .data-grid table.data {
    4935    background-image: none;
     
    6349}
    6450
    65 .content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before {
    66     background-image: -webkit-canvas(disclosure-triangle-tiny-closed-selected);
     51.content-view.indexed-database-object-store > .data-grid tr.selected {
     52    background-color: hsl(210, 90%, 90%) !important;
    6753}
    6854
    69 .content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before {
    70     background-image: -webkit-canvas(disclosure-triangle-tiny-open-selected);
     55.content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child) {
     56    border-right-color: hsl(210, 70%, 75%);
    7157}
    7258
    73 .content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before {
    74     background-image: -webkit-canvas(disclosure-triangle-tiny-closed-selected);
     59.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before {
     60 /* The line-height inside a data-grid is 17px instead of 13px, this will center vertically on the top line. */
     61    top: 2px;
    7562}
    76 
    77 .content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before {
    78     background-image: -webkit-canvas(disclosure-triangle-tiny-open-selected);
    79 }
    80 
    81 .content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li * {
    82     color: inherit;
    83 }
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css

    r180713 r181613  
    3131}
    3232
    33 .object-tree-array-index > .disclosure-button,
    34 .object-tree-array-index > .icon {
     33.object-tree .object-tree-array-index > .disclosure-button,
     34.object-tree .object-tree-array-index > .icon {
    3535    display: none;
    3636}
Note: See TracChangeset for help on using the changeset viewer.