Title: [278665] trunk
- Revision
- 278665
- Author
- [email protected]
- Date
- 2021-06-09 10:01:18 -0700 (Wed, 09 Jun 2021)
Log Message
Performance API: Implement performance.timeOrigin
https://bugs.webkit.org/show_bug.cgi?id=174862
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
* web-platform-tests/hr-time/idlharness.any-expected.txt:
* web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
* web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt:
Source/WebCore:
* page/Performance.cpp:
(WebCore::Performance::timeOrigin const):
* page/Performance.h:
* page/Performance.idl:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (278664 => 278665)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-09 17:01:18 UTC (rev 278665)
@@ -1,3 +1,14 @@
+2021-06-09 Alex Christensen <[email protected]>
+
+ Performance API: Implement performance.timeOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=174862
+
+ Reviewed by Ryosuke Niwa.
+
+ * web-platform-tests/hr-time/idlharness.any-expected.txt:
+ * web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
+ * web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt:
+
2021-06-08 Rob Buis <[email protected]>
CSSOM test for serializing counter() fails
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any-expected.txt (278664 => 278665)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any-expected.txt 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any-expected.txt 2021-06-09 17:01:18 UTC (rev 278665)
@@ -18,14 +18,14 @@
PASS Performance interface: existence and properties of interface prototype object's "constructor" property
PASS Performance interface: existence and properties of interface prototype object's @@unscopables property
PASS Performance interface: operation now()
-FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
+PASS Performance interface: attribute timeOrigin
PASS Performance interface: operation toJSON()
PASS Performance must be primary interface of performance
PASS Stringification of performance
PASS Performance interface: performance must inherit property "now()" with the proper type
-FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
+PASS Performance interface: performance must inherit property "timeOrigin" with the proper type
PASS Performance interface: performance must inherit property "toJSON()" with the proper type
-FAIL Performance interface: default toJSON operation on performance assert_true: property "timeOrigin" should be present in the output of Performance.prototype.toJSON() expected true got false
+PASS Performance interface: default toJSON operation on performance
PASS Window interface: attribute performance
PASS Window interface: self must inherit property "performance" with the proper type
PASS WorkerGlobalScope interface: existence and properties of interface object
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any.worker-expected.txt (278664 => 278665)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any.worker-expected.txt 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any.worker-expected.txt 2021-06-09 17:01:18 UTC (rev 278665)
@@ -18,14 +18,14 @@
PASS Performance interface: existence and properties of interface prototype object's "constructor" property
PASS Performance interface: existence and properties of interface prototype object's @@unscopables property
PASS Performance interface: operation now()
-FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
+PASS Performance interface: attribute timeOrigin
PASS Performance interface: operation toJSON()
PASS Performance must be primary interface of performance
PASS Stringification of performance
PASS Performance interface: performance must inherit property "now()" with the proper type
-FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
+PASS Performance interface: performance must inherit property "timeOrigin" with the proper type
PASS Performance interface: performance must inherit property "toJSON()" with the proper type
-FAIL Performance interface: default toJSON operation on performance assert_true: property "timeOrigin" should be present in the output of Performance.prototype.toJSON() expected true got false
+PASS Performance interface: default toJSON operation on performance
PASS Window interface: existence and properties of interface object
PASS WorkerGlobalScope interface: attribute performance
PASS WorkerGlobalScope interface: self must inherit property "performance" with the proper type
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt (278664 => 278665)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt 2021-06-09 17:01:18 UTC (rev 278665)
@@ -1,3 +1,3 @@
-FAIL timeOrigin and now() should be correctly ordered between window and worker assert_less_than: Document timeOrigin must be earlier than worker timeOrigin expected a number but got a "undefined"
+PASS timeOrigin and now() should be correctly ordered between window and worker
Modified: trunk/Source/WebCore/ChangeLog (278664 => 278665)
--- trunk/Source/WebCore/ChangeLog 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/Source/WebCore/ChangeLog 2021-06-09 17:01:18 UTC (rev 278665)
@@ -1,3 +1,15 @@
+2021-06-09 Alex Christensen <[email protected]>
+
+ Performance API: Implement performance.timeOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=174862
+
+ Reviewed by Ryosuke Niwa.
+
+ * page/Performance.cpp:
+ (WebCore::Performance::timeOrigin const):
+ * page/Performance.h:
+ * page/Performance.idl:
+
2021-06-09 Simon Fraser <[email protected]>
Unreviewed Windows build fix.
Modified: trunk/Source/WebCore/page/Performance.cpp (278664 => 278665)
--- trunk/Source/WebCore/page/Performance.cpp 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/Source/WebCore/page/Performance.cpp 2021-06-09 17:01:18 UTC (rev 278665)
@@ -79,6 +79,11 @@
return nowInReducedResolutionSeconds().milliseconds();
}
+DOMHighResTimeStamp Performance::timeOrigin() const
+{
+ return reduceTimeResolution(m_timeOrigin.approximateWallTime().secondsSinceEpoch()).milliseconds();
+}
+
ReducedResolutionSeconds Performance::nowInReducedResolutionSeconds() const
{
Seconds now = MonotonicTime::now() - m_timeOrigin;
Modified: trunk/Source/WebCore/page/Performance.h (278664 => 278665)
--- trunk/Source/WebCore/page/Performance.h 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/Source/WebCore/page/Performance.h 2021-06-09 17:01:18 UTC (rev 278665)
@@ -75,6 +75,7 @@
~Performance();
DOMHighResTimeStamp now() const;
+ DOMHighResTimeStamp timeOrigin() const;
ReducedResolutionSeconds nowInReducedResolutionSeconds() const;
PerformanceNavigation* navigation();
Modified: trunk/Source/WebCore/page/Performance.idl (278664 => 278665)
--- trunk/Source/WebCore/page/Performance.idl 2021-06-09 16:55:21 UTC (rev 278664)
+++ trunk/Source/WebCore/page/Performance.idl 2021-06-09 17:01:18 UTC (rev 278665)
@@ -38,7 +38,6 @@
GenerateIsReachable=ImplScriptExecutionContext,
] interface Performance : EventTarget {
DOMHighResTimeStamp now();
- // FIXME: Implement 'timeOrigin' - https://webkit.org/b/174862
- // readonly attribute DOMHighResTimeStamp timeOrigin;
+ readonly attribute DOMHighResTimeStamp timeOrigin;
[Default] object toJSON();
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes