Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 086636ae5104545f47d901c6dc6ee634ca547a3b
      
https://github.com/WebKit/WebKit/commit/086636ae5104545f47d901c6dc6ee634ca547a3b
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-05-30 (Sat, 30 May 2026)

  Changed paths:
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/JavaScriptCore/jsc.cpp
    M Source/WTF/wtf/ReducedResolutionSeconds.h
    M Source/WTF/wtf/Seconds.h
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp
    M Source/WebCore/page/Performance.cpp
    M Source/WebCore/page/Performance.h
    M Source/WebCore/page/PerformanceNavigationTiming.cpp
    M Source/WebCore/page/PerformanceResourceTiming.cpp
    M Source/WebCore/page/PerformanceTiming.cpp

  Log Message:
  -----------
  [macOS] imported/w3c/web-platform-tests/hr-time/timeOrigin.html is a flaky 
text failure.
https://bugs.webkit.org/show_bug.cgi?id=315780
rdar://178175122

Reviewed by Ryosuke Niwa.

Performance::reduceTimeResolution(Seconds) returned plain Seconds, leaving
its callers free to invoke .milliseconds() directly on the result — which
is just value * 1000 and carries up to ~2.4e-4 ms of IEEE-754 noise for
inputs whose millisecond boundary round-trips inexactly through 0.001.
Performance::timeOrigin() and several other DOMHighResTimeStamp sites
take that lossy path, so the JS-visible timeOrigin can come out as e.g.,
1779973524567.0002 instead of 1779973524567. That is the precise symptom
that made imported/w3c/web-platform-tests/hr-time/timeOrigin.html flake
on the worker-vs-window comparison whenever the two origins straddled a
"noisy" millisecond boundary.

ReducedResolutionSeconds (added in 313153@main) already absorbs this noise
in its conversion methods (std::round(value * 1e6) / 1e3 etc.); the missing
piece was for reduceTimeResolution to return the rounded type rather than
plain Seconds. Folded the floor-and-coarsen step into a new
ReducedResolutionSeconds::reduce(Seconds value, Seconds resolution) factory,
removed the now-orphaned Seconds::reduceTimeResolution, and updated callers.

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



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

Reply via email to