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

"run the fullscreen rendering steps" and "run CSS animations and send events" do not actaully exist anywhere #707

Closed
domenic opened this issue Feb 18, 2016 · 15 comments
Labels
clarification Standard could be clearer

Comments

@domenic
Copy link
Member

domenic commented Feb 18, 2016

https://html.spec.whatwg.org/#run-the-fullscreen-rendering-steps

Fullscreen and Web Animations do not actually define these terms. This seems bad?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28001 may already cover this, for Fullscreen at least.

(Separately, I am changing the CSSOMVIEW steps to be links instead of <dfn>s.)

@domenic domenic added the clarification Standard could be clearer label Feb 18, 2016
domenic added a commit that referenced this issue Feb 18, 2016
This incorporates the monkey-patch from the intersection observer spec
directly into HTML, per
w3c/IntersectionObserver#94.

As a drive-by while doing so, changed some nearby steps to link to the
algorithms in [CSSOMVIEW], instead of pretending to be the defining
instance of these terms. See also #707.
@annevk
Copy link
Member

annevk commented Feb 23, 2016

Does https://www.w3.org/Bugs/Public/show_bug.cgi?id=28001#c4 work for all rendering things? It seems @foolip implemented a single queue, but then rendering tasks cannot depend on other rendering tasks having happened.

Happy to introduce "render tasks" if this approach works for folks.

@foolip
Copy link
Member

foolip commented Feb 25, 2016

Note that the "animation frame task" code I worked on never landed, so that shouldn't shape the design.

annevk pushed a commit that referenced this issue Feb 27, 2016
This incorporates the monkey-patch from the intersection observer spec
directly into HTML, per
w3c/IntersectionObserver#94.

As a drive-by while doing so, changed some nearby steps to link to the
algorithms in [CSSOMVIEW], instead of pretending to be the defining
instance of these terms. See also #707.
@foolip
Copy link
Member

foolip commented Dec 8, 2016

I've now landed a concept of "animation frame task" in Blink that I intend to use for Fullscreen, to match the timing of "run the fullscreen rendering steps":
https://codereview.chromium.org/2536643002

What do you all think of introducing "queue an animation frame task"? I think going forward some events could also be done like that, as long as the order of "queue an animation frame task" calls themselves are in a predictable order the order of event dispatch should also stay reliable.

scheib pushed a commit to scheib/chromium that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
jeffcarp added a commit to web-platform-tests/wpt that referenced this issue Dec 8, 2016
Although HTML does not yet define animation frame tasks as used by
Fullscreen, it does have "run the fullscreen rendering steps". That's
the old hook, making the timing of these events relative to resize and
animation frame callbacks unambiguous:
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model

Spec issue: whatwg/html#707

document-exit-fullscreen-timing-manual.html consistently matches
-expected.txt, with (accidentally) correct timing but no resize event.

element-request-fullscreen-timing-manual.html usually matches
-expected.txt, with incorrect timing, but can accidentally get the
timing right and instead fail due to no resize event.

Both are marked as flaky to be safe, and will be enabled in a coming CL.

Note: This CL is also a test for the WPT export process.

Firefox passes both fullscreechange event tests, but fails the
fullscreenerror test. (Implementation preceded spec changes.)

BUG=402376,672436

