Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 002eefd45836878954c4e246011e83e85c10ee23
https://github.com/WebKit/WebKit/commit/002eefd45836878954c4e246011e83e85c10ee23
Author: Yijia Huang <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M Source/JavaScriptCore/runtime/TemporalDuration.cpp
M Source/JavaScriptCore/runtime/TemporalDuration.h
M Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainYearMonthPrototype.cpp
Log Message:
-----------
[JSC][Temporal] Polish Temporal.Duration round and total spec alignment
https://bugs.webkit.org/show_bug.cgi?id=317877
rdar://180661221
Reviewed by Yusuke Suzuki.
Extract the relativeTo endpoint computation (AddZonedDateTime,
AddTime + CalendarDateAdd) into computeZonedRelativeEndpoints
and computePlainRelativeTarget, and lift the inline blocks for
DifferenceZonedDateTimeWithTotal / DifferencePlainDateTimeWithTotal
into file-static functions named after their spec abstract ops.
Duration.prototype.round and Duration.prototype.total had parallel
implementations of the zoned and plain relativeTo paths; they now
share one code path and each call site labels its spec steps in
place.
Move toInternalDurationRecordWith24HourDays and the InternalDuration
overload of round to private — both are only used internally. Drop
TemporalDuration::regulateISODate; its only external callers
(PlainMonthDay/PlainYearMonth.prototype.toPlainDate) now call
TemporalCore::regulateISODate directly.
Canonical link: https://commits.webkit.org/315868@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications