Commit 485d754
Web Inspector: Show each individual requests when there are redirects
https://bugs.webkit.org/show_bug.cgi?id=293708
rdar://152606018
Reviewed by BJ Burg and Devin Rousso.
This change surfaces individual redirect information in the Network tab by allowing users
to click on redirect entries to view detailed information across multiple tabs (Preview,
Headers, Cookies, Sizes, Timing, and Security) as well as the right click context utility menu.
Limitations:
Due to backend constraints, redirects have incomplete information compared to full resources (see https://webkit.org/b/190214):
- Timing: Only a single timestamp is available (no breakdown of DNS, connection, etc.)
- Security: No certificate or detailed security information
- Sizes: Only estimated from header lengths (no actual body size data)
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Base/Main.js:
* Source/WebInspectorUI/UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.async buildArchive):
(WI.HARBuilder.entry):
(WI.HARBuilder.requestForRedirect):
(WI.HARBuilder.responseForRedirect):
(WI.HARBuilder.timingsForRedirect):
* Source/WebInspectorUI/UserInterface/Main.html:
* Source/WebInspectorUI/UserInterface/Models/Redirect.js:
(WI.Redirect):
(WI.Redirect.prototype.generateFetchCode):
(WI.Redirect.prototype.generateCURLCommand):
(WI.Redirect.prototype.stringifyHTTPRequestHeaders):
(WI.Redirect.prototype.stringifyHTTPResponseHeaders):
* Source/WebInspectorUI/UserInterface/Models/Resource.js:
(WI.Resource.prototype.updateForRedirectResponse):
(WI.Resource.prototype.generateFetchCode):
(WI.Resource.prototype.generateCURLCommand):
(WI.Resource.prototype.stringifyHTTPRequestHeaders):
(WI.Resource.prototype.stringifyHTTPResponseHeaders):
(WI.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter): Deleted.
(WI.Resource.prototype.generateCURLCommand.escapeStringPosix): Deleted.
* Source/WebInspectorUI/UserInterface/Models/ResourceUtilities.js: Added.
(WI.ResourceUtilities.generateFetchCode):
(WI.ResourceUtilities.generateCURLCommand.escapeStringPosix.escapeCharacter):
(WI.ResourceUtilities.generateCURLCommand.escapeStringPosix):
(WI.ResourceUtilities.generateCURLCommand):
(WI.ResourceUtilities):
* Source/WebInspectorUI/UserInterface/Test.html:
* Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.js:
(WI.CallFrameTreeElement.prototype.populateContextMenu):
* Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForNetworkResource):
(WI.appendContextMenuItemsForSourceCode):
* Source/WebInspectorUI/UserInterface/Views/NetworkRedirectDetailView.js: Added.
(WI.NetworkRedirectDetailView):
(WI.NetworkRedirectDetailView.prototype.showParentResource):
(WI.NetworkRedirectDetailView.prototype.initialLayout):
(WI.NetworkRedirectDetailView.prototype.showContentViewForIdentifier):
* Source/WebInspectorUI/UserInterface/Views/NetworkRedirectHeadersContentView.js: Added.
(WI.NetworkRedirectHeadersContentView):
(WI.NetworkRedirectHeadersContentView.prototype.initialLayout):
(WI.NetworkRedirectHeadersContentView.prototype._createSortedArrayForHeaders):
* Source/WebInspectorUI/UserInterface/Views/NetworkResourceDetailView.js:
(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.showRedirect):
(WI.NetworkResourceDetailView.prototype.showRepresentedObject):
(WI.NetworkResourceDetailView.prototype.showContentViewForIdentifier):
* Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table .cell.name .disclosure):
(body[dir=rtl] .network-table > .table .cell.name .disclosure):
(.network-table:focus > .table li.selected .cell.name .disclosure):
(.network-table > .table .cell.name .disclosure.expanded):
(.network-table:focus > .table li.selected .cell.name .disclosure.expanded):
(.network-table > .table .cell.name.child):
(.table.network-table .data-container .data-list > li.redirect .cell:not(.name)):
(.table.network-table.grouped .data-container .cell.name.parent):
(.table.network-table.grouped .data-container .cell.name:not(.parent):not(.child)):
(.network-table > .table .data-container .cell.name .redirect-count):
(.network-table:focus > .table li.selected .cell.name .redirect-count):
(.network-table > .table li.selected .cell.name .redirect-count):
(@media (prefers-color-scheme: dark) .network-table > .table .data-container .cell.name .redirect-count):
(.network-table > .table.grouped .data-container .cell.name): Deleted.
(.network-table > .table.grouped .data-container .cell:not(.parent).name): Deleted.
(.network-table > .table.grouped .data-container .cell.child.name): Deleted.
* Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.closed):
(WI.NetworkTableContentView.prototype.showRepresentedObject):
(WI.NetworkTableContentView.prototype.networkRedirectDetailViewShowParentResource):
(WI.NetworkTableContentView.prototype.networkRedirectHeadersContentViewShowRedirect):
(WI.NetworkTableContentView.prototype.networkRedirectHeadersContentViewShowParentResource):
(WI.NetworkTableContentView.prototype.showRedirect):
(WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
(WI.NetworkTableContentView.prototype.tableSelectionDidChange):
(WI.NetworkTableContentView.prototype.tablePopulateCell):
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateInitiatorCell):
(WI.NetworkTableContentView.prototype._processPendingEntries):
(WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject):
(WI.NetworkTableContentView.prototype._updateEntryForResource):
(WI.NetworkTableContentView.prototype._populateRedirectEntriesForResourceEntry):
(WI.NetworkTableContentView.prototype._showDetailView):
(WI.NetworkTableContentView.prototype._resourceRedirectsDidChange):
(WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
(WI.NetworkTableContentView.prototype._entryForResource):
(WI.NetworkTableContentView.prototype._entryForRedirect):
(WI.NetworkTableContentView.prototype._estimateHeaderSize):
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._reloadTable):
(WI.NetworkTableContentView.prototype._HARResources):
* Source/WebInspectorUI/UserInterface/Views/ResourceCookiesContentView.js:
(WI.ResourceCookiesContentView):
(WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
(WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
* Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSection.css:
(.resource-details > section > .title):
(.resource-details > section > .title > .redirect-nav-link):
(.resource-details > section:not(:hover) > .title > .redirect-nav-link):
* Source/WebInspectorUI/UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView):
(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
(WI.ResourceHeadersContentView.prototype._refreshRedirectHeadersSections):
(WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
(WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
* Source/WebInspectorUI/UserInterface/Views/ResourceSizesContentView.css:
(.resource-sizes > .content > section.note-section):
(.resource-sizes > .content > section.note-section .note):
* Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js:
(WI.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
* Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype.populateContextMenu):
* Source/WebInspectorUI/UserInterface/Views/Table.css:
(.table .cell):
* Source/WebInspectorUI/UserInterface/Views/WorkerTreeElement.js:
(WI.WorkerTreeElement.prototype.populateContextMenu):
Canonical link: https://commits.webkit.org/306537@main1 parent 84a28d9 commit 485d754
File tree
23 files changed
+1044
-218
lines changed- Source/WebInspectorUI
- Localizations/en.lproj
- UserInterface
- Base
- Controllers
- Models
- Views
23 files changed
+1044
-218
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1722 | 1722 | | |
1723 | 1723 | | |
1724 | 1724 | | |
| 1725 | + | |
| 1726 | + | |
1725 | 1727 | | |
1726 | 1728 | | |
1727 | 1729 | | |
| |||
1923 | 1925 | | |
1924 | 1926 | | |
1925 | 1927 | | |
| 1928 | + | |
| 1929 | + | |
1926 | 1930 | | |
1927 | 1931 | | |
1928 | 1932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
2814 | 2814 | | |
2815 | 2815 | | |
2816 | 2816 | | |
2817 | | - | |
| 2817 | + | |
2818 | 2818 | | |
2819 | 2819 | | |
2820 | 2820 | | |
| |||
Lines changed: 84 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | | - | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
54 | | - | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
94 | 122 | | |
95 | 123 | | |
96 | 124 | | |
| |||
111 | 139 | | |
112 | 140 | | |
113 | 141 | | |
114 | | - | |
| 142 | + | |
115 | 143 | | |
116 | 144 | | |
117 | 145 | | |
| |||
285 | 313 | | |
286 | 314 | | |
287 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
288 | 363 | | |
289 | 364 | | |
290 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| |||
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| 804 | + | |
| 805 | + | |
803 | 806 | | |
804 | 807 | | |
805 | 808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
64 | 89 | | |
0 commit comments