Bug 226901

Summary: [REGRESSION][Curl] Network::ResourceTiming are broken after r278391
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web InspectorAssignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, Basuke.Suzuki, ews-watchlist, galpeter, Hironori.Fujii, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Yury Semikhatsky 2021-06-10 15:06:01 PDT
https://trac.webkit.org/changeset/278391/webkit changed how InspectorNetworkAgent::buildObjectForTiming serializes NetworkLoadMetrics to the inspector protocol. millisecondsSinceFetchStart subtracts fetchStart to get relative values for most of the metrics. In Curl implementation fetchStart is always 0 which results in incorrect values sent over the protocol.
Comment 1 Yury Semikhatsky 2021-06-10 16:51:22 PDT
Created attachment 431162 [details]
Patch
Comment 2 Fujii Hironori 2021-06-10 17:02:45 PDT
Don't you need to set redirectStart? Cocoa port does.
Comment 3 Fujii Hironori 2021-06-10 17:15:06 PDT
It would be great the following WinCairo test failures are fixed.

fast/dom/webtiming.html [ Failure ]
http/tests/misc/webtiming-cross-origin-redirect.py [ Failure ]
http/tests/misc/webtiming-one-redirect.py [ Failure ]
http/tests/misc/webtiming-two-redirects.py [ Failure ]
Comment 4 Yury Semikhatsky 2021-06-10 17:24:08 PDT
(In reply to Fujii Hironori from comment #2)
> Don't you need to set redirectStart? Cocoa port does.

I think you are write, I noticed that redirectSart was also missing but decided not to touch it since it was not a part of the regression, can add that too.
Comment 5 EWS 2021-06-10 20:37:26 PDT
Committed r278752 (238713@main): <https://commits.webkit.org/238713@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431162 [details].
Comment 6 Radar WebKit Bug Importer 2021-06-10 20:38:21 PDT
<rdar://problem/79176779>