Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ urlPrefix: https://tc39.es/ecma262/multipage/managing-memory.html

<pre class=link-defaults>
spec:html; type:dfn; for:/; text:browsing context
spec:hr-time-3; type:dfn; text:duration
</pre>

Introduction {#intro}
Expand Down Expand Up @@ -158,6 +159,8 @@ Long Animation Frame timing involves the following new interfaces:

readonly attribute DOMHighResTimeStamp renderStart;
readonly attribute DOMHighResTimeStamp styleAndLayoutStart;
readonly attribute DOMHighResTimeStamp styleDuration;
readonly attribute DOMHighResTimeStamp layoutDuration;
readonly attribute DOMHighResTimeStamp blockingDuration;
readonly attribute DOMHighResTimeStamp firstUIEventTimestamp;
[SameObject] readonly attribute FrozenArray&lt;PerformanceScriptTiming&gt; scripts;
Expand All @@ -181,6 +184,10 @@ The {{PerformanceLongAnimationFrameTiming/renderStart}} attribute's getter step

The {{PerformanceLongAnimationFrameTiming/styleAndLayoutStart}} attribute's getter step is to return the [=relative high resolution time=] given [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/style and layout start time=] and [=this=]'s [=relevant global object=].

The {{PerformanceLongAnimationFrameTiming/styleDuration}} attribute's getter step is to return [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/style duration=].

The {{PerformanceLongAnimationFrameTiming/layoutDuration}} attribute's getter step is to return [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/layout duration=].

The {{PerformanceLongAnimationFrameTiming/firstUIEventTimestamp}} attribute's getter step is to return the [=relative high resolution time=] given [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/first ui event timestamp=] and [=this=]'s [=relevant global object=].

The {{PerformanceLongAnimationFrameTiming/blockingDuration}} attribute's getter steps are:
Expand Down Expand Up @@ -259,6 +266,8 @@ The {{PerformanceLongAnimationFrameTiming/scripts}} attribute's getter steps are
readonly attribute long long sourceCharPosition;
readonly attribute DOMHighResTimeStamp pauseDuration;
readonly attribute DOMHighResTimeStamp forcedStyleAndLayoutDuration;
readonly attribute DOMHighResTimeStamp forcedStyleDuration;
readonly attribute DOMHighResTimeStamp forcedLayoutDuration;
readonly attribute Window? window;
readonly attribute ScriptWindowAttribution windowAttribution;
[Default] object toJSON();
Expand Down Expand Up @@ -288,7 +297,7 @@ The {{PerformanceScriptTiming/invoker}} attribute's getter steps are:
1. If |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event target element id=] is not the empty string, then:
Set |targetName| to the [=concatenate|concatenation=] of « |targetName|, "#", |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event target element id=] ».
1. Otherwise, If |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event target element src attribute=] is not the empty string, then:
Set |targetName| to the [=concatenate|concatenation=] of « |targetName|, '[src=', |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event target element src attribute=], ']' ».
Set |targetName| to the [=concatenate|concatenation=] of « |targetName|, "[src=", |this|'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event target element src attribute=], "]" ».
1. Return the [=concatenate|concatenation=] of « |targetName|, ".on", [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/event type=] ».

Issue: this feels a bit custom, need to discuss name generation.
Expand Down Expand Up @@ -316,6 +325,14 @@ The {{PerformanceScriptTiming/forcedStyleAndLayoutDuration}} attribute's getter

Issue: Find a way to make this interoperable/normative. Perhaps mark those functions in WebIDL as requiring synchronous style/layout? Also move to [=PerformanceScriptTiming/timing info=] once that's resolved.

The {{PerformanceScriptTiming/forcedStyleDuration}} attribute's getter step is to return an [=implementation-defined=] value that represents time spent performing style recalculation synchronously (without layout), e.g. by calling {{Window/getComputedStyle()}}.

Issue: Find a way to make this interoperable/normative.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm need a bit more to go on here.

Copy link
Copy Markdown
Contributor Author

@yoavweiss yoavweiss Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on how we can do that, given the vagueness of the load-bearing "resolved value computed" in https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle?


The {{PerformanceScriptTiming/forcedLayoutDuration}} attribute's getter step is to return an [=implementation-defined=] value that represents time spent performing layout synchronously (without style recalculation), e.g. by calling {{Element/getBoundingClientRect()}} after the layout is already invalidated.

Issue: Find a way to make this interoperable/normative.

The {{PerformanceScriptTiming/pauseDuration}} attribute's getter step is to return [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/pause duration=].

The {{PerformanceScriptTiming/sourceURL}} attribute's getter step is to return [=this=]'s [=PerformanceScriptTiming/timing info=]'s [=script timing info/source url=].
Expand Down Expand Up @@ -347,9 +364,15 @@ It has the following [=struct/items=]:
: <dfn>first ui event timestamp</dfn>
: <dfn>end time</dfn>
:: A {{DOMHighResTimeStamp}}, initially 0.
Note: all the above are [=monotonic clock/unsafe current time=|unsafe=],
Note: all the above are [=unsafe shared current time|unsafe=],
and should be [=coarsen time|coarsened=] when exposed via an API.

: <dfn>style duration</dfn>
:: A {{DOMHighResTimeStamp}} representing a number of milliseconds, initially 0.

: <dfn>layout duration</dfn>
:: A {{DOMHighResTimeStamp}} representing a number of milliseconds, initially 0.

: <dfn>task durations</dfn>
:: A [=/list=] of {{DOMHighResTimeStamp}}, initially empty.

Expand Down
Loading