Changeset 292037 in webkit
- Timestamp:
- Mar 29, 2022, 10:26:24 AM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/inspector/protocol/Network.json (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/inspector/agents/InspectorNetworkAgent.cpp (modified) (1 diff)
-
WebCore/platform/network/NetworkLoadMetrics.cpp (modified) (1 diff)
-
WebCore/platform/network/NetworkLoadMetrics.h (modified) (4 diffs)
-
WebInspectorUI/ChangeLog (modified) (1 diff)
-
WebInspectorUI/Localizations/en.lproj/localizedStrings.js (modified) (1 diff)
-
WebInspectorUI/UserInterface/Models/LocalResource.js (modified) (1 diff)
-
WebInspectorUI/UserInterface/Models/Resource.js (modified) (3 diffs)
-
WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (modified) (1 diff)
-
WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js (modified) (1 diff)
-
WebInspectorUI/UserInterface/Views/ResourceHeadersContentView.js (modified) (1 diff)
-
WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r292014 r292037 1 2022-03-29 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: [Cocoa] Indicate a request was sent through proxy/private relay in Network tab 4 https://bugs.webkit.org/show_bug.cgi?id=233202 5 6 Reviewed by Devin Rousso. 7 8 Add new `isProxyConnection` property to network metrics protocol object. 9 10 * inspector/protocol/Network.json: 11 1 12 2022-03-28 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/Source/JavaScriptCore/inspector/protocol/Network.json
r278511 r292037 96 96 { "name": "responseBodyBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response body bytes received over the network." }, 97 97 { "name": "responseBodyDecodedSize", "type": "number", "optional": true, "description": "Total decoded response body size in bytes." }, 98 { "name": "securityConnection", "$ref": "Security.Connection", "optional": true, "description": "Connection information for the completed request." } 98 { "name": "securityConnection", "$ref": "Security.Connection", "optional": true, "description": "Connection information for the completed request." }, 99 { "name": "isProxyConnection", "type": "boolean", "optional": true, "description": "Whether or not the connection was proxied through a server. If <code>true</code>, the <code>remoteAddress</code> will be for the proxy server, not the server that provided the resource to the proxy server."} 99 100 ] 100 101 }, -
trunk/Source/WebCore/ChangeLog
r292036 r292037 1 2022-03-29 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: [Cocoa] Indicate a request was sent through proxy/private relay in Network tab 4 https://bugs.webkit.org/show_bug.cgi?id=233202 5 6 Reviewed by Devin Rousso. 7 8 Add plumbing for the new `isProxyConnection` network metric. 9 10 * inspector/agents/InspectorNetworkAgent.cpp: 11 (WebCore::InspectorNetworkAgent::buildObjectForMetrics): 12 * platform/network/NetworkLoadMetrics.cpp: 13 (WebCore::AdditionalNetworkLoadMetricsForWebInspector::isolatedCopy): 14 * platform/network/NetworkLoadMetrics.h: 15 (WebCore::AdditionalNetworkLoadMetricsForWebInspector::encode const): 16 (WebCore::AdditionalNetworkLoadMetricsForWebInspector::decode): 17 1 18 2022-03-29 Brandon Stewart <brandonstewart@apple.com> 2 19 -
trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
r291992 r292037 276 276 if (additionalMetrics->responseHeaderBytesReceived != std::numeric_limits<uint64_t>::max()) 277 277 metrics->setResponseHeaderBytesReceived(additionalMetrics->responseHeaderBytesReceived); 278 } 278 metrics->setIsProxyConnection(additionalMetrics->isProxyConnection); 279 } 280 279 281 if (networkLoadMetrics.responseBodyBytesReceived != std::numeric_limits<uint64_t>::max()) 280 282 metrics->setResponseBodyBytesReceived(networkLoadMetrics.responseBodyBytesReceived); -
trunk/Source/WebCore/platform/network/NetworkLoadMetrics.cpp
r291441 r292037 92 92 copy->responseHeaderBytesReceived = responseHeaderBytesReceived; 93 93 copy->requestBodyBytesSent = requestBodyBytesSent; 94 copy->isProxyConnection = isProxyConnection; 94 95 return copy; 95 96 } -
trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h
r291441 r292037 134 134 uint64_t responseHeaderBytesReceived { std::numeric_limits<uint64_t>::max() }; 135 135 uint64_t requestBodyBytesSent { std::numeric_limits<uint64_t>::max() }; 136 137 bool isProxyConnection { false }; 136 138 private: 137 139 AdditionalNetworkLoadMetricsForWebInspector() { } … … 284 286 encoder << responseHeaderBytesReceived; 285 287 encoder << requestBodyBytesSent; 288 289 encoder << isProxyConnection; 286 290 } 287 291 … … 332 336 decoder >> requestBodyBytesSent; 333 337 if (!requestBodyBytesSent) 338 return nullptr; 339 340 std::optional<bool> isProxyConnection; 341 decoder >> isProxyConnection; 342 if (!isProxyConnection) 334 343 return nullptr; 335 344 … … 344 353 decoded->responseHeaderBytesReceived = WTFMove(*responseHeaderBytesReceived); 345 354 decoded->requestBodyBytesSent = WTFMove(*requestBodyBytesSent); 355 decoded->isProxyConnection = WTFMove(*isProxyConnection); 346 356 return decoded; 347 357 } -
trunk/Source/WebInspectorUI/ChangeLog
r291740 r292037 1 2022-03-29 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: [Cocoa] Indicate a request was sent through proxy/private relay in Network tab 4 https://bugs.webkit.org/show_bug.cgi?id=233202 5 6 Reviewed by Devin Rousso. 7 8 For resources that are sent through a proxy or relay (like iCloud Private Relay), the remoteAddress will be that 9 of the proxy or relay server, not the server that provided the page to the proxy or relay. To indicate this, we 10 now append `(Proxy)` to these remote IP addresses in Web Inspector so that it is clearer what server the remote 11 address actually represents in these cases. 12 13 * Localizations/en.lproj/localizedStrings.js: 14 * UserInterface/Models/LocalResource.js: 15 * UserInterface/Models/Resource.js: 16 (WI.Resource.prototype.get displayRemoteAddress): 17 - Similar to `displayName` and `displayURL` which provide user-facing strings, add a `displayRemoteAddress` that 18 will denote the address is a proxy if applicable. 19 20 (WI.Resource.prototype.updateWithMetrics): 21 * UserInterface/Views/NetworkTableContentView.js: 22 (WI.NetworkTableContentView.prototype._entryForResource): 23 * UserInterface/Views/ResourceDetailsSidebarPanel.js: 24 (WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): 25 * UserInterface/Views/ResourceHeadersContentView.js: 26 (WI.ResourceHeadersContentView.prototype._refreshSummarySection): 27 * UserInterface/Views/ResourceTimelineDataGridNode.js: 28 (WI.ResourceTimelineDataGridNode.prototype.get data): 29 1 30 2022-03-23 Razvan Caliman <rcaliman@apple.com> 2 31 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r290720 r292037 57 57 /* Label for case-insensitive URL match pattern of a local override. */ 58 58 localizedStrings["%s (Case Insensitive) @ Local Override"] = "%s (Case Insensitive)"; 59 /* Label for the IP address of a proxy server used to retrieve a network resource. */ 60 localizedStrings["%s (Proxy) @ Resource Remote Address"] = "%s (Proxy)"; 59 61 localizedStrings["%s (default)"] = "%s (default)"; 60 62 localizedStrings["%s (hidden)"] = "%s (hidden)"; -
trunk/Source/WebInspectorUI/UserInterface/Models/LocalResource.js
r270604 r292037 73 73 this._responseBodyTransferSize = !isNaN(metrics.responseBodyBytesReceived) ? metrics.responseBodyBytesReceived : NaN; 74 74 this._responseBodySize = !isNaN(metrics.responseBodyDecodedSize) ? metrics.responseBodyDecodedSize : NaN; 75 this._isProxyConnection = !!metrics.isProxyConnection; 75 76 76 77 // Set by `WI.LocalResourceOverride`. -
trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js
r284139 r292037 80 80 this._remoteAddress = null; 81 81 this._connectionIdentifier = null; 82 this._isProxyConnection = false; 82 83 this._target = targetId ? WI.targetManager.targetForIdentifier(targetId) : WI.mainTarget; 83 84 this._redirects = []; … … 383 384 } 384 385 386 get displayRemoteAddress() 387 { 388 if (this._isProxyConnection) 389 return WI.UIString("%s (Proxy)", "%s (Proxy) @ Resource Remote Address", "Label for the IP address of a proxy server used to retrieve a network resource.").format(this._remoteAddress); 390 391 return this._remoteAddress; 392 } 393 385 394 get mimeTypeComponents() 386 395 { … … 822 831 this._security.connection = metrics.securityConnection; 823 832 } 833 834 this._isProxyConnection = !!metrics.isProxyConnection; 824 835 825 836 this.dispatchEventToListeners(WI.Resource.Event.MetricsDidChange); -
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
r288565 r292037 1899 1899 initiator: resource.initiatorSourceCodeLocation ? resource.initiatorSourceCodeLocation.displayLocationString() : "", 1900 1900 priority: resource.priority, 1901 remoteAddress: resource. remoteAddress,1901 remoteAddress: resource.displayRemoteAddress, 1902 1902 connectionIdentifier: resource.connectionIdentifier, 1903 1903 startTime: resource.firstTimestamp, -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js
r269359 r292037 365 365 this._protocolRow.tooltip = protocolDisplayName ? this._resource.protocol : ""; 366 366 this._priorityRow.value = WI.Resource.displayNameForPriority(this._resource.priority) || emDash; 367 this._remoteAddressRow.value = this._resource. remoteAddress || emDash;367 this._remoteAddressRow.value = this._resource.displayRemoteAddress || emDash; 368 368 this._connectionIdentifierRow.value = this._resource.connectionIdentifier || emDash; 369 369 } -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceHeadersContentView.js
r270134 r292037 265 265 266 266 if (this._resource.remoteAddress) 267 this._summarySection.appendKeyValuePair(WI.UIString("Address"), this._resource. remoteAddress);267 this._summarySection.appendKeyValuePair(WI.UIString("Address"), this._resource.displayRemoteAddress); 268 268 269 269 let initiatorLocation = this._resource.initiatorSourceCodeLocation; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js
r263429 r292037 73 73 this._cachedData.protocol = this.resource.protocol; 74 74 this._cachedData.priority = this.resource.priority; 75 this._cachedData.remoteAddress = this.resource. remoteAddress;75 this._cachedData.remoteAddress = this.resource.displayRemoteAddress; 76 76 this._cachedData.connectionIdentifier = this.resource.connectionIdentifier; 77 77 this._cachedData.initiator = this.resource.initiatorSourceCodeLocation; -
trunk/Source/WebKit/ChangeLog
r292035 r292037 1 2022-03-29 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: [Cocoa] Indicate a request was sent through proxy/private relay in Network tab 4 https://bugs.webkit.org/show_bug.cgi?id=233202 5 6 Reviewed by Devin Rousso. 7 8 Add plumbing for the new `isProxyConnection` network metric. 9 10 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 11 (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): 12 1 13 2022-03-28 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r291735 r292037 903 903 additionalMetrics->requestBodyBytesSent = task.countOfBytesSent; 904 904 additionalMetrics->responseHeaderBytesReceived = responseHeaderBytesReceived; 905 906 additionalMetrics->isProxyConnection = m.proxyConnection; 907 905 908 networkLoadMetrics.additionalNetworkLoadMetricsForWebInspector = WTFMove(additionalMetrics); 906 909 }
Note:
See TracChangeset
for help on using the changeset viewer.