Bug 128783 - Web Inspector: DataGrid should have an API to set sort column and direction
Summary: Web Inspector: DataGrid should have an API to set sort column and direction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-13 17:42 PST by BJ Burg
Modified: 2014-03-12 11:18 PDT (History)
3 users (show)

See Also:


Attachments
the patch (44.40 KB, patch)
2014-03-11 16:27 PDT, BJ Burg
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2014-02-13 17:42:40 PST
Some tables (such as DOMStorageView) should have a default sort column rather than displaying rows in a possibly undefined order. However, the code to update the actual sort column and direction is stuck within a click event handler.
Comment 1 Radar WebKit Bug Importer 2014-02-13 17:43:22 PST
<rdar://problem/16066438>
Comment 2 BJ Burg 2014-03-11 16:27:42 PDT
Created attachment 226446 [details]
the patch
Comment 3 Timothy Hatcher 2014-03-12 11:07:46 PDT
Comment on attachment 226446 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=226446&action=review

> Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js:204
> +        switch (this._dataGrid.sortColumnIdentifier || "url") {
> +            case "url": comparator = localeCompare.bind(this, "url"); break;

Just use default:?

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:82
> +            var columns = { name: {}, value: {}, domain: {}, path: {}, expires: {}, size: {}, http: {}, secure: {}};

No space after {.

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:141
> +            };
> +            if (cookie.type !== WebInspector.CookieType.Request)

Add a newline.
Comment 4 BJ Burg 2014-03-12 11:18:58 PDT
Committed r165487: <http://trac.webkit.org/changeset/165487>