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

Fix task queueing. #524

Merged
merged 7 commits into from
Sep 20, 2024
Merged
Changes from 2 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
84 changes: 48 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ <h2>
context of {{Promise}} objects are used as defined in [[!ECMASCRIPT]].
</p>
<p>
The terms <dfn data-cite="rfc9110#field.accept-language">Accept-Language</dfn>
and <dfn data-cite="rfc9110#authentication">HTTP authentication</dfn> are
The terms <dfn data-cite=
"rfc9110#field.accept-language">Accept-Language</dfn> and
<dfn data-cite="rfc9110#authentication">HTTP authentication</dfn> are
used as defined in [[!RFC9110]].
</p>
<p>
Expand Down Expand Up @@ -840,6 +841,10 @@ <h3>
<p>
Unless otherwise specified, the <a>JavaScript realm</a> for script
objects constructed by algorithm steps is the <a>current realm</a>.
Unless otherwise specified, all global tasks use the <a data-cite=
"!HTML#networking-task-source">networking task source</a> associated
with the <a data-cite="!HTML#global-object">global object</a> of the
<a>current realm</a>.
markafoltz marked this conversation as resolved.
Show resolved Hide resolved
</p>
</section>
<section>
Expand Down Expand Up @@ -1037,6 +1042,10 @@ <h4>
<h4>
Selecting a presentation display
</h4>
<p>
The global tasks queued in these steps use the <a data-cite=
"!HTML#-interaction-task-source">user interaction task source</a>.
</p>
markafoltz marked this conversation as resolved.
Show resolved Hide resolved
<p>
When the <code><dfn data-dfn-for=
"PresentationRequest">start</dfn></code> method is called, the
Expand Down Expand Up @@ -1104,16 +1113,16 @@ <h4>
</ol>Then run the following steps:
<ol>
<li>
<a>Reject</a> <var>P</var> with a {{NotFoundError}}
exception.
<a>Queue a global task</a> to <a>reject</a> <var>P</var> with
a {{NotFoundError}} exception.
</li>
<li>Abort all remaining steps.
</li>
</ol>
</li>
<li>If the user <em>denies permission</em> to use a display, reject
<var>P</var> with an {{NotAllowedError}} exception, and abort all
remaining steps.
<li>If the user <em>denies permission</em> to use a display,
<a>queue a global task</a> to reject <var>P</var> with an
{{NotAllowedError}} exception, and abort all remaining steps.
</li>
<li>Otherwise, the user <em>grants permission</em> to use a
display; let <var>D</var> be that display.
Expand Down Expand Up @@ -1250,10 +1259,10 @@ <h4>
<var>S</var>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named <a data-link-for=
"PresentationRequest">connectionavailable</a>, that uses the
<a>PresentationConnectionAvailableEvent</a> interface, with the
<a data-link-for=
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for="PresentationRequest">connectionavailable</a>,
that uses the <a>PresentationConnectionAvailableEvent</a>
interface, with the <a data-link-for=
"PresentationConnectionAvailableEvent">connection</a> attribute
initialized to <var>S</var>, at <var>presentationRequest</var>.
The event must not bubble and must not be cancelable.
Expand Down Expand Up @@ -1341,8 +1350,8 @@ <h4>
<a>PresentationConnection</a>.
</li>
<li>
<a>Resolve</a> <var>P</var> with
<var>existingConnection</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with <var>existingConnection</var>.
</li>
<li>If the <a>presentation connection state</a> of
<var>existingConnection</var> is <a data-link-for=
Expand Down Expand Up @@ -1404,10 +1413,11 @@ <h4>
presentations</a>.
</li>
<li>
<a>Resolve</a> <var>P</var> with <var>newConnection</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with <var>newConnection</var>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for=
"PresentationRequest">connectionavailable</a>, that uses the
<a>PresentationConnectionAvailableEvent</a> interface, with
Expand All @@ -1426,7 +1436,8 @@ <h4>
</ol>
</li>
<li>
<a>Reject</a> <var>P</var> with a {{NotFoundError}} exception.
<a>Queue a global task</a> to <a>reject</a> <var>P</var> with a
{{NotFoundError}} exception.
</li>
</ol>
</section>
Expand Down Expand Up @@ -1620,8 +1631,8 @@ <h4>
then:
<ol>
<li>
<a>Reject</a> <var>P</var> with a {{NotSupportedError}}
exception.
<a>Queue a global task</a> to <a>reject</a> <var>P</var> with
a {{NotSupportedError}} exception.
</li>
<li>Abort all the remaining steps.
</li>
Expand All @@ -1631,8 +1642,8 @@ <h4>
<var>presentationRequest</var> is not <code>null</code>, then:
<ol>
<li>
<a>Resolve</a> <var>P</var> with the request's
<a>presentation display availability</a>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with the request's <a>presentation display availability</a>.
</li>
<li>Abort all the remaining steps.
</li>
Expand All @@ -1657,7 +1668,8 @@ <h4>
</div>
</li>
<li>
<a>Resolve</a> <var>P</var> with <var>A</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var> with
<var>A</var>.
</li>
</ol>
</section>
Expand Down Expand Up @@ -1741,8 +1753,8 @@ <h4>
<var>newAvailability</var> and skip the following step.
</li>
<li>If <var>previousAvailability</var> is not equal to
<var>newAvailability</var>, then <a>queue a task</a> to run the
following steps:
<var>newAvailability</var>, then <a>queue a global task</a> to
run the following steps:
<ol>
<li>Set <var>A</var>'s <a>value</a> property to
<var>newAvailability</var>.
Expand Down Expand Up @@ -2035,8 +2047,8 @@ <h4>
identifier</a> of <var>presentationConnection</var> MUST be sent
with this request.
</li>
<li>If connection completes successfully, <a>queue a task</a> to
run the following steps:
<li>If connection completes successfully, <a>queue a global
task</a> to run the following steps:
markafoltz marked this conversation as resolved.
Show resolved Hide resolved
<ol>
<li>Set the <a>presentation connection state</a> of
<var>presentationConnection</var> to <a data-link-for=
Expand Down Expand Up @@ -2220,8 +2232,8 @@ <h4>
</ol>
</li>
<li>
<a>Queue a task</a> to [=fire an event|fire=] <var>event</var> at
<var>presentationConnection</var>.
<a>Queue a global task</a> to [=fire an event|fire=]
<var>event</var> at <var>presentationConnection</var>.
</li>
</ol>
<p>
Expand Down Expand Up @@ -2386,7 +2398,7 @@ <h4>
<var>presentationConnection</var>, then abort the remaining steps.
</li>
<li>
<a>Queue a task</a> to run the following steps:
<a>Queue a global task</a> to run the following steps:
<ol>
<li>If the <a>presentation connection state</a> of
<var>presentationConnection</var> is not <a data-link-for=
Expand Down Expand Up @@ -2453,7 +2465,7 @@ <h4>
connection</var> is <a data-link-for=
"PresentationConnectionState">connected</a> or
<a data-link-for="PresentationConnectionState">connecting</a>,
then <a>queue a task</a> to run the following steps:
then <a>queue a global task</a> to run the following steps:
<ol>
<li>Set the <a>presentation connection state</a> of
<var>known connection</var> to <a data-link-for=
Expand Down Expand Up @@ -2535,8 +2547,8 @@ <h4>
the user interface and discard it.
</li>
<li>For each <var>connection</var> in
<var>connectedControllers</var>, <a>queue a task</a> to send a
termination confirmation for <var>P</var> using an implementation
<var>connectedControllers</var>, <a>queue a global task</a> to send
a termination confirmation for <var>P</var> using an implementation
specific mechanism to the <a>controlling user agent</a> that owns
the <a>destination browsing context</a> for <var>connection</var>.
<p class="note">
Expand All @@ -2559,7 +2571,7 @@ <h4>
<ol>
<li>For each <var>connection</var> in the <a>set of controlled
presentations</a> that was connected to <var>P</var>, <a>queue a
task</a> to run the following steps:
global task</a> to run the following steps:
<ol>
<li>If the <a>presentation connection state</a> of
<var>connection</var> is not <a data-link-for=
Expand Down Expand Up @@ -2920,9 +2932,9 @@ <h4>
the <a>set of presentation controllers</a>.
</li>
<li>If the <a>presentation controllers promise</a> is not
<code>null</code>, <a>resolve</a> the <a>presentation
controllers promise</a> with the <a>presentation controllers
monitor</a>.
<code>null</code>, <a>queue a global task</a> to <a>resolve</a>
the <a>presentation controllers promise</a> with the
<a>presentation controllers monitor</a>.
</li>
<li>Abort all remaining steps.
</li>
Expand All @@ -2934,7 +2946,7 @@ <h4>
the <a>set of presentation controllers</a>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for=
"PresentationConnectionList">connectionavailable</a>, that
uses the <a>PresentationConnectionAvailableEvent</a>
Expand Down
Loading