Bug 107441

Summary: Web Inspector: [Network] Add cookie column to show presence of request/response cookies.
Product: WebKit Reporter: Eugene Klyuchnikov <eustas>
Component: Web Inspector (Deprecated)Assignee: Eugene Klyuchnikov <eustas>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, caseq, eustas, gtk-ews, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, xan.lopez, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Screenshot
none
Patch
none
Screenshot: two columns
none
Patch none

Eugene Klyuchnikov
Reported 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.
Attachments
Patch (4.85 KB, patch)
2013-01-21 05:27 PST, Eugene Klyuchnikov
no flags
Patch (6.63 KB, patch)
2013-01-21 22:14 PST, Eugene Klyuchnikov
no flags
Patch (10.74 KB, patch)
2013-01-25 04:30 PST, Eugene Klyuchnikov
no flags
Patch (7.41 KB, patch)
2013-01-29 00:24 PST, Eugene Klyuchnikov
no flags
Screenshot (52.13 KB, image/png)
2013-01-29 05:18 PST, Eugene Klyuchnikov
no flags
Patch (7.50 KB, patch)
2013-01-29 05:26 PST, Eugene Klyuchnikov
no flags
Screenshot: two columns (49.66 KB, image/png)
2013-01-31 05:21 PST, Eugene Klyuchnikov
no flags
Patch (7.77 KB, patch)
2013-01-31 05:46 PST, Eugene Klyuchnikov
no flags
Eugene Klyuchnikov
Comment 1 2013-01-21 05:27:42 PST
Andrey Adaikin
Comment 2 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() ?
Andrey Adaikin
Comment 3 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 ?
Eugene Klyuchnikov
Comment 4 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.
Eugene Klyuchnikov
Comment 5 2013-01-21 22:14:51 PST
Pavel Feldman
Comment 6 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.
Eugene Klyuchnikov
Comment 7 2013-01-25 04:30:03 PST
Eugene Klyuchnikov
Comment 8 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.
Andrey Adaikin
Comment 9 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?
Pavel Feldman
Comment 10 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
Eugene Klyuchnikov
Comment 11 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.
Eugene Klyuchnikov
Comment 12 2013-01-29 00:24:22 PST
Pavel Feldman
Comment 13 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.
Eugene Klyuchnikov
Comment 14 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.
Eugene Klyuchnikov
Comment 15 2013-01-29 05:18:54 PST
Created attachment 185221 [details] Screenshot
Eugene Klyuchnikov
Comment 16 2013-01-29 05:26:40 PST
kov's GTK+ EWS bot
Comment 17 2013-01-29 08:24:19 PST
Pavel Feldman
Comment 18 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.
Andrey Adaikin
Comment 19 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); ?
Eugene Klyuchnikov
Comment 20 2013-01-31 05:21:37 PST
Created attachment 185757 [details] Screenshot: two columns
Eugene Klyuchnikov
Comment 21 2013-01-31 05:46:09 PST
WebKit Review Bot
Comment 22 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>
WebKit Review Bot
Comment 23 2013-01-31 06:54:36 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.