Changeset 278665 in webkit


Ignore:
Timestamp:
Jun 9, 2021 10:01:18 AM (14 months ago)
Author:
achristensen@apple.com
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:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r278648 r278665  
     12021-06-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Performance API: Implement performance.timeOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=174862
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * web-platform-tests/hr-time/idlharness.any-expected.txt:
     9        * web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
     10        * web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt:
     11
    1122021-06-08  Rob Buis  <rbuis@igalia.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any-expected.txt

    r267651 r278665  
    1919PASS Performance interface: existence and properties of interface prototype object's @@unscopables property
    2020PASS Performance interface: operation now()
    21 FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
     21PASS Performance interface: attribute timeOrigin
    2222PASS Performance interface: operation toJSON()
    2323PASS Performance must be primary interface of performance
    2424PASS Stringification of performance
    2525PASS Performance interface: performance must inherit property "now()" with the proper type
    26 FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
     26PASS Performance interface: performance must inherit property "timeOrigin" with the proper type
    2727PASS Performance interface: performance must inherit property "toJSON()" with the proper type
    28 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
     28PASS Performance interface: default toJSON operation on performance
    2929PASS Window interface: attribute performance
    3030PASS Window interface: self must inherit property "performance" with the proper type
  • trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any.worker-expected.txt

    r267651 r278665  
    1919PASS Performance interface: existence and properties of interface prototype object's @@unscopables property
    2020PASS Performance interface: operation now()
    21 FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
     21PASS Performance interface: attribute timeOrigin
    2222PASS Performance interface: operation toJSON()
    2323PASS Performance must be primary interface of performance
    2424PASS Stringification of performance
    2525PASS Performance interface: performance must inherit property "now()" with the proper type
    26 FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
     26PASS Performance interface: performance must inherit property "timeOrigin" with the proper type
    2727PASS Performance interface: performance must inherit property "toJSON()" with the proper type
    28 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
     28PASS Performance interface: default toJSON operation on performance
    2929PASS Window interface: existence and properties of interface object
    3030PASS WorkerGlobalScope interface: attribute performance
  • trunk/LayoutTests/imported/w3c/web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt

    r267314 r278665  
    11
    2 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"
     2PASS timeOrigin and now() should be correctly ordered between window and worker
    33
  • trunk/Source/WebCore/ChangeLog

    r278664 r278665  
     12021-06-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Performance API: Implement performance.timeOrigin
     4        https://bugs.webkit.org/show_bug.cgi?id=174862
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * page/Performance.cpp:
     9        (WebCore::Performance::timeOrigin const):
     10        * page/Performance.h:
     11        * page/Performance.idl:
     12
    1132021-06-09  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WebCore/page/Performance.cpp

    r278391 r278665  
    8080}
    8181
     82DOMHighResTimeStamp Performance::timeOrigin() const
     83{
     84    return reduceTimeResolution(m_timeOrigin.approximateWallTime().secondsSinceEpoch()).milliseconds();
     85}
     86
    8287ReducedResolutionSeconds Performance::nowInReducedResolutionSeconds() const
    8388{
  • trunk/Source/WebCore/page/Performance.h

    r278391 r278665  
    7676
    7777    DOMHighResTimeStamp now() const;
     78    DOMHighResTimeStamp timeOrigin() const;
    7879    ReducedResolutionSeconds nowInReducedResolutionSeconds() const;
    7980
  • trunk/Source/WebCore/page/Performance.idl

    r267408 r278665  
    3939] interface Performance : EventTarget {
    4040    DOMHighResTimeStamp now();
    41     // FIXME: Implement 'timeOrigin' - https://webkit.org/b/174862
    42     // readonly attribute DOMHighResTimeStamp timeOrigin;
     41    readonly attribute DOMHighResTimeStamp timeOrigin;
    4342    [Default] object toJSON();
    4443};
Note: See TracChangeset for help on using the changeset viewer.