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

  Changed paths:
    M Source/WTF/wtf/ReducedResolutionSeconds.h
    M Source/WebCore/animation/AnimationTimelinesController.cpp
    M Source/WebCore/animation/AnimationTimelinesController.h
    M Source/WebCore/animation/DocumentTimeline.cpp
    M Source/WebCore/animation/WebAnimationTime.cpp
    M Source/WebCore/animation/WebAnimationTime.h
    M Source/WebCore/page/LocalDOMWindow.cpp
    M Source/WebCore/page/LocalDOMWindow.h
    M Source/WebCore/page/Performance.cpp
    M Source/WebCore/page/Performance.h
    M Source/WebCore/page/PerformanceEventTiming.h
    M Source/WebCore/page/PerformanceEventTimingCandidate.h

  Log Message:
  -----------
  Adopt ReducedResolutionSeconds more widely
https://bugs.webkit.org/show_bug.cgi?id=314722

Reviewed by Ryosuke Niwa.

313153@main left seven call sites using deprecatedNonRoundedSeconds(), each
of which silently dropped the microsecond-rounded invariant before the value
reached the JS DOMHighResTimeStamp boundary. This patch migrates those
(animation current-time cache + event-timing entries) and deletes the escape
hatch.

Two changes are more than mechanical:

Performance::relativeTimeFromTimeOriginInReducedResolutionSeconds now
returns ReducedResolutionSeconds rather than Seconds. This removed a redundant
ReducedResolutionSeconds::fromSeconds round-trip at the event-timing call site,
and as a side effect its DOMHighResTimeStamp sibling
(relativeTimeFromTimeOriginInReducedResolution) now produces
microsecond-rounded output for IdleDeadline, Event.timeStamp, AudioContext,
HTMLVideoElement frame metadata, and LargestContentfulPaint.

DocumentTimeline::createAcceleratedRepresentation needs "m_timeOrigin +
m_originTime" in monotonic-clock-epoch seconds, to tell the remote layer
tree where the timeline's zero point sits. The old code computed this
obliquely, by feeding m_originTime's bits through reduceTimeResolution as
if they were a MonotonicTime and backing out the result; the arithmetic
happens to cancel and yield the right answer — but only when m_originTime
is smaller than the reduce-resolution precision step. Any JS-constructed
DocumentTimeline({originTime: N}) with N ≥ 1ms had its threaded animations
mistimed by roughly N. Added a narrow
Performance::monotonicTimeFromOriginRelative(Seconds) helper that performs
the addition directly, fixing both the arcane code and the latent bug.

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



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

Reply via email to