Skip to content

LoAF initial spec - #122

Merged
noamr merged 3 commits into
mainfrom
loaf-initial
Nov 26, 2023
Merged

noamr merged 3 commits into
mainfrom
loaf-initial

Conversation

@noamr

@noamr noamr commented Nov 21, 2023 •

Copy link
Copy Markdown
Contributor

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

@yoavweiss yoavweiss left a comment

Copy link
Copy Markdown
Contributor

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 :)

Comment thread index.bs Outdated
readonly attribute DOMString name;
readonly attribute DOMString entryType;
readonly attribute DOMHighResTimeStamp startTime;
readonly attribute DOMHighResTimeStamp duration;

Copy link
Copy Markdown
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

Comment thread index.bs Resolved
Comment thread 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Spurious "this's"?

Comment thread index.bs Resolved
Comment thread 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/info=/info/

Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

Comment thread 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/an/a/

Comment thread 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
Copy Markdown
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?

Comment thread index.bs Resolved
Comment thread 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
Copy Markdown
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.

@yoavweiss yoavweiss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM % nit

Comment thread index.bs Resolved
Comment thread 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
Copy Markdown
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?

Comment thread index.bs Resolved
@noamr
noamr merged commit e8f3523 into main Nov 26, 2023
@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