RESOLVED FIXED 107511
Web Inspector: [Network] CookiesTable refactoring.
https://bugs.webkit.org/show_bug.cgi?id=107511
Summary Web Inspector: [Network] CookiesTable refactoring.
Eugene Klyuchnikov
Reported 2013-01-21 23:57:48 PST
CookiesTable uses integer indexes as column identifiers. This leads to cryptic code. Descriptive column identifiers will make code clearer. Also "addCookiesFolder" replaced with "setCookieFolders" to avoid repetitive "_rebuildTable" invocation.
Attachments
Patch (10.62 KB, patch)
2013-01-22 00:02 PST, Eugene Klyuchnikov
no flags
Eugene Klyuchnikov
Comment 1 2013-01-22 00:02:22 PST
Andrey Adaikin
Comment 2 2013-01-22 00:16:52 PST
Comment on attachment 183902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183902&action=review > Source/WebCore/inspector/front-end/CookiesTable.js:43 > + var columns = {name: {}, value: {}, domain: {}, path: {}, expires: {}, size: {}, httpOnly: {}, secure: {}}; FYI. ECMAScript5, 12.6.4 "The for-in Statement": "The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is not specified."
Eugene Klyuchnikov
Comment 3 2013-01-22 00:39:56 PST
Comment on attachment 183902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183902&action=review >> Source/WebCore/inspector/front-end/CookiesTable.js:43 >> + var columns = {name: {}, value: {}, domain: {}, path: {}, expires: {}, size: {}, httpOnly: {}, secure: {}}; > > FYI. > ECMAScript5, 12.6.4 "The for-in Statement": > "The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is not specified." With explicit keys it will be not worse than with implicit keys (because this is object, not array). But in general, I agree, we should make column ordering more clear one day.
WebKit Review Bot
Comment 4 2013-01-22 03:59:00 PST
Comment on attachment 183902 [details] Patch Clearing flags on attachment: 183902 Committed r140408: <http://trac.webkit.org/changeset/140408>
WebKit Review Bot
Comment 5 2013-01-22 03:59:03 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.