Skip to content

Commit

Permalink
Do not do special range handling
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Nov 19, 2024
1 parent 12b9ded commit 29e2ac3
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2910,17 +2910,16 @@ a <var>child</var>, run these steps:

<li><p>Let <var>index</var> be <var>node</var>'s <a for=tree>index</a>.

<li>
<p>For each <a>live range</a> whose <a for=range>start node</a> is <var>parent</var> and
<a for=range>start offset</a> is greater than <var>index</var>, decrease its
<a for=range>start offset</a> by 1.</p>

<p class="note">Note that unlike the traditional <a for=/ lt="remove">removal</a> case, we do not
need to update <a>live range</a> state when their <a for=range>start node</a> or
<a for=range>end node</a> is an <a>inclusive descendant</a> of the <var>node</var>. This is
because said <a>nodes</a> do not get removed from their <a>tree</a>, so ranges associated with
them stay intact.</p>
</li>
<li><p>For each <a>live range</a> whose <a for=range>start node</a> is an
<a>inclusive descendant</a> of <var>node</var>, set its <a for=range>start</a> to
(<var>parent</var>, <var>index</var>).

<li><p>For each <a>live range</a> whose <a for=range>end node</a> is an <a>inclusive descendant</a>
of <var>node</var>, set its <a for=range>end</a> to (<var>parent</var>, <var>index</var>).

<li><p>For each <a>live range</a> whose <a for=range>start node</a> is <var>parent</var> and
<a for=range>start offset</a> is greater than <var>index</var>, decrease its
<a for=range>start offset</a> by 1.

<li><p>For each <a>live range</a> whose <a for=range>end node</a> is <var>parent</var> and
<a for=range>end offset</a> is greater than <var>index</var>, decrease its
Expand Down

0 comments on commit 29e2ac3

Please sign in to comment.