Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ce0096b930f86b5a2d76968a8018d810cb9dd557
https://github.com/WebKit/WebKit/commit/ce0096b930f86b5a2d76968a8018d810cb9dd557
Author: Yijia Huang <[email protected]>
Date: 2025-06-01 (Sun, 01 Jun 2025)
Changed paths:
M Source/JavaScriptCore/runtime/DateConstructor.cpp
M Source/JavaScriptCore/runtime/DateInstance.cpp
M Source/JavaScriptCore/runtime/DatePrototype.cpp
M Source/JavaScriptCore/runtime/JSDateMath.cpp
M Source/JavaScriptCore/runtime/JSDateMath.h
M Source/WTF/wtf/DateMath.cpp
M Source/WTF/wtf/DateMath.h
M Tools/TestWebKitAPI/Tests/WTF/DateMath.cpp
Log Message:
-----------
[JSC] Migrate DateTime code from WTF::TimeType enum to enum class TimeType
https://bugs.webkit.org/show_bug.cgi?id=293701
rdar://152185079
Reviewed by Yusuke Suzuki.
Refactored the DateMath and DatePrototype code to use a scoped enum class for
TimeType
instead of the old unscoped enum. This improves type safety and reduces
namespace pollution.
No functional change in behavior. All tests continue to pass.
* Source/JavaScriptCore/runtime/DateConstructor.cpp:
(JSC::millisecondsFromComponents):
(JSC::constructDate):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/DateInstance.cpp:
(JSC::DateInstance::calculateGregorianDateTime const):
(JSC::DateInstance::calculateGregorianDateTimeUTC const):
* Source/JavaScriptCore/runtime/DatePrototype.cpp:
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/JSDateMath.cpp:
(JSC::DateCache::calculateLocalTimeOffset):
(JSC::DateCache::DSTCache::localTimeOffset):
(JSC::DateCache::gregorianDateTimeToMS):
(JSC::DateCache::localTimeToMS):
(JSC::DateCache::msToGregorianDateTime):
(JSC::DateCache::parseDate):
* Source/JavaScriptCore/runtime/JSDateMath.h:
(JSC::DateCache::localTimeOffset):
* Source/WTF/wtf/DateMath.cpp:
(WTF::calculateLocalTimeOffset):
(WTF::parseDate):
* Source/WTF/wtf/DateMath.h:
* Tools/TestWebKitAPI/Tests/WTF/DateMath.cpp:
(TestWebKitAPI::TEST(WTF_DateMath, calculateLocalTimeOffset)):
Canonical link: https://commits.webkit.org/295669@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes