Skip to content

[Resource Timing] Add finalResponseHeadersStart and firstInterimResponseStart attributes#55467

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
hjanuschka:feature/resource-timing-impl
Dec 23, 2025
Merged

[Resource Timing] Add finalResponseHeadersStart and firstInterimResponseStart attributes#55467
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
hjanuschka:feature/resource-timing-impl

Conversation

@hjanuschka
Copy link
Contributor

@hjanuschka hjanuschka commented Dec 16, 2025

68d1baf

[Resource Timing] Add finalResponseHeadersStart and firstInterimResponseStart attributes
https://bugs.webkit.org/show_bug.cgi?id=304235

Reviewed by Alex Christensen.

Implement W3C Resource Timing Level 3 attributes for distinguishing interim (1xx) and final
response timing. This enables proper measurement of HTTP 103 Early Hints and other informational
responses. Timestamps are captured via NSURLSession delegate callbacks without requiring CFNetwork changes.

* Source/WebCore/page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::finalResponseHeadersStart const): Added.
(WebCore::PerformanceResourceTiming::firstInterimResponseStart const): Added.
(WebCore::PerformanceResourceTiming::responseStart const): Updated to return interim if present.
* Source/WebCore/page/PerformanceResourceTiming.h:
* Source/WebCore/page/PerformanceResourceTiming.idl:
* Source/WebCore/platform/network/NetworkLoadMetrics.cpp:
(WebCore::NetworkLoadMetrics::updateFromFinalMetrics):
(WebCore::NetworkLoadMetrics::isolatedCopy const):
* Source/WebCore/platform/network/NetworkLoadMetrics.h:
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveInformationalResponse:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any-expected.txt: Updated expectations.
* LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any.worker-expected.txt: Updated expectations.

Add soup/glib support for interim response timing

Implement firstInterimResponseStart and finalResponseHeadersStart capture
for Linux/GTK/WPE platforms using libsoup's got-headers signal.

The got-headers callback is invoked for all HTTP responses including
informational (1xx) responses, allowing us to distinguish and capture
timing for both interim and final responses.

Add Helmut Januschka to contributors

Canonical link: https://commits.webkit.org/304905@main

55c8dfe

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 webkitpy ✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 wpe-cairo-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🧪 mac-intel-wk2
✅ 🛠 tv-sim ✅ 🛠 mac-safer-cpp
✅ 🛠 watch
✅ 🛠 watch-sim

@hjanuschka hjanuschka requested a review from cdumez as a code owner December 16, 2025 09:23
@hjanuschka hjanuschka requested a review from a team as a code owner December 16, 2025 16:28
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 87522f0 to d5404d1 Compare December 16, 2025 18:28
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from d5404d1 to 41d54fc Compare December 16, 2025 22:53
@achristensen07
Copy link
Contributor

This seems fine so I approved it, but it looks like worker-performance.worker-expected.txt needs updating too

@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 41d54fc to 9f60c12 Compare December 20, 2025 22:41
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 9f60c12 to 6eb0a1a Compare December 20, 2025 22:45
@hjanuschka
Copy link
Contributor Author

@achristensen07 thx, feedback addressed

@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from f3f4d71 to 97b8929 Compare December 21, 2025 07:29
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 97b8929 to 9ab36a6 Compare December 21, 2025 14:43
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 9ab36a6 to e16674a Compare December 21, 2025 14:54
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from 85a0d3c to 3586a3c Compare December 22, 2025 07:43
@achristensen07 achristensen07 added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks and removed merging-blocked Applied to prevent a change from being merged labels Dec 22, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Dec 22, 2025
@achristensen07 achristensen07 removed the merging-blocked Applied to prevent a change from being merged label Dec 23, 2025
@webkit-ews-buildbot webkit-ews-buildbot added merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Dec 23, 2025
@webkit-ews-buildbot
Copy link
Collaborator

Safe-Merge-Queue: Build #78781.

@webkit-commit-queue
Copy link
Collaborator

This change contains multiple commits which are not squashed together, blocking PR #55467. Please squash the commits to land.

@webkit-commit-queue webkit-commit-queue added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels Dec 23, 2025
@hjanuschka hjanuschka force-pushed the feature/resource-timing-impl branch from bb094c1 to 55c8dfe Compare December 23, 2025 06:43
@achristensen07 achristensen07 added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged labels Dec 23, 2025
…nseStart attributes

https://bugs.webkit.org/show_bug.cgi?id=304235

Reviewed by Alex Christensen.

Implement W3C Resource Timing Level 3 attributes for distinguishing interim (1xx) and final
response timing. This enables proper measurement of HTTP 103 Early Hints and other informational
responses. Timestamps are captured via NSURLSession delegate callbacks without requiring CFNetwork changes.

* Source/WebCore/page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::finalResponseHeadersStart const): Added.
(WebCore::PerformanceResourceTiming::firstInterimResponseStart const): Added.
(WebCore::PerformanceResourceTiming::responseStart const): Updated to return interim if present.
* Source/WebCore/page/PerformanceResourceTiming.h:
* Source/WebCore/page/PerformanceResourceTiming.idl:
* Source/WebCore/platform/network/NetworkLoadMetrics.cpp:
(WebCore::NetworkLoadMetrics::updateFromFinalMetrics):
(WebCore::NetworkLoadMetrics::isolatedCopy const):
* Source/WebCore/platform/network/NetworkLoadMetrics.h:
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveInformationalResponse:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any-expected.txt: Updated expectations.
* LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any.worker-expected.txt: Updated expectations.

Add soup/glib support for interim response timing

Implement firstInterimResponseStart and finalResponseHeadersStart capture
for Linux/GTK/WPE platforms using libsoup's got-headers signal.

The got-headers callback is invoked for all HTTP responses including
informational (1xx) responses, allowing us to distinguish and capture
timing for both interim and final responses.

Add Helmut Januschka to contributors

Canonical link: https://commits.webkit.org/304905@main
@webkit-commit-queue webkit-commit-queue force-pushed the feature/resource-timing-impl branch from 55c8dfe to 68d1baf Compare December 23, 2025 17:27
@webkit-commit-queue
Copy link
Collaborator

Committed 304905@main (68d1baf): https://commits.webkit.org/304905@main

Reviewed commits have been landed. Closing PR #55467 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 68d1baf into WebKit:main Dec 23, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants