Skip to content
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

LoAF initial spec #122

Merged
merged 3 commits into from
Nov 26, 2023
Merged

LoAF initial spec #122

merged 3 commits into from
Nov 26, 2023

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Nov 21, 2023

This includes part of the long animation frame spec:

  • Intro
  • Security & privacy
  • Some of the attributes

It doesn't include yet:

  • Scripts
  • desiredRenderStart
  • firstUIEventTimestamp

Note also that it exports a few algorithms to be called from the HTML spec.


Preview | Diff

This includes part of the long animation frame spec:
- Intro
- Security & privacy
- Some of the attributes

It doesn't include yet:
- Scripts
- desiredRenderStart
- firstUIEventTimestamp

Note also that it exports a few algorithms to be called from the HTML spec.
@noamr noamr requested review from mmocny and yoavweiss November 21, 2023 17:35
@noamr noamr changed the title LoAF initial commit LoAF initial spec Nov 21, 2023
Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

Thanks! A pile of nits :)

index.bs Outdated
readonly attribute DOMString name;
readonly attribute DOMString entryType;
readonly attribute DOMHighResTimeStamp startTime;
readonly attribute DOMHighResTimeStamp duration;
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to redefine the attributes that are in PerformanceEntry

index.bs Show resolved Hide resolved
index.bs Outdated

The {{PerformanceLongAnimationFrameTiming/blockingDuration}} attribute's getter steps are:

1. Let |workDuration| be [=this=]'s [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/longest task duration=].
Copy link
Contributor

Choose a reason for hiding this comment

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

Spurious "this's"?

index.bs Show resolved Hide resolved
index.bs Outdated

1. Let |workDuration| be [=this=]'s [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info/longest task duration=].
1. Let |renderDuration| be the 0.
1. If [=this=]'s [=PerformanceLongAnimationFrameTiming/timing info=]'s [=frame timing info=/update the rendering start time=] is not zero, then:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/info=/info/

index.bs Outdated
:: A {{DOMHighResTimeStamp}}, initially 0.
</dl>

A {{Document}} has a null-or-[=frame timing info=] <dfn>current frame timing info</dfn>, initially null.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just append a "null-or-" to random structs without defining the whole thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like your defining a new type named "null-or-frame timing info". But I see a similar pattern in Fetch, only without the "-". Maybe drop them?

index.bs Outdated
</div>

<div algorithm="Report task start time">
To <dfn export>report task start time</dfn> given an {{DOMHighResTimeStamp}} |taskStartTime|, and a {{Document}} |document|:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/an/a/

index.bs Outdated
1. If |root|'s [=current frame timing info=] is null,
then set |root|'s [=current frame timing info=] to a new [=frame timing info=] whose [=frame timing info/start time=] is |taskStartTime|.

1. Set |timingInfo|'s [=current frame timing info=]'s [=frame timing info/current task start time=] to |taskStartTime|.
Copy link
Contributor

Choose a reason for hiding this comment

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

What's |timingInfo| here?

index.bs Show resolved Hide resolved
index.bs Outdated
</div>

<div algorithm="Queue frame timing">
To <dfn export>flush frame timing</dfn> given a {{Document}} |document| and a {{DOMHighResTimeStamp}} |endTime|:
Copy link
Contributor

Choose a reason for hiding this comment

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

Generally, it might be better to prefix all the unsafe timestamps with "unsafe" (or something similar), rather than prefixing the safe ones.

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

LGTM % nit

index.bs Show resolved Hide resolved
index.bs Outdated
:: A {{DOMHighResTimeStamp}}, initially 0.
</dl>

A {{Document}} has a null-or-[=frame timing info=] <dfn>current frame timing info</dfn>, initially null.
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like your defining a new type named "null-or-frame timing info". But I see a similar pattern in Fetch, only without the "-". Maybe drop them?

index.bs Show resolved Hide resolved
@noamr noamr merged commit e8f3523 into main Nov 26, 2023
2 checks passed
@noamr noamr deleted the loaf-initial branch November 26, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants