-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define the EpochTimeStamp typedef #124
Conversation
Maybe instead of calling this |
index.html
Outdated
<li>If |epoch| was not passed, set |epoch| to 00:00:00 UTC on 1 January | ||
1970. | ||
</li> | ||
<li>Return the number of milliseconds from |epoch| to the current time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ECMAScript spec uses "current time", so I just went with that... is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. My main feedback is on the algorithm, along similar lines to @yoavweiss's remark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, the one thing you might want to add is an Assert that the time passed is after 1970. Probably no need for a before assert as it's so far into the future...
@annevk, ok to merge? |
Yeah! |
Filed gecko bug: |
File webkit bug and updated the template. |
https://bugs.webkit.org/show_bug.cgi?id=231496 Reviewed by Sam Weinig. Source/WebCore: DOMTimeStamp was renamed EpochTimeStamp. There is no observable behavioral change - it's just a name change. Relevant WebIDL discussions/issue: - whatwg/webidl#2 Which lead to: - w3c/hr-time#124 * Headers.cmake: * Modules/geolocation/Geolocation.cpp: (WebCore::createGeolocationPosition): (WebCore::Geolocation::haveSuitableCachedPosition): * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): (WebCore::GeolocationPosition::timestamp const): (WebCore::GeolocationPosition::GeolocationPosition): * Modules/geolocation/GeolocationPosition.idl: * Modules/notifications/Notification.idl: * Modules/push-api/PushSubscription.cpp: (WebCore::PushSubscription::PushSubscription): (WebCore::PushSubscription::expirationTime const): * Modules/push-api/PushSubscription.h: * Modules/push-api/PushSubscription.idl: * Modules/push-api/PushSubscriptionJSON.h: * Modules/push-api/PushSubscriptionJSON.idl: * Modules/push-api/PushSubscriptionOptions.h: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (addBuiltinTypedefs): * bindings/scripts/test/TestTypedefs.idl: * dom/EpochTimeStamp.h: Renamed from Source/WebCore/dom/DOMTimeStamp.h. (WebCore::convertSecondsToEpochTimeStamp): (WebCore::convertEpochTimeStampToSeconds): * testing/Internals.cpp: (WebCore::Internals::createPushSubscription): * testing/Internals.h: * testing/Internals.idl: Source/WebKitLegacy/mac: * DOM/DOMEvent.h: * DOM/DOMEvent.mm: (-[DOMEvent timeStamp]): * DOM/DOMObject.h: Source/WebKitLegacy/win: * DOMEventsClasses.cpp: (DOMEvent::timeStamp): * DOMEventsClasses.h: (DOMUIEvent::timeStamp): (DOMKeyboardEvent::timeStamp): (DOMMouseEvent::timeStamp): (DOMMutationEvent::timeStamp): (DOMOverflowEvent::timeStamp): (DOMWheelEvent::timeStamp): * Interfaces/DOMEvents.idl: Canonical link: https://commits.webkit.org/242783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cdumez updated WebKit already 🤯: https://bugs.webkit.org/show_bug.cgi?id=231496 |
https://bugs.webkit.org/show_bug.cgi?id=231496 Reviewed by Sam Weinig. Source/WebCore: DOMTimeStamp was renamed EpochTimeStamp. There is no observable behavioral change - it's just a name change. Relevant WebIDL discussions/issue: - whatwg/webidl#2 Which lead to: - w3c/hr-time#124 * Headers.cmake: * Modules/geolocation/Geolocation.cpp: (WebCore::createGeolocationPosition): (WebCore::Geolocation::haveSuitableCachedPosition): * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): (WebCore::GeolocationPosition::timestamp const): (WebCore::GeolocationPosition::GeolocationPosition): * Modules/geolocation/GeolocationPosition.idl: * Modules/notifications/Notification.idl: * Modules/push-api/PushSubscription.cpp: (WebCore::PushSubscription::PushSubscription): (WebCore::PushSubscription::expirationTime const): * Modules/push-api/PushSubscription.h: * Modules/push-api/PushSubscription.idl: * Modules/push-api/PushSubscriptionJSON.h: * Modules/push-api/PushSubscriptionJSON.idl: * Modules/push-api/PushSubscriptionOptions.h: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (addBuiltinTypedefs): * bindings/scripts/test/TestTypedefs.idl: * dom/EpochTimeStamp.h: Renamed from Source/WebCore/dom/DOMTimeStamp.h. (WebCore::convertSecondsToEpochTimeStamp): (WebCore::convertEpochTimeStampToSeconds): * testing/Internals.cpp: (WebCore::Internals::createPushSubscription): * testing/Internals.h: * testing/Internals.idl: Source/WebKitLegacy/mac: * DOM/DOMEvent.h: * DOM/DOMEvent.mm: (-[DOMEvent timeStamp]): * DOM/DOMObject.h: Source/WebKitLegacy/win: * DOMEventsClasses.cpp: (DOMEvent::timeStamp): * DOMEventsClasses.h: (DOMUIEvent::timeStamp): (DOMKeyboardEvent::timeStamp): (DOMMouseEvent::timeStamp): (DOMMutationEvent::timeStamp): (DOMOverflowEvent::timeStamp): (DOMWheelEvent::timeStamp): * Interfaces/DOMEvents.idl: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@283912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also w3c/hr-time#124 and whatwg/webidl#1021 Differential Revision: https://phabricator.services.mozilla.com/D128030
Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also w3c/hr-time#124 and whatwg/webidl#1021 Differential Revision: https://phabricator.services.mozilla.com/D128030
Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also w3c/hr-time#124 and whatwg/webidl#1021 Differential Revision: https://phabricator.services.mozilla.com/D128030
Add the EpochTimeStamp, which can be used to incrementally rename/remove DOMTimeStamp. See also w3c/hr-time#124 and whatwg/webidl#1021 Differential Revision: https://phabricator.services.mozilla.com/D128030
Closes #123
See whatwg/webidl#2 for discussion. Bugs have been filed with the relevant specifications telling them to move away from using DOMTimeStamp.
As this is a typedef, it has no impact on web compat itself.
For normative spec changes, please get implementation commitments anf file issues on the various engines during the review process. All tasks should be complete before merging.
Implementation commitment - primarily for "change" and other normative changes:
Tasks:
Preview | Diff