From 31666bee42597196edd5ca19e3b72cc89d7033e6 Mon Sep 17 00:00:00 2001 From: Dave Tapuska Date: Thu, 19 Dec 2019 11:06:04 -0800 Subject: [PATCH] Convert some "queue a task" to "queue an element task" Helps with #4980 and #4506. --- source | 166 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 69 deletions(-) diff --git a/source b/source index 050e5d0f8fd..85a87833f23 100644 --- a/source +++ b/source @@ -13921,8 +13921,9 @@ interface HTMLLinkElement : HTMLElement { be fetched and processed, with the expectation that this will be done correctly.

-
  • Queue a task on the networking task source to process the - linked resource given el, success, and response.
  • +
  • Queue an element task on the networking task source given + el to process the linked resource given el, + success, and response.
  • @@ -15374,7 +15375,8 @@ interface HTMLStyleElement : HTMLElement {
  • -

    Queue a task on the networking task source to run these steps:

    +

    Queue an element task on the networking task source given + element and the following steps:

    1. If success is true, fire an event @@ -28285,10 +28287,18 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...

      ⌛ Set pending request to null.

    2. -
    3. Queue a task to change the current request's current URL to selected source, fire an event named error - at the img element.

    4. +
    5. +

      Queue an element task on the DOM manipulation task + source given the img element and the following steps:

      + +
        +
      1. Change the current request's current + URL to selected source.

      2. + +
      3. Fire an event named error at the img element.

      4. +
      +
    6. ⌛ Return.

    @@ -29177,7 +29187,8 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ... -

    Queue a task to run these steps:

    +

    Queue an element task on the DOM manipulation task source given + the img element and the following steps:

      @@ -30410,10 +30421,8 @@ interface HTMLIFrameElement : HTMLElement {
      -

      Queue a task to run the iframe load event steps.

      - -

      The task source for this task is the - DOM manipulation task source.

      +

      Queue an element task on the DOM manipulation task source given + the iframe element and the iframe load event steps.

      @@ -33538,9 +33547,10 @@ interface MediaError {
        -
      1. Queue a task to fire an event - named emptied at the media - element.

      2. +
      3. Queue an element task on the media element event task source + given the media element to fire an event named emptied at the media element.

      4. If a fetching process is in progress for the media element, the user agent should stop it.

      5. @@ -33689,9 +33699,10 @@ interface MediaError { data-x="dom-media-networkState">networkState to NETWORK_LOADING.

        -
      6. Queue a task to fire an - event named loadstart at the media - element.

      7. +
      8. Queue an element task on the media element event task + source given the media element to fire an event named loadstart at the media element.

      9. @@ -33848,9 +33859,10 @@ interface MediaError { with urlRecord. If that algorithm returns without aborting this one, then the load failed.

      10. -
      11. Failed with elements: Queue a task to

        Failed with elements: Queue an element task on the media + element event task source given candidate to fire an event named error at the candidate element.

      12. + data-x="event-source-error">error at candidate.

      13. Await a stable state. The synchronous section consists of all the remaining steps of this algorithm until the algorithm says the @@ -33881,7 +33893,8 @@ interface MediaError {

      14. ⌛ Set the element's show poster flag to true.

      15. -
      16. Queue a task to set the element's delaying-the-load-event +

      17. Queue an element task on the media element event task + source given the element to set the element's delaying-the-load-event flag to false. This stops delaying the load event.

      18. @@ -33988,11 +34001,13 @@ interface MediaError {
      19. Set the networkState to NETWORK_IDLE.

      20. -
      21. Queue a task to fire an event +

      22. Queue an element task on the media element event task + source given the element to fire an event named suspend at the element.

      23. -
      24. Queue a task to set the element's delaying-the-load-event flag - to false. This stops delaying the load +

      25. Queue an element task on the media element event task + source given the element to set the element's delaying-the-load-event + flag to false. This stops delaying the load event.

      26. Wait for the task to be run.

      27. @@ -35075,8 +35090,9 @@ interface MediaError {
        -

        Queue a task to fire an event named - loadedmetadata at the element.

        +

        Queue an element task on the media element event task source + given the element to fire an event named loadedmetadata at the element.

        Before this task is run, as part of the event loop mechanism, the rendering will have been updated to resize the video element if appropriate.

        @@ -35171,8 +35187,9 @@ interface MediaError {
      28. If the element's show poster flag is true, set it to false and run the time marches on steps.
      29. -
      30. Queue a task to fire an event named - play at the element.
      31. +
      32. Queue an element task on the media element event task source + given the element to fire an event named play at the element.
      33. Notify about playing for the element.
      34. @@ -35196,8 +35213,9 @@ interface MediaError {
      35. Run the internal pause steps and set the can autoplay flag to true.
      36. -
      37. Queue a task to fire an event named - pause at the element.
      38. +
      39. Queue an element task on the media element event task source + given the element to fire an event named pause at the element.
      @@ -35477,7 +35495,8 @@ interface MediaError {
    1. -

      Queue a task to run these steps:

      +

      Queue an element task on the media element event task source given + the media element and the following steps:

        @@ -35609,7 +35628,8 @@ interface MediaError {
      1. -

        Queue a task to run these steps:

        +

        Queue an element task on the media element event task source + give the element and the following steps:

          @@ -35687,8 +35707,9 @@ interface MediaError {
        1. If the show poster flag is true, set the element's show poster flag to false and run the time marches on steps.

        2. -
        3. Queue a task to fire an event - named play at the element.

        4. +
        5. Queue an element task on the media element event task source + given the element to fire an event named play at the element.

        6. @@ -35765,7 +35786,8 @@ interface MediaError {
        7. -

          Queue a task to run these steps:

          +

          Queue an element task on the media element event task source + given the element and the following steps:

            @@ -36167,8 +36189,9 @@ interface MediaError { -
          1. Queue a task to fire an event named - seeking at the element.

          2. +
          3. Queue an element task on the media element event task source + given the element to fire an event named seeking at the element.

          4. @@ -36207,12 +36230,13 @@ interface MediaError {
          5. ⌛ Run the time marches on steps.

          6. -
          7. Queue a task to fire an event named timeupdate at the element.

          8. +
          9. Queue an element task on the media element + event task source given the element to fire an + event named timeupdate at the element.

          10. -
          11. Queue a task to fire an - event named seeked at the element.

          12. +
          13. Queue an element task on the media element event task + source given the element to fire an event named + seeked at the element.

          @@ -36987,7 +37011,8 @@ interface VideoTrack {
        8. -

          Queue a task to run these steps:

          +

          Queue an element task on the media element event task source + given the media element to run these steps:

            @@ -37872,7 +37897,8 @@ interface TextTrack : EventTarget {
          1. -

            Queue a task to fire an event named +

            Queue an element task on the media element event task source given + the media element to fire an event named addtrack at the media element's textTracks attribute's TextTrackList object, using TrackEvent, with the track @@ -46119,8 +46145,9 @@ interface HTMLInputElement : HTMLElement { "rtl" if the user selected a right-to-left writing direction.

          2. -
          3. Queue a task to fire an event named - input at the input element, with the

            Queue an element task on the user interaction task source given + the element to fire an event named input at the element, with the bubbles attribute initialized to true.

          @@ -48416,14 +48443,22 @@ ldh-str = < as defined in selected files so that it represents the - user's selection, then fire an event named input at the input element, with the bubbles attribute initialized to true, and finally fire an event named change at the input element, with the bubbles attribute initialized to true.

        9. +
        10. +

          Queue an element task on the user interaction task source given + the input element and the folllowing steps:

          + +
            +
          1. Update the element's selected + files so that it represents the user's selection.

          2. + +
          3. Fire an event named input at the input element, with the bubbles attribute initialized to true, and finally fire an event named change at the input element, with the bubbles attribute initialized to true.

          4. +
          +
      @@ -51924,7 +51959,8 @@ interface HTMLTextAreaElement : HTMLElement { "rtl" if the user selected a right-to-left writing direction.

    2. -
    3. Queue a task to fire an event named +

    4. Queue an element task on the user interaction task source given + the textarea element to fire an event named input at the textarea element, with the bubbles attribute initialized to true.

    5. @@ -57012,12 +57048,12 @@ fur
    6. -

      Let the form's planned navigation be a new task that consists of running the following steps:

      +

      Queue an element task on the DOM manipulation task source given + the form element and the following steps:

        -
      1. Let the form's planned navigation be null.

      2. +
      3. Set the form's planned navigation to null.

      4. Navigate target browsing context to destination. If replace is true, then target browsing @@ -57027,20 +57063,12 @@ fur

        For the purposes of this task, target browsing context and replace are the variables that were set up when the overall form submission algorithm was run, with their values as they stood when this planned navigation - was queued.

        - -
      5. - -
      6. - -

        Queue the task that is the form's new - planned navigation.

        - -

        The task source for this task is the DOM manipulation task - source.

        + was queued.

      7. +
      8. Set the form's planned navigation to the just-queued task.

      The behaviors are as follows: