From 3029ced631322f9b8174f749f794e3450aeeaf5d Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Thu, 16 Jan 2020 16:48:12 +0200 Subject: [PATCH 1/4] Capitalize "queue a tree mutation record" in "insert" --- dom.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 36e6cf5e..5317354b 100644 --- a/dom.bs +++ b/dom.bs @@ -2416,7 +2416,7 @@ before a child, with an optional suppress observers flag, run
  • Remove its children with the suppress observers flag set.

  • -

    queue a tree mutation record for node with « », nodes, null, and +

    Queue a tree mutation record for node with « », nodes, null, and null.

    This step intentionally does not pay attention to the From d1b4ae271565bde68aa3c7bc65aaa920746cb265 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Thu, 16 Jan 2020 16:48:57 +0200 Subject: [PATCH 2/4] Avoid enqueuing tree mutation record when there is no mutation --- dom.bs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 5317354b..521f78fd 100644 --- a/dom.bs +++ b/dom.bs @@ -2604,7 +2604,8 @@ within a parent, run these steps:

  • If node is non-null, then insert node into parent before null with the suppress observers flag set. -

  • Queue a tree mutation record for parent with addedNodes, +

  • If either addedNodes or removedNodes is not empty, + then queue a tree mutation record for parent with addedNodes, removedNodes, null, and null. @@ -3591,6 +3592,9 @@ run these steps: target with null, null, null, addedNodes, removedNodes, previousSibling, and nextSibling. +

    Either addedNodes or removedNodes +is not empty. +

    Interface {{MutationRecord}}

    From 12285f104f4154ff9070e7be54f36df695635836 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Wed, 22 Jan 2020 17:06:02 +0200 Subject: [PATCH 3/4] {added,removed}Nodes are sets Co-Authored-By: Anne van Kesteren --- dom.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 521f78fd..ddfd60a5 100644 --- a/dom.bs +++ b/dom.bs @@ -2604,7 +2604,7 @@ within a parent, run these steps:
  • If node is non-null, then insert node into parent before null with the suppress observers flag set. -

  • If either addedNodes or removedNodes is not empty, +

  • If either addedNodes or removedNodes is not empty, then queue a tree mutation record for parent with addedNodes, removedNodes, null, and null. From de10bc3cabd4620805f3aa851b58ba3328e3c4f5 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Wed, 22 Jan 2020 17:22:20 +0200 Subject: [PATCH 4/4] Turn "queue a tree mutation record" into an algorithm --- dom.bs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dom.bs b/dom.bs index ddfd60a5..e215ce07 100644 --- a/dom.bs +++ b/dom.bs @@ -3588,12 +3588,15 @@ run these steps:

    To queue a tree mutation record for target with addedNodes, removedNodes, previousSibling, and -nextSibling, queue a mutation record of "childList" for -target with null, null, null, addedNodes, removedNodes, -previousSibling, and nextSibling. +nextSibling, run these steps: -

    Either addedNodes or removedNodes -is not empty. +

      +
    1. Assert: either addedNodes or removedNodes is not empty. + +

    2. Queue a mutation record of "childList" for target with + null, null, null, addedNodes, removedNodes, previousSibling, + and nextSibling. +

    Interface {{MutationRecord}}