Bug 26182

Summary: Need to be able to resize the columns in LocalStorage view in Web Inspector
Product: WebKit Reporter: Brady Eidson <beidson>
Component: Web Inspector (Deprecated)Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: jberlin, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable
timothy: review-
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized. none

Description Brady Eidson 2009-06-03 21:55:02 PDT
When you have some really long values in LocalStorage, the value column is too wide and cuts off the view of moderate length keys.

You should be able to resize the columns to reveal all of one at the expense of the other.
Comment 1 Jessie Berlin 2009-08-06 15:08:25 PDT
Created attachment 34231 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable

This patch makes the columns of the Local Storage View and the Profile View resizable.
Comment 2 Timothy Hatcher 2009-08-06 15:22:16 PDT
Comment on attachment 34231 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable

You will want to call updateWidths when the window resizes and when the sidebar resizes. Both of those cases will adjust the datagrid widths.

Take a look at ResourcesPanel's _updateSidebarWidth. At the end of that method it does:

        var visibleView = this.visibleView;
        if (visibleView && "resize" in visibleView)
            visibleView.resize();

You should add this to ResourcesPanel and ProfilesPanel. Then you can implement a resize method in ProfileView and DOMStorageItemsView to call updateWidths.

There is also a resize method on the Panel that is called when the window resizes. You should do what ResourcesPanel does in the other two panels (sans the _updateGraphDividersIfNeeded).

    resize: function()
    {
        this._updateGraphDividersIfNeeded();

        var visibleView = this.visibleView;
        if (visibleView && "resize" in visibleView)
            visibleView.resize();
    },

Otherwise the patch is correct.
Comment 3 Jessie Berlin 2009-08-06 20:11:46 PDT
Created attachment 34242 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized.

Made the changes that Tim mentioned above, which also required that the columnn widths be set to percentages instead of pixel values. 

That in turn requires the column widths to be initialized the first time updateWidths is called. That way, when a column is resized and percentages are added for the widths of that column and its neighboring column, all the other columns already have percentages for widths.
Comment 4 Jessie Berlin 2009-08-07 08:03:50 PDT
Comment on attachment 34242 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized.

committed in r46891