Bug 107441 - Web Inspector: [Network] Add cookie column to show presence of request/response cookies.
Summary: Web Inspector: [Network] Add cookie column to show presence of request/respon...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-21 05:22 PST by Eugene Klyuchnikov
Modified: 2013-01-31 06:54 PST (History)
13 users (show)

See Also:


Attachments
Patch (4.85 KB, patch)
2013-01-21 05:27 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (6.63 KB, patch)
2013-01-21 22:14 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (10.74 KB, patch)
2013-01-25 04:30 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (7.41 KB, patch)
2013-01-29 00:24 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Screenshot (52.13 KB, image/png)
2013-01-29 05:18 PST, Eugene Klyuchnikov
no flags Details
Patch (7.50 KB, patch)
2013-01-29 05:26 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Screenshot: two columns (49.66 KB, image/png)
2013-01-31 05:21 PST, Eugene Klyuchnikov
no flags Details
Patch (7.77 KB, patch)
2013-01-31 05:46 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Klyuchnikov 2013-01-21 05:22:59 PST
In some use cases only responses that contain "set-cookie" header are interesting.

We should add a control to filter out items that do not bring "set-cookie" headers.
Comment 1 Eugene Klyuchnikov 2013-01-21 05:27:42 PST
Created attachment 183763 [details]
Patch
Comment 2 Andrey Adaikin 2013-01-21 06:46:07 PST
Comment on attachment 183763 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:2039
> +            element.addStyleClass("network-has-cookies-in-response");

element.enableStyleClass() ?
Comment 3 Andrey Adaikin 2013-01-21 06:47:44 PST
Comment on attachment 183763 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:353
> +        filterBarElement.title = "Use Ctrl-click to select multiple types.";

WebInspector.UIString ?
Comment 4 Eugene Klyuchnikov 2013-01-21 22:13:55 PST
Comment on attachment 183763 [details]
Patch

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

>> Source/WebCore/inspector/front-end/NetworkPanel.js:353
>> +        filterBarElement.title = "Use Ctrl-click to select multiple types.";
> 
> WebInspector.UIString ?

Definitely. Done.

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2039
>> +            element.addStyleClass("network-has-cookies-in-response");
> 
> element.enableStyleClass() ?

Fixed. Thanks.
Comment 5 Eugene Klyuchnikov 2013-01-21 22:14:51 PST
Created attachment 183891 [details]
Patch
Comment 6 Pavel Feldman 2013-01-21 23:56:32 PST
Comment on attachment 183891 [details]
Patch

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

I was thinking that if we had a new column (Cookies Set), that would be not visible by default, we would be able to sort by it.

> Source/WebCore/English.lproj/localizedStrings.js:437
> +localizedStrings["Use Ctrl-click to select multiple types."] = "Use Ctrl-click to select multiple types.";

It is probably going to Cmd+click on Mac.
Comment 7 Eugene Klyuchnikov 2013-01-25 04:30:03 PST
Created attachment 184724 [details]
Patch
Comment 8 Eugene Klyuchnikov 2013-01-25 04:30:48 PST
Comment on attachment 183891 [details]
Patch

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

>> Source/WebCore/English.lproj/localizedStrings.js:437
>> +localizedStrings["Use Ctrl-click to select multiple types."] = "Use Ctrl-click to select multiple types.";
> 
> It is probably going to Cmd+click on Mac.

Fixed.
Comment 9 Andrey Adaikin 2013-01-25 07:25:36 PST
Comment on attachment 184724 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:2231
> +        this._cookiesCell.appendChild(document.createTextNode(value.join("")));

this._cookiesCell.createTextChild(value.join("")); ?

