OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._willReloadPage,
this); | 84 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._willReloadPage,
this); |
85 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNav
igated, this); | 85 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNav
igated, this); |
86 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this); | 86 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this); |
87 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._domContentLoad
edEventFired, this); | 87 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._domContentLoad
edEventFired, this); |
88 } | 88 } |
89 | 89 |
90 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr
ue, "wss": true}; | 90 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr
ue, "wss": true}; |
91 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti
on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified"
, "Server", "Vary"]; | 91 WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connecti
on", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified"
, "Server", "Vary"]; |
92 WebInspector.NetworkLogView.defaultColumnsVisibility = { | 92 WebInspector.NetworkLogView.defaultColumnsVisibility = { |
93 method: true, status: true, scheme: false, domain: false, remoteAddress: fal
se, type: true, initiator: true, cookies: false, setCookies: false, size: true,
time: true, | 93 method: true, status: true, scheme: false, domain: false, remoteAddress: fal
se, type: true, initiator: true, cookies: false, setCookies: false, size: true,
time: true, connectionId: false, |
94 "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Con
tent-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false,
"Server": false, "Vary": false | 94 "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Con
tent-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false,
"Server": false, "Vary": false |
95 }; | 95 }; |
96 WebInspector.NetworkLogView._defaultRefreshDelay = 500; | 96 WebInspector.NetworkLogView._defaultRefreshDelay = 500; |
97 | 97 |
98 /** @enum {string} */ | 98 /** @enum {string} */ |
99 WebInspector.NetworkLogView.FilterType = { | 99 WebInspector.NetworkLogView.FilterType = { |
100 Domain: "Domain", | 100 Domain: "Domain", |
101 HasResponseHeader: "HasResponseHeader", | 101 HasResponseHeader: "HasResponseHeader", |
102 Method: "Method", | 102 Method: "Method", |
103 MimeType: "MimeType", | 103 MimeType: "MimeType", |
(...skipping 13 matching lines...) Expand all Loading... |
117 "status": WebInspector.UIString("Status"), | 117 "status": WebInspector.UIString("Status"), |
118 "scheme": WebInspector.UIString("Scheme"), | 118 "scheme": WebInspector.UIString("Scheme"), |
119 "domain": WebInspector.UIString("Domain"), | 119 "domain": WebInspector.UIString("Domain"), |
120 "remoteAddress": WebInspector.UIString("Remote Address"), | 120 "remoteAddress": WebInspector.UIString("Remote Address"), |
121 "type": WebInspector.UIString("Type"), | 121 "type": WebInspector.UIString("Type"), |
122 "initiator": WebInspector.UIString("Initiator"), | 122 "initiator": WebInspector.UIString("Initiator"), |
123 "cookies": WebInspector.UIString("Cookies"), | 123 "cookies": WebInspector.UIString("Cookies"), |
124 "setCookies": WebInspector.UIString("Set-Cookies"), | 124 "setCookies": WebInspector.UIString("Set-Cookies"), |
125 "size": WebInspector.UIString("Size"), | 125 "size": WebInspector.UIString("Size"), |
126 "time": WebInspector.UIString("Time"), | 126 "time": WebInspector.UIString("Time"), |
| 127 "connectionId": WebInspector.UIString("Connection Id"), |
127 "timeline": WebInspector.UIString("Timeline"), | 128 "timeline": WebInspector.UIString("Timeline"), |
128 | 129 |
129 // Response header columns | 130 // Response header columns |
130 "Cache-Control": WebInspector.UIString("Cache-Control"), | 131 "Cache-Control": WebInspector.UIString("Cache-Control"), |
131 "Connection": WebInspector.UIString("Connection"), | 132 "Connection": WebInspector.UIString("Connection"), |
132 "Content-Encoding": WebInspector.UIString("Content-Encoding"), | 133 "Content-Encoding": WebInspector.UIString("Content-Encoding"), |
133 "Content-Length": WebInspector.UIString("Content-Length"), | 134 "Content-Length": WebInspector.UIString("Content-Length"), |
134 "ETag": WebInspector.UIString("ETag"), | 135 "ETag": WebInspector.UIString("ETag"), |
135 "Keep-Alive": WebInspector.UIString("Keep-Alive"), | 136 "Keep-Alive": WebInspector.UIString("Keep-Alive"), |
136 "Last-Modified": WebInspector.UIString("Last-Modified"), | 137 "Last-Modified": WebInspector.UIString("Last-Modified"), |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 357 |
357 columns.push({ | 358 columns.push({ |
358 id: "time", | 359 id: "time", |
359 titleDOMFragment: this._makeHeaderFragment(WebInspector.UIString("Ti
me"), WebInspector.UIString("Latency")), | 360 titleDOMFragment: this._makeHeaderFragment(WebInspector.UIString("Ti
me"), WebInspector.UIString("Latency")), |
360 title: WebInspector.NetworkLogView._columnTitles["time"], | 361 title: WebInspector.NetworkLogView._columnTitles["time"], |
361 sortable: true, | 362 sortable: true, |
362 weight: 6, | 363 weight: 6, |
363 align: WebInspector.DataGrid.Align.Right | 364 align: WebInspector.DataGrid.Align.Right |
364 }); | 365 }); |
365 | 366 |
| 367 columns.push({ |
| 368 id: "connectionId", |
| 369 title: WebInspector.NetworkLogView._columnTitles["connectionId"], |
| 370 sortable: true, |
| 371 weight: 6 |
| 372 }); |
| 373 |
366 var responseHeaderColumns = WebInspector.NetworkLogView._responseHeaderC
olumns; | 374 var responseHeaderColumns = WebInspector.NetworkLogView._responseHeaderC
olumns; |
367 for (var i = 0; i < responseHeaderColumns.length; ++i) { | 375 for (var i = 0; i < responseHeaderColumns.length; ++i) { |
368 var headerName = responseHeaderColumns[i]; | 376 var headerName = responseHeaderColumns[i]; |
369 var descriptor = { | 377 var descriptor = { |
370 id: headerName, | 378 id: headerName, |
371 title: WebInspector.NetworkLogView._columnTitles[headerName], | 379 title: WebInspector.NetworkLogView._columnTitles[headerName], |
372 weight: 6 | 380 weight: 6 |
373 } | 381 } |
374 if (headerName === "Content-Length") | 382 if (headerName === "Content-Length") |
375 descriptor.align = WebInspector.DataGrid.Align.Right; | 383 descriptor.align = WebInspector.DataGrid.Align.Right; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 this._sortingFunctions.status = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "statusCode", false); | 474 this._sortingFunctions.status = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "statusCode", false); |
467 this._sortingFunctions.scheme = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "scheme", false); | 475 this._sortingFunctions.scheme = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "scheme", false); |
468 this._sortingFunctions.domain = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "domain", false); | 476 this._sortingFunctions.domain = WebInspector.NetworkDataGridNode.Request
PropertyComparator.bind(null, "domain", false); |
469 this._sortingFunctions.remoteAddress = WebInspector.NetworkDataGridNode.
RemoteAddressComparator; | 477 this._sortingFunctions.remoteAddress = WebInspector.NetworkDataGridNode.
RemoteAddressComparator; |
470 this._sortingFunctions.type = WebInspector.NetworkDataGridNode.RequestPr
opertyComparator.bind(null, "mimeType", false); | 478 this._sortingFunctions.type = WebInspector.NetworkDataGridNode.RequestPr
opertyComparator.bind(null, "mimeType", false); |
471 this._sortingFunctions.initiator = WebInspector.NetworkDataGridNode.Init
iatorComparator; | 479 this._sortingFunctions.initiator = WebInspector.NetworkDataGridNode.Init
iatorComparator; |
472 this._sortingFunctions.cookies = WebInspector.NetworkDataGridNode.Reques
tCookiesCountComparator; | 480 this._sortingFunctions.cookies = WebInspector.NetworkDataGridNode.Reques
tCookiesCountComparator; |
473 this._sortingFunctions.setCookies = WebInspector.NetworkDataGridNode.Res
ponseCookiesCountComparator; | 481 this._sortingFunctions.setCookies = WebInspector.NetworkDataGridNode.Res
ponseCookiesCountComparator; |
474 this._sortingFunctions.size = WebInspector.NetworkDataGridNode.SizeCompa
rator; | 482 this._sortingFunctions.size = WebInspector.NetworkDataGridNode.SizeCompa
rator; |
475 this._sortingFunctions.time = WebInspector.NetworkDataGridNode.RequestPr
opertyComparator.bind(null, "duration", false); | 483 this._sortingFunctions.time = WebInspector.NetworkDataGridNode.RequestPr
opertyComparator.bind(null, "duration", false); |
| 484 this._sortingFunctions.connectionId = WebInspector.NetworkDataGridNode.R
equestPropertyComparator.bind(null, "connectionId", false); |
476 this._sortingFunctions.timeline = WebInspector.NetworkDataGridNode.Reque
stPropertyComparator.bind(null, "startTime", false); | 485 this._sortingFunctions.timeline = WebInspector.NetworkDataGridNode.Reque
stPropertyComparator.bind(null, "startTime", false); |
477 this._sortingFunctions.startTime = WebInspector.NetworkDataGridNode.Requ
estPropertyComparator.bind(null, "startTime", false); | 486 this._sortingFunctions.startTime = WebInspector.NetworkDataGridNode.Requ
estPropertyComparator.bind(null, "startTime", false); |
478 this._sortingFunctions.endTime = WebInspector.NetworkDataGridNode.Reques
tPropertyComparator.bind(null, "endTime", false); | 487 this._sortingFunctions.endTime = WebInspector.NetworkDataGridNode.Reques
tPropertyComparator.bind(null, "endTime", false); |
479 this._sortingFunctions.responseTime = WebInspector.NetworkDataGridNode.R
equestPropertyComparator.bind(null, "responseReceivedTime", false); | 488 this._sortingFunctions.responseTime = WebInspector.NetworkDataGridNode.R
equestPropertyComparator.bind(null, "responseReceivedTime", false); |
480 this._sortingFunctions.duration = WebInspector.NetworkDataGridNode.Reque
stPropertyComparator.bind(null, "duration", true); | 489 this._sortingFunctions.duration = WebInspector.NetworkDataGridNode.Reque
stPropertyComparator.bind(null, "duration", true); |
481 this._sortingFunctions.latency = WebInspector.NetworkDataGridNode.Reques
tPropertyComparator.bind(null, "latency", true); | 490 this._sortingFunctions.latency = WebInspector.NetworkDataGridNode.Reques
tPropertyComparator.bind(null, "latency", true); |
482 }, | 491 }, |
483 | 492 |
484 _createCalculators: function() | 493 _createCalculators: function() |
485 { | 494 { |
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2546 switch (columnIdentifier) { | 2555 switch (columnIdentifier) { |
2547 case "name": this._renderNameCell(cell); break; | 2556 case "name": this._renderNameCell(cell); break; |
2548 case "timeline": this._createTimelineBar(cell); break; | 2557 case "timeline": this._createTimelineBar(cell); break; |
2549 case "method": cell.setTextAndTitle(this._request.requestMethod); break; | 2558 case "method": cell.setTextAndTitle(this._request.requestMethod); break; |
2550 case "status": this._renderStatusCell(cell); break; | 2559 case "status": this._renderStatusCell(cell); break; |
2551 case "scheme": cell.setTextAndTitle(this._request.scheme); break; | 2560 case "scheme": cell.setTextAndTitle(this._request.scheme); break; |
2552 case "domain": cell.setTextAndTitle(this._request.domain); break; | 2561 case "domain": cell.setTextAndTitle(this._request.domain); break; |
2553 case "remoteAddress": cell.setTextAndTitle(this._request.remoteAddress()
); break; | 2562 case "remoteAddress": cell.setTextAndTitle(this._request.remoteAddress()
); break; |
2554 case "cookies": cell.setTextAndTitle(this._arrayLength(this._request.req
uestCookies)); break; | 2563 case "cookies": cell.setTextAndTitle(this._arrayLength(this._request.req
uestCookies)); break; |
2555 case "setCookies": cell.setTextAndTitle(this._arrayLength(this._request.
responseCookies)); break; | 2564 case "setCookies": cell.setTextAndTitle(this._arrayLength(this._request.
responseCookies)); break; |
| 2565 case "connectionId": cell.setTextAndTitle(this._request.connectionId); b
reak; |
2556 case "type": cell.setTextAndTitle(this._request.mimeType || this._reques
t.requestContentType() || ""); break; | 2566 case "type": cell.setTextAndTitle(this._request.mimeType || this._reques
t.requestContentType() || ""); break; |
2557 case "initiator": this._renderInitiatorCell(cell); break; | 2567 case "initiator": this._renderInitiatorCell(cell); break; |
2558 case "size": this._renderSizeCell(cell); break; | 2568 case "size": this._renderSizeCell(cell); break; |
2559 case "time": this._renderTimeCell(cell); break; | 2569 case "time": this._renderTimeCell(cell); break; |
2560 default: cell.setTextAndTitle(this._request.responseHeaderValue(columnId
entifier) || ""); break; | 2570 default: cell.setTextAndTitle(this._request.responseHeaderValue(columnId
entifier) || ""); break; |
2561 } | 2571 } |
2562 | 2572 |
2563 return cell; | 2573 return cell; |
2564 }, | 2574 }, |
2565 | 2575 |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) | 3054 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) |
3045 { | 3055 { |
3046 var aValue = a._request[propertyName]; | 3056 var aValue = a._request[propertyName]; |
3047 var bValue = b._request[propertyName]; | 3057 var bValue = b._request[propertyName]; |
3048 if (aValue > bValue) | 3058 if (aValue > bValue) |
3049 return revert ? -1 : 1; | 3059 return revert ? -1 : 1; |
3050 if (bValue > aValue) | 3060 if (bValue > aValue) |
3051 return revert ? 1 : -1; | 3061 return revert ? 1 : -1; |
3052 return a._request.indentityCompare(b._request); | 3062 return a._request.indentityCompare(b._request); |
3053 } | 3063 } |
OLD | NEW |