Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ade17394d9f35fee6901de14e429172e39b20022
      
https://github.com/WebKit/WebKit/commit/ade17394d9f35fee6901de14e429172e39b20022
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https-expected.txt
    M 
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h

  Log Message:
  -----------
  RTCRtpSynchronizationSource.timestamp should use wall time, not monotonic time
https://bugs.webkit.org/show_bug.cgi?id=307036
rdar://169679084

Reviewed by Youenn Fablet.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

The timestamp field in RTCRtpSynchronizationSource and
RTCRtpContributingSource was using libwebrtc's monotonic timestamp
directly, but the WebRTC spec requires DOMHighResTimeStamp which is
relative to the Unix epoch (wall time).

This caused test failures where timestamps were not comparable to
performance.timeOrigin + performance.now().

Fix by converting from libwebrtc's monotonic time to wall time using
the offset between webrtc::TimeMillis() and WallTime::now(). The
offset is computed once per LibWebRTCRtpReceiverBackend instance and
cached to avoid repeated calculations.

* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
(WebCore::LibWebRTCRtpReceiverBackend::webrtcToWallTimeOffset const):
(WebCore::fillRTCRtpContributingSource):
(WebCore::toRTCRtpContributingSource):
(WebCore::toRTCRtpSynchronizationSource):
(WebCore::LibWebRTCRtpReceiverBackend::getContributingSources const):
(WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
* 
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https-expected.txt:
 Progressions

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to