diff --git a/dom.bs b/dom.bs index 8645c1ff..783c57f1 100644 --- a/dom.bs +++ b/dom.bs @@ -3034,6 +3034,14 @@ optional suppress observers flag, run these steps:
  • For each live range whose end node is an inclusive descendant of node, set its end to (parent, index). +

  • For each composed selection range whose start node is a + shadow-including inclusive descendant of node, set its start to + (parent, index). + +

  • For each composed selection range whose end node is a + shadow-including inclusive descendant of node, set its end to + (parent, index). +

  • For each live range whose start node is parent and start offset is greater than index, decrease its start offset by 1. @@ -5775,7 +5783,7 @@ are:


    The createRange() method steps are to return a new -live range with (this, 0) as its start an end. +{{Range}} object with (this, 0) as its start and end.

    The {{Range/Range()}} constructor can be used instead. @@ -8141,12 +8149,21 @@ interface Range : AbstractRange { }; -

    Objects implementing the {{Range}} interface are known as -live ranges. +

    A live range is a range that is affected by +mutations to the node tree.

    + +

    Objects implementing the {{Range}} interface are live ranges.

    Algorithms that modify a tree (in particular the insert, remove, replace data, and split algorithms) modify -live ranges associated with that tree. +live ranges associated with that tree.

    + +

    A composed selection range is a +live range that has an associated {{Range}} object, a +legacy selection range.

    + +

    The legacy selection range is used to maintain +backward compatibility with the {{Selection/getRangeAt()}} API.

    The root of a live range is the root of its start node. @@ -8216,7 +8233,7 @@ but not its end node, or vice versa.

    range = new Range() -
    Returns a new live range. +
    Returns a new {{Range}} object.

    The new Range() constructor steps are @@ -8265,6 +8282,12 @@ steps: boundary point (node, offset). +

  • If range is the legacy selection range of a + composed selection range, set selection range to that + composed selection range. + +
  • Otherwise, set selection range to null. +
  • If these steps were invoked as "set the start" @@ -8273,14 +8296,27 @@ steps:
  • If range's root is not equal to node's root, - or if bp is - after the - range's end, set - range's end + set range's end to bp. +
  • Otherwise, if bp is + after the + range's end, then: +
      +
    1. Set range's end + to bp. + +
    2. If selection range is not null, + set selection range’s + end to bp. +
    +
  • Set range's start to bp. + +
  • If selection range is not null, + set selection range’s + start to bp.
    If these steps were invoked as "set the end"
    @@ -8288,14 +8324,27 @@ steps:
  • If range's root is not equal to node's root, - or if bp is - before the - range's start, set - range's start + set range's start to bp. +
  • Otherwise, if bp is + before the + range's start, then: +
      +
    1. Set range's start + to bp. + +
    2. If selection range is not null, + set selection range’s + start to bp. +
    +
  • Set range's end to bp. + +
  • If selection range is not null, + set selection range’s + end to bp.
  • @@ -8576,7 +8625,7 @@ method steps are: (new node, new offset). -

    To extract a live range +

    To extract a {{Range}} object range, run these steps:

      @@ -8753,8 +8802,7 @@ method steps are:
    1. Append clone to fragment. -
    2. Let subrange be a new live range - whose start is +
    3. Let subrange be a new {{Range}} object whose start is (original start node, original start offset) and whose end is (first partially contained child, first partially contained child's @@ -8807,8 +8855,7 @@ method steps are:
    4. Append clone to fragment. -
    5. Let subrange be a new live range - whose start is +
    6. Let subrange be a new {{Range}} object whose start is (last partially contained child, 0) and whose end is (original end node, original end offset). @@ -8832,7 +8879,7 @@ result of extracting this.

      To clone the contents -of a live range range, run these steps: +of a {{Range}} object range, run these steps:

      1. Let fragment be a new {{DocumentFragment}} node whose @@ -8960,7 +9007,7 @@ of a live range range, run these steps:

      2. Append clone to fragment. -
      3. Let subrange be a new live range +
      4. Let subrange be a new {{Range}} object whose start is (original start node, original start offset) and whose end is @@ -9018,7 +9065,7 @@ of a live range range, run these steps:
      5. Append clone to fragment. -
      6. Let subrange be a new live range +
      7. Let subrange be a new {{Range}} object whose start is (last partially contained child, 0) and whose end is @@ -9038,7 +9085,7 @@ of a live range range, run these steps: result of cloning the contents of this.

        To insert a node -node into a live range range, run these steps: +node into a {{Range}} object range, run these steps:

        1. If range's start node is a {{ProcessingInstruction}} or {{Comment}} @@ -9188,7 +9235,8 @@ check first thing, which matches everyone but Firefox.

        The cloneRange() method steps are to return a new -live range with the same start and end as this. +{{Range}} object with the same start and end as +this.

        The detach() method steps are to do nothing. Its functionality (disabling a {{Range}} object) was removed, but the method itself @@ -10441,6 +10489,7 @@ David Håsäther, David Hyatt, Deepak Sherveghar, Dethe Elza, +Di Zhang, Dimitri Glazkov, Domenic Denicola, Dominic Cooney,