Review-Url: https://codereview.chromium.org/2564543002
Cr-Commit-Position: refs/heads/master@{#437283}
@domenic
Copy link
Member Author

domenic commented Dec 9, 2016

That sounds very reasonable to me!

@annevk
Copy link
Member

annevk commented Dec 16, 2016

@foolip didn't we want some tasks to be done before others? E.g., resize before fullscreen or the other way around? Seems hard with a single queue.

@foolip
Copy link
Member

foolip commented Dec 16, 2016

Yes, some order is important, so we can't just replace everything with "queue an animation frame task" and hope that it's preserved. For resize and fullscreenchange in particular, it could be that the spec (HTML?) that says "enqueue an animation frame task to update this and that and fire a resize event" then calls something in Fullscreen causing the request/exit algorithms to continue after the "resize viewport" steps.

For events that are triggered by unrelated things (say network activity and battery level) I think it's reasonable that the order of those events within an animation frame task is unpredictable, same as any "queue a task to fire an event" for such cases.

Practically speaking, do we having things beyond resize and fullscreenchange already known to have a "correct" order?

@annevk
Copy link
Member

annevk commented Dec 16, 2016

Scrolling maybe? Why would network/battery not use the normal event loop? No need to synchronize those with 60Hz display.

@foolip
Copy link
Member

foolip commented Dec 16, 2016

You're right, I just picked two things with no correlation. I guess all things that make sense to synchronize with animation frames are more likely to be correlated. For scroll events, I suppose their order relative to the input events that triggered them matters?

Since other specs have to adopt "enqueue an animation frame task" I think we'll have to look at ordering in each case individually, but of course just by having the hook there's a risk that people use it wrong. But then people can already say vague things about animation frames that don't integrate with HTML's event loop at all.

foolip added a commit that referenced this issue May 4, 2017
Other specifications (Fullscreen) should use this by saying "queue an
animation frame task for /doc/ to ...".

Fixes the fullscreen part of #707.
foolip added a commit that referenced this issue Jun 15, 2017
Introduced in whatwg/fullscreen#92.

Fixes the fullscreen part of #707.

Drive-by: re-wrap lines to 100 columns.
foolip added a commit that referenced this issue Jun 15, 2017
Matches whatwg/fullscreen#94.

Fixes the fullscreen part of #707.

Drive-by: re-wrap lines to 100 columns.
foolip added a commit that referenced this issue Jun 15, 2017
Matches whatwg/fullscreen#94.

Fixes the fullscreen part of #707.

Drive-by: re-wrap lines to 100 columns.
@domenic
Copy link
Member Author

domenic commented Jun 15, 2017

OK, so we fixed the fullscreen thing. What remains is that the spec references a nonexistant "run CSS animations and send events":

For each fully active Document in docs, run CSS animations and send events for that Document, passing in now as the timestamp. [CSSANIMATIONS]

I tried to find some kind of processing model that fires these events in https://drafts.csswg.org/css-animations-1/, but I could not. Paging the editors of that spec for advice; it appears there's no normative requirement, either in HTML or in the Web Animations spec, which actually states that things must animate and that events must be fired?

@grorg @dbaron @tabatkins @birtles

@birtles
Copy link
Contributor

birtles commented Jun 15, 2017

The second half of the "Timing model concepts" section describes the integration of Web Animations with this processing model but its somewhat placeholder text at this stage. Perhaps we could reword "run CSS animations and send events" to "update declarative animations and send animation events". Then we can refer back to that definition from Web Animations / CSS animations / CSS transitions.

Long-term when CSS animations and transitions are speced in terms of Web Animations we can drop the "passing in now as the timestamp" part.

@domenic
Copy link
Member Author

domenic commented Jun 16, 2017

That sounds great. Let me know if you're able to work on creating such a hook for us to link to, and I'll happily update HTML.

@birtles
Copy link
Contributor

birtles commented Nov 17, 2017

I'll put together some spec text for this in the next few days. (It's a bit awkward because ultimately the spec text belongs in Web Animations even though Web Animations is not yet a normative reference for CSS Animations/Transitions.)

@birtles
Copy link
Contributor

birtles commented Dec 4, 2017

@domenic I've added update animations and send events to Web Animations now so I suggest that might be a suitable place to link to.

@birtles
Copy link
Contributor

birtles commented Dec 5, 2017

Note that today I moved the Web Animations ED into the csswg-drafts repository so the updated link is: https://drafts.csswg.org/web-animations-1/#update-animations-and-send-events (I've updated my previous comment too).

@birtles
Copy link
Contributor

birtles commented Dec 5, 2017

And an unversioned link, i.e. just web-animations should work too.

alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Matches whatwg/fullscreen#94.

Fixes the fullscreen part of whatwg#707.

Drive-by: re-wrap lines to 100 columns.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

4 participants