From 644e9db1092df1477b1facc52cd3ee45ebd13040 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 1 Mar 2018 11:52:50 +0100 Subject: DevTools - network - implement the secureConnectionStart property for the PerformanceTiming https://github.com/MoonchildProductions/moebius/pull/116 ("/testing" and "/toolkit" in in the previous commit) --- .../client/locales/en-US/netmonitor.properties | 5 +++ devtools/client/netmonitor/netmonitor-view.js | 11 +++++- devtools/client/netmonitor/netmonitor.xul | 8 ++++ devtools/client/netmonitor/requests-menu-view.js | 2 +- .../test/browser_net_simple-request-data.js | 2 + devtools/client/themes/netmonitor.css | 6 +++ devtools/shared/webconsole/network-monitor.js | 35 ++++++++++++++++- dom/performance/PerformanceMainThread.cpp | 5 ++- dom/performance/PerformanceResourceTiming.h | 6 +-- dom/performance/PerformanceTiming.cpp | 44 ++++++++++++++++++++++ dom/performance/PerformanceTiming.h | 3 ++ dom/webidl/PerformanceTiming.webidl | 3 +- netwerk/base/nsISocketTransport.idl | 2 + netwerk/base/nsITimedChannel.idl | 2 + netwerk/base/nsLoadGroup.cpp | 13 ++++++- netwerk/ipc/NeckoMessageUtils.h | 2 + netwerk/protocol/http/Http2Session.cpp | 9 +++++ netwerk/protocol/http/HttpBaseChannel.cpp | 7 ++++ netwerk/protocol/http/HttpChannelChild.cpp | 1 + netwerk/protocol/http/HttpChannelParent.cpp | 1 + netwerk/protocol/http/NullHttpChannel.cpp | 8 ++++ netwerk/protocol/http/NullHttpTransaction.cpp | 24 ++++++++++++ netwerk/protocol/http/NullHttpTransaction.h | 4 ++ netwerk/protocol/http/TimingStruct.h | 1 + netwerk/protocol/http/nsHttpChannel.cpp | 9 +++++ netwerk/protocol/http/nsHttpChannel.h | 1 + netwerk/protocol/http/nsHttpConnection.cpp | 25 ++++++++++-- netwerk/protocol/http/nsHttpConnection.h | 6 +++ netwerk/protocol/http/nsHttpConnectionMgr.cpp | 5 +++ netwerk/protocol/http/nsHttpTransaction.cpp | 22 +++++++++++ netwerk/protocol/http/nsHttpTransaction.h | 3 ++ .../migrate-l10n/migrate/conf/bug1308500_1309191 | 1 + 32 files changed, 263 insertions(+), 13 deletions(-) diff --git a/devtools/client/locales/en-US/netmonitor.properties b/devtools/client/locales/en-US/netmonitor.properties index 1f6f671c9..021b56a2b 100644 --- a/devtools/client/locales/en-US/netmonitor.properties +++ b/devtools/client/locales/en-US/netmonitor.properties @@ -581,6 +581,11 @@ netmonitor.timings.blocked=Blocked: # in a "dns" state. netmonitor.timings.dns=DNS resolution: +# LOCALIZATION NOTE (netmonitor.timings.ssl): This is the label displayed +# in the network details timings tab identifying the amount of time spent +# in a "tls" handshake state. +netmonitor.timings.ssl=TLS setup: + # LOCALIZATION NOTE (netmonitor.timings.connect): This is the label displayed # in the network details timings tab identifying the amount of time spent # in a "connect" state. diff --git a/devtools/client/netmonitor/netmonitor-view.js b/devtools/client/netmonitor/netmonitor-view.js index 19dd96ff1..414b9ab8f 100644 --- a/devtools/client/netmonitor/netmonitor-view.js +++ b/devtools/client/netmonitor/netmonitor-view.js @@ -963,7 +963,7 @@ NetworkDetailsView.prototype = { if (!response) { return; } - let { blocked, dns, connect, send, wait, receive } = response.timings; + let { blocked, dns, connect, ssl, send, wait, receive } = response.timings; let tabboxWidth = $("#details-pane").getAttribute("width"); @@ -988,6 +988,11 @@ NetworkDetailsView.prototype = { $("#timings-summary-connect .requests-menu-timings-total") .setAttribute("value", L10N.getFormatStr("networkMenu.totalMS", connect)); + $("#timings-summary-ssl .requests-menu-timings-box") + .setAttribute("width", ssl * scale); + $("#timings-summary-ssl .requests-menu-timings-total") + .setAttribute("value", L10N.getFormatStr("networkMenu.totalMS", ssl)); + $("#timings-summary-send .requests-menu-timings-box") .setAttribute("width", send * scale); $("#timings-summary-send .requests-menu-timings-total") @@ -1007,6 +1012,8 @@ NetworkDetailsView.prototype = { .style.transform = "translateX(" + (scale * blocked) + "px)"; $("#timings-summary-connect .requests-menu-timings-box") .style.transform = "translateX(" + (scale * (blocked + dns)) + "px)"; + $("#timings-summary-ssl .requests-menu-timings-box") + .style.transform = "translateX(" + (scale * blocked) + "px)"; $("#timings-summary-send .requests-menu-timings-box") .style.transform = "translateX(" + (scale * (blocked + dns + connect)) + "px)"; @@ -1022,6 +1029,8 @@ NetworkDetailsView.prototype = { .style.transform = "translateX(" + (scale * blocked) + "px)"; $("#timings-summary-connect .requests-menu-timings-total") .style.transform = "translateX(" + (scale * (blocked + dns)) + "px)"; + $("#timings-summary-ssl .requests-menu-timings-total") + .style.transform = "translateX(" + (scale * blocked) + "px)"; $("#timings-summary-send .requests-menu-timings-total") .style.transform = "translateX(" + (scale * (blocked + dns + connect)) + "px)"; diff --git a/devtools/client/netmonitor/netmonitor.xul b/devtools/client/netmonitor/netmonitor.xul index 117ecf261..aa5c4d848 100644 --- a/devtools/client/netmonitor/netmonitor.xul +++ b/devtools/client/netmonitor/netmonitor.xul @@ -478,6 +478,14 @@ + +