> Source/WebCore/inspector/front-end/NetworkPanel.js:2412
> +    if (aCookiesReceived < bCookiesReceived) {

comparing booleans? did you mean it?
Comment 10 Pavel Feldman 2013-01-28 01:17:55 PST
Comment on attachment 184724 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:378
> +        filterBarElement.createChild("div", "scope-bar-divider");

Please extract this change.

> Source/WebCore/inspector/front-end/NetworkPanel.js:1124
> +                row.enableStyleClass("offscreen", !rowIsVisible);

ditto
Comment 11 Eugene Klyuchnikov 2013-01-29 00:15:27 PST
Comment on attachment 184724 [details]
Patch

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

>> Source/WebCore/inspector/front-end/NetworkPanel.js:378
>> +        filterBarElement.createChild("div", "scope-bar-divider");
> 
> Please extract this change.

Done

>> Source/WebCore/inspector/front-end/NetworkPanel.js:1124
>> +                row.enableStyleClass("offscreen", !rowIsVisible);
> 
> ditto

Fixed.

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2231
>> +        this._cookiesCell.appendChild(document.createTextNode(value.join("")));
> 
> this._cookiesCell.createTextChild(value.join("")); ?

Done

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2412
>> +    if (aCookiesReceived < bCookiesReceived) {
> 
> comparing booleans? did you mean it?

Surely. But well, I'll make it more clear.
Comment 12 Eugene Klyuchnikov 2013-01-29 00:24:22 PST
Created attachment 185184 [details]
Patch
Comment 13 Pavel Feldman 2013-01-29 02:56:26 PST
Comment on attachment 185184 [details]
Patch

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

Please provide a screenshot. r- for unclear sorting.

> Source/WebCore/inspector/front-end/NetworkPanel.js:2228
> +        var responseCookies = this._request.responseCookies;

What about bidirectional arrow for the case or receive / send? Like U+21D0, U+21D2, U+21D4 (see http://en.wikipedia.org/wiki/Template:Unicode_chart_Arrows)

> Source/WebCore/inspector/front-end/NetworkPanel.js:2230
> +            value.push("\u25BC");

// Down triangle

> Source/WebCore/inspector/front-end/NetworkPanel.js:2235
> +            value.push("\u25B2");

// Up triangle

> Source/WebCore/inspector/front-end/NetworkPanel.js:2414
> +    var aScore = (a._request.responseCookies && a._request.responseCookies.length) ? 2 : 0;

I'd rather sort in the following manner: first sort by set-cookie, then sort by cookie, then the rest.
Comment 14 Eugene Klyuchnikov 2013-01-29 05:16:06 PST
Comment on attachment 185184 [details]
Patch

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

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2228
>> +        var responseCookies = this._request.responseCookies;
> 
> What about bidirectional arrow for the case or receive / send? Like U+21D0, U+21D2, U+21D4 (see http://en.wikipedia.org/wiki/Template:Unicode_chart_Arrows)

Double-arrows look ugly =(

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2230
>> +            value.push("\u25BC");
> 
> // Down triangle

Done.

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2235
>> +            value.push("\u25B2");
> 
> // Up triangle

Done.

>> Source/WebCore/inspector/front-end/NetworkPanel.js:2414
>> +    var aScore = (a._request.responseCookies && a._request.responseCookies.length) ? 2 : 0;
> 
> I'd rather sort in the following manner: first sort by set-cookie, then sort by cookie, then the rest.

This code does exactly as you said: first go set-cookie + cookie, then set-cookie alone, then cookie, and cookie free at the end.
Comment 15 Eugene Klyuchnikov 2013-01-29 05:18:54 PST
Created attachment 185221 [details]
Screenshot
Comment 16 Eugene Klyuchnikov 2013-01-29 05:26:40 PST
Created attachment 185222 [details]
Patch
Comment 17 kov's GTK+ EWS bot 2013-01-29 08:24:19 PST
Comment on attachment 185222 [details]
Patch

Attachment 185222 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/16183206
Comment 18 Pavel Feldman 2013-01-30 03:30:28 PST
> Double-arrows look ugly =(

Not as ugly as the screenshot attached to my taste!

> > 
> > I'd rather sort in the following manner: first sort by set-cookie, then sort by cookie, then the rest.
> 
> This code does exactly as you said: first go set-cookie + cookie, then set-cookie alone, then cookie, and cookie free at the end.

I don't see it sorting by the number of cookies.
Comment 19 Andrey Adaikin 2013-01-30 03:47:57 PST
Comment on attachment 185222 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:2417
> +    var bScore = (b._request.responseCookies && b._request.responseCookies.length) ? 2 : 0;

function score()
{
   ...
}
return score(b) - score(a); ?
Comment 20 Eugene Klyuchnikov 2013-01-31 05:21:37 PST
Created attachment 185757 [details]
Screenshot: two columns
Comment 21 Eugene Klyuchnikov 2013-01-31 05:46:09 PST
Created attachment 185762 [details]
Patch
Comment 22 WebKit Review Bot 2013-01-31 06:54:31 PST
Comment on attachment 185762 [details]
Patch

Clearing flags on attachment: 185762

Committed r141417: <http://trac.webkit.org/changeset/141417>
Comment 23 WebKit Review Bot 2013-01-31 06:54:36 PST
All reviewed patches have been landed.  Closing bug.