Web Inspector: Network: show secure connection details per-request
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2019 22:18:59 +0000 (22:18 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Jan 2019 22:18:59 +0000 (22:18 +0000)
commitb258834748bd824e425d683f578e3780bfcfd746
tree50bb2ac89e1ad6d0c23f8b69c01bae86ffe8fec0
parent8dae7e4da201890f563dea8cbd5b8867794fa7b0
Web Inspector: Network: show secure connection details per-request
https://bugs.webkit.org/show_bug.cgi?id=191539
<rdar://problem/45979891>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/Security.json:
Add `Connection` type.

* inspector/protocol/Network.json:
Send `Security.Connection` information when request metrics become available.

Source/WebCore:

Test: http/tests/inspector/network/resource-security-connection.html

* platform/network/NetworkLoadMetrics.h:
(WebCore::NetworkLoadMetrics:isolatedCopy):
(WebCore::NetworkLoadMetrics:clearNonTimingData):
(WebCore::NetworkLoadMetrics:operator==):
(WebCore::NetworkLoadMetrics:encode):
(WebCore::NetworkLoadMetrics:decode):

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:

Source/WebInspectorUI:

* UserInterface/Models/Resource.js:
(WI.Resource):
(WI.Resource.prototype.get security): Added.
(WI.Resource.prototype.updateForResponse):
(WI.Resource.prototype.updateWithMetrics):
(WI.Resource.prototype.get responseSecurity): Deleted.

* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView):
(WI.ResourceSecurityContentView.prototype.initialLayout):
(WI.ResourceSecurityContentView.prototype.layout):
(WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
(WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
(WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
* UserInterface/Views/ResourceSecurityContentView.css:
(body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
(@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
(body[dir] .resource-security > section.certificate > .details): Deleted.
(@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.

* Localizations/en.lproj/localizedStrings.js:

Source/WebKit:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(stringForSSLProtocol): Added.
(stringForSSLCipher): Added.
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

LayoutTests:

* http/tests/inspector/network/resource-security-connection-expected.txt: Added.
* http/tests/inspector/network/resource-security-connection.html: Added.

* http/tests/inspector/network/resource-security-certificate-expected.txt: Added.
* http/tests/inspector/network/resource-security-certificate.html: Added.
* http/tests/inspector/network/resource-response-security-expected.txt: Deleted.
* http/tests/inspector/network/resource-response-security.html: Deleted.

* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wpe/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/resource-security-certificate-expected.txt [moved from LayoutTests/http/tests/inspector/network/resource-response-security-expected.txt with 56% similarity]
LayoutTests/http/tests/inspector/network/resource-security-certificate.html [moved from LayoutTests/http/tests/inspector/network/resource-response-security.html with 73% similarity]
LayoutTests/http/tests/inspector/network/resource-security-connection-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resource-security-connection.html [new file with mode: 0644]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
LayoutTests/platform/wpe/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Network.json
Source/JavaScriptCore/inspector/protocol/Security.json
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
Source/WebCore/platform/network/NetworkLoadMetrics.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.css
Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm