Skip to content

Commit

Permalink
Convert some "queue a task" to "queue an element task"
Browse files Browse the repository at this point in the history
Helps with #4980 and #4506.
  • Loading branch information
dtapuska authored and domenic committed Dec 19, 2019
1 parent ef4d727 commit 31666be
Showing 1 changed file with 97 additions and 69 deletions.
166 changes: 97 additions & 69 deletions source
Expand Up @@ -13921,8 +13921,9 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
be fetched and processed, with the expectation that this will be done correctly.</p>
</li>

<li><span>Queue a task</span> on the <span>networking task source</span> to <span>process the
linked resource</span> given <var>el</var>, <var>success</var>, and <var>response</var>.</li>
<li><span>Queue an element task</span> on the <span>networking task source</span> given
<var>el</var> to <span>process the linked resource</span> given <var>el</var>,
<var>success</var>, and <var>response</var>.</li>
</ol>
</li>

Expand Down Expand Up @@ -15374,7 +15375,8 @@ interface <dfn>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
</li>

<li>
<p><span>Queue a task</span> on the <span>networking task source</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>networking task source</span> given
<var>element</var> and the following steps:</p>

<ol>
<li><p>If <var>success</var> is true, <span data-x="concept-event-fire">fire an event</span>
Expand Down Expand Up @@ -28285,10 +28287,18 @@ was an English &lt;a href="/wiki/Music_hall">music hall&lt;/a> singer, ...</code

<li><p>&#x231B; Set <span>pending request</span> to null.</p></li>

<li><p>&#x231B; <span>Queue a task</span> to change the <span>current request</span>'s <span
data-x="img-req-url">current URL</span> to <var>selected source</var>, <span
data-x="concept-event-fire">fire an event</span> named <code data-x="event-error">error</code>
at the <code>img</code> element.</p></li>
<li>
<p>&#x231B; <span>Queue an element task</span> on the <span>DOM manipulation task
source</span> given the <code>img</code> element and the following steps:</p>

<ol>
<li><p>Change the <span>current request</span>'s <span data-x="img-req-url">current
URL</span> to <var>selected source</var>.</p></li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-error">error</code> at the <code>img</code> element.</p></li>
</ol>
</li>

<li><p>&#x231B; Return.</p></li>
</ol>
Expand Down Expand Up @@ -29177,7 +29187,8 @@ was an English &lt;a href="/wiki/Music_hall">music hall&lt;/a> singer, ...</code

<li>

<p><span>Queue a task</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>DOM manipulation task source</span> given
the <code>img</code> element and the following steps:</p>

<ol>

Expand Down Expand Up @@ -30410,10 +30421,8 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {

<dd>

<p><span>Queue a task</span> to run the <span>iframe load event steps</span>.</p>

<p>The <span>task source</span> for this <span data-x="concept-task">task</span> is the
<span>DOM manipulation task source</span>.</p>
<p><span>Queue an element task</span> on the <span>DOM manipulation task source</span> given
the <code>iframe</code> element and the <span>iframe load event steps</span>.</p>

</dd>

Expand Down Expand Up @@ -33538,9 +33547,10 @@ interface <dfn>MediaError</dfn> {

<ol>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span>
named <code data-x="event-media-emptied">emptied</code> at the <span>media
element</span>.</p></li>
<li><p><span>Queue an element task</span> on the <span>media element event task source</span>
given the <span>media element</span> to <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-emptied">emptied</code> at the <span>media element</span>.</p></li>

<li><p>If a fetching process is in progress for the <span>media
element</span>, the user agent should stop it.</p></li>
Expand Down Expand Up @@ -33689,9 +33699,10 @@ interface <dfn>MediaError</dfn> {
data-x="dom-media-networkState">networkState</code> to <code
data-x="dom-media-NETWORK_LOADING">NETWORK_LOADING</code>.</p></li>

<li><p>&#x231B; <span>Queue a task</span> to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-media-loadstart">loadstart</code> at the <span>media
element</span>.</p></li>
<li><p>&#x231B; <span>Queue an element task</span> on the <span>media element event task
source</span> given the <span>media element</span> to <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-loadstart">loadstart</code> at the <span>media element</span>.</p></li>

<li>

Expand Down Expand Up @@ -33848,9 +33859,10 @@ interface <dfn>MediaError</dfn> {
with <var>urlRecord</var>. If that algorithm returns without aborting <em>this</em> one,
then the load failed.</p></li>

<li><p><i>Failed with elements</i>: <span>Queue a task</span> to <span
<li><p><i>Failed with elements</i>: <span>Queue an element task</span> on the <span>media
element event task source</span> given <var>candidate</var> to <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-source-error">error</code> at the <var>candidate</var> element.</p></li>
data-x="event-source-error">error</code> at <var>candidate</var>.</p></li>

<li><p><span>Await a stable state</span>. The <span>synchronous section</span>
consists of all the remaining steps of this algorithm until the algorithm says the
Expand Down Expand Up @@ -33881,7 +33893,8 @@ interface <dfn>MediaError</dfn> {

<li><p>&#x231B; Set the element's <span>show poster flag</span> to true.</p></li>

<li><p>&#x231B; <span>Queue a task</span> to set the element's <span>delaying-the-load-event
<li><p>&#x231B; <span>Queue an element task</span> on the <span>media element event task
source</span> given the element to set the element's <span>delaying-the-load-event
flag</span> to false. This stops <span data-x="delay the load event">delaying the load
event</span>.</p></li>

Expand Down Expand Up @@ -33988,11 +34001,13 @@ interface <dfn>MediaError</dfn> {
<li><p>Set the <code data-x="dom-media-networkState">networkState</code> to <code
data-x="dom-media-NETWORK_IDLE">NETWORK_IDLE</code>.</p></li>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span>
<li><p><span>Queue an element task</span> on the <span>media element event task
source</span> given the element to <span data-x="concept-event-fire">fire an event</span>
named <code data-x="event-media-suspend">suspend</code> at the element.</p></li>

<li><p><span>Queue a task</span> to set the element's <span>delaying-the-load-event flag</span>
to false. This stops <span data-x="delay the load event">delaying the load
<li><p><span>Queue an element task</span> on the <span>media element event task
source</span> given the element to set the element's <span>delaying-the-load-event
flag</span> to false. This stops <span data-x="delay the load event">delaying the load
event</span>.</p></li>

<li><p>Wait for the task to be run.</p></li>
Expand Down Expand Up @@ -35075,8 +35090,9 @@ interface <dfn>MediaError</dfn> {

<dd id="fire-loadedmetadata">

<p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-loadedmetadata">loadedmetadata</code> at the element.</p>
<p><span>Queue an element task</span> on the <span>media element event task source</span>
given the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-loadedmetadata">loadedmetadata</code> at the element.</p>

<p class="note">Before this task is run, as part of the <span>event loop</span> mechanism, the
rendering will have been updated to resize the <code>video</code> element if appropriate.</p>
Expand Down Expand Up @@ -35171,8 +35187,9 @@ interface <dfn>MediaError</dfn> {
<li>If the element's <span>show poster flag</span> is true, set it to false and run the
<i data-x="time marches on">time marches on</i> steps.</li>

<li><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-play">play</code> at the element.</li>
<li><span>Queue an element task</span> on the <span>media element event task source</span>
given the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-play">play</code> at the element.</li>

<li><span>Notify about playing</span> for the element.</li>

Expand All @@ -35196,8 +35213,9 @@ interface <dfn>MediaError</dfn> {
<li>Run the <span>internal pause steps</span> and set the <span>can autoplay flag</span> to
true.</li>

<li><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-pause">pause</code> at the element.</li>
<li><span>Queue an element task</span> on the <span>media element event task source</span>
given the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-pause">pause</code> at the element.</li>

</ol>

Expand Down Expand Up @@ -35477,7 +35495,8 @@ interface <dfn>MediaError</dfn> {

<li>

<p><span>Queue a task</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>media element event task source</span> given
the <span>media element</span> and the following steps:</p>

<ol>

Expand Down Expand Up @@ -35609,7 +35628,8 @@ interface <dfn>MediaError</dfn> {

<li>

<p><span>Queue a task</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>media element event task source</span>
give the element and the following steps:</p>

<ol>

Expand Down Expand Up @@ -35687,8 +35707,9 @@ interface <dfn>MediaError</dfn> {
<li><p>If the <span>show poster flag</span> is true, set the element's <span>show poster
flag</span> to false and run the <i data-x="time marches on">time marches on</i> steps.</p></li>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span>
named <code data-x="event-media-play">play</code> at the element.</p></li>
<li><p><span>Queue an element task</span> on the <span>media element event task source</span>
given the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-play">play</code> at the element.</p></li>

<li>

Expand Down Expand Up @@ -35765,7 +35786,8 @@ interface <dfn>MediaError</dfn> {

<li>

<p><span>Queue a task</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>media element event task source</span>
given the element and the following steps:</p>

<ol>

Expand Down Expand Up @@ -36167,8 +36189,9 @@ interface <dfn>MediaError</dfn> {

</li>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-seeking">seeking</code> at the element.</p></li>
<li><p><span>Queue an element task</span> on the <span>media element event task source</span>
given the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-seeking">seeking</code> at the element.</p></li>

<li>

Expand Down Expand Up @@ -36207,12 +36230,13 @@ interface <dfn>MediaError</dfn> {

<li><p>&#x231B; Run the <span>time marches on</span> steps.</p></li>

<li id="seekUpdate"><p>&#x231B; <span>Queue a task</span> to <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-media-timeupdate">timeupdate</code> at the element.</p></li>
<li id="seekUpdate"><p>&#x231B; <span>Queue an element task</span> on the <span>media element
event task source</span> given the element to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-media-timeupdate">timeupdate</code> at the element.</p></li>

<li><p>&#x231B; <span>Queue a task</span> to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-media-seeked">seeked</code> at the element.</p></li>
<li><p>&#x231B; <span>Queue an element task</span> on the <span>media element event task
source</span> given the element to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-seeked">seeked</code> at the element.</p></li>

</ol>

Expand Down Expand Up @@ -36987,7 +37011,8 @@ interface <dfn>VideoTrack</dfn> {

<li>

<p><span>Queue a task</span> to run these steps:</p>
<p><span>Queue an element task</span> on the <span>media element event task source</span>
given the <span>media element</span> to run these steps:</p>

<ol>

Expand Down Expand Up @@ -37872,7 +37897,8 @@ interface <dfn>TextTrack</dfn> : <span>EventTarget</span> {

<li>

<p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<p><span>Queue an element task</span> on the <span>media element event task source</span> given
the <span>media element</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-media-addtrack">addtrack</code> at the <span>media element</span>'s <code
data-x="dom-media-textTracks">textTracks</code> attribute's <code>TextTrackList</code> object,
using <code>TrackEvent</code>, with the <code data-x="dom-TrackEvent-track">track</code>
Expand Down Expand Up @@ -46119,8 +46145,9 @@ interface <dfn>HTMLInputElement</dfn> : <span>HTMLElement</span> {
"<code data-x="attr-dir-rtl">rtl</code>" if the user selected a right-to-left writing
direction.</p></li>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-input">input</code> at the <code>input</code> element, with the <code
<li><p><span>Queue an element task</span> on the <span>user interaction task source</span> given
the element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-input">input</code> at the element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>

</ol>
Expand Down Expand Up @@ -48416,14 +48443,22 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#

<li><p>Wait for the user to have made their selection.</p></li>

<li><p><span>Queue a task</span> to first update the element's <span
data-x="concept-input-type-file-selected">selected files</span> so that it represents the
user's selection, then <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-input">input</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and finally <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-change">change</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
<li>
<p><span>Queue an element task</span> on the <span>user interaction task source</span> given
the <code>input</code> element and the folllowing steps:</p>

<ol>
<li><p>Update the element's <span data-x="concept-input-type-file-selected">selected
files</span> so that it represents the user's selection.</p></li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-input">input</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and finally <span
data-x="concept-event-fire">fire an event</span> named <code
data-x="event-change">change</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
</ol>
</li>
</ol>
</li>
</ol>
Expand Down Expand Up @@ -51924,7 +51959,8 @@ interface <dfn>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
"<code data-x="attr-dir-rtl">rtl</code>" if the user selected a right-to-left writing
direction.</p></li>

<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<li><p><span>Queue an element task</span> on the <span>user interaction task source</span> given
the <code>textarea</code> element to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-input">input</code> at the <code>textarea</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>

Expand Down Expand Up @@ -57012,12 +57048,12 @@ fur

<li>

<p>Let the <code>form</code>'s <span>planned navigation</span> be a new <span
data-x="concept-task">task</span> that consists of running the following steps:</p>
<p><span>Queue an element task</span> on the <span>DOM manipulation task source</span> given
the <code>form</code> element and the following steps:</p>

<ol>

<li><p>Let the <code>form</code>'s <span>planned navigation</span> be null.</p></li>
<li><p>Set the <code>form</code>'s <span>planned navigation</span> to null.</p></li>

<li><p><span>Navigate</span><!--DONAV form--> <var>target browsing context</var> to
<var>destination</var>. If <var>replace</var> is true, then <var>target browsing
Expand All @@ -57027,20 +57063,12 @@ fur

<p>For the purposes of this task, <var>target browsing context</var> and <var>replace</var> are the variables that were set up when the overall form submission
algorithm was run, with their values as they stood when this <span>planned navigation</span>
was <span data-x="queue a task">queued</span>.</p>

</li>

<li>

<p><span data-x="queue a task">Queue the task</span> that is the <code>form</code>'s new
<span>planned navigation</span>.</p>

<p>The <span>task source</span> for this task is the <span>DOM manipulation task
source</span>.</p>
was <span data-x="queue an element task">queued</span>.</p>

</li>

<li><p>Set the <code>form</code>'s <span>planned navigation</span> to the just-queued <span
data-x="concept-task">task</span>.</p>
</ol>

<p>The behaviors are as follows:</p>
Expand Down

0 comments on commit 31666be

Please sign in to comment.