<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188279</bug_id>
          
          <creation_ts>2018-08-02 15:15:39 -0700</creation_ts>
          <short_desc>Range APIs do not construct / move trees in tree order (observable by custom elements)</short_desc>
          <delta_ts>2023-02-07 22:35:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>Safari 11</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://wpt.fyi/results/custom-elements/range-and-constructors.html?label=experimental&amp;label=master&amp;product=chrome&amp;product=firefox&amp;product=safari&amp;aligned&amp;view=interop&amp;q=label%3Ainterop-2023-webcomponents</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>154907</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Russell Bicknell">bicknellr</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>bicknellr</cc>
    
    <cc>cdumez</cc>
    
    <cc>fred.wang</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1447398</commentid>
    <comment_count>0</comment_count>
      <attachid>346421</attachid>
    <who name="Russell Bicknell">bicknellr</who>
    <bug_when>2018-08-02 15:15:39 -0700</bug_when>
    <thetext>Created attachment 346421
The test page mentioned in the bug.

# Details of interop issue

  Chrome, Safari, and Firefox all appear to have the similar issues. Chrome and Safari sometimes show the same ordering; Firefox is different. None appears to follow the spec.

# Steps to reproduce the problem:

  1. Create a deep and wide tree of many custom elements with defined constructors, `connectedCallback`, and `disconnectedCallback`.
  2. Create a range that such that the boundaries of the range are deep enough in the tree to cause many of the custom elements to be only partially contained within the range.
  3. Call the range&apos;s `cloneContents` or `extractContents`.

  (Specific cases listed below.)

# What went wrong?

  Nodes in the cloned / extracted fragment are not created or moved in tree order:

  1. During `extractContents`, nodes that are partially contained in the range are cloned into the created fragment, rather than being moved out of the original range (as expected). However, the order in which the clones happen is now observably incorrect through the order in which the custom element constructors are called.

    To see this using the attached page:

    - Uncheck all checkboxes.
    - Click the &quot;create source&quot; button.
    - Check the &quot;#n&quot; and &quot;NEW&quot; checkboxes.
    - Click the &quot;extract&quot; button.

    You&apos;ll get a tree that looks like this:

    - [#2 NEW]
        - [#1 NEW]
            - [#0 NEW] START.....)
            - [] (root-0-0-2)
        - [] (root-0-1)
            - [] (root-0-1-0)
            - [] (root-0-1-1)
            - [] (root-0-1-2)
    - [] (root-1)
    - [#5 NEW] (root-2)
        - [] (root-2-0)
            - [] (root-2-0-0)
            - [] (root-2-0-1)
            - [] (root-2-0-2)
        - [#4 NEW] (root-2-1)
            - [] (root-2-1-0)
            - [#3 NEW] (root-2-1-1.....END

    In this tree, the constructors for the elements that were cloned as part of `extractContents` are not called in tree order. In the spec section about extracting a range [1], step 14 describes how the &apos;first partially contained child&apos; of the nearest containing ancestor of a range is handled. Particularly, it explicitly clones the partially contained child first and extracts the range inside of it next. This is also true of step 17, describing how the &apos;last partially contained child&apos; is handled.

  2. During `extractContents`, the ordering of `disconnectedCallback` calls of custom elements  which are moved (because they are fully contained) are not in tree order.

    Using the attached page:

    - Uncheck all checkboxes.
    - Click the &quot;create source&quot; button.
    - Check the &quot;NEW&quot; and &quot;Dn&quot; checkboxes.
    - Click the &quot;extract&quot; button.

    You&apos;ll get a tree that looks like this:

    - [NEW]
        - [NEW]
            - [NEW] START.....)
            - [, D0] (root-0-0-2)
        - [, D1] (root-0-1)
            - [, D2] (root-0-1-0)
            - [, D3] (root-0-1-1)
            - [, D4] (root-0-1-2)
    - [, D10] (root-1)
    - [NEW] (root-2)
        - [, D6] (root-2-0)
            - [, D7] (root-2-0-0)
            - [, D8] (root-2-0-1)
            - [, D9] (root-2-0-2)
        - [NEW] (root-2-1)
            - [, D5] (root-2-1-0)
            - [NEW] (root-2-1-1.....END

    (Sorry about the leading commas, they&apos;re not relevant.)

    Here, the logs show us that the custom elements were not removed from their original positions in the correct order: the flattened segment &quot;D10, NEW, D6, D7, D8, D9, NEW, D5&quot; should be &quot;D5, NEW, D6, D7, D8, D9, NEW, D10&quot;.

  3. During `cloneContents`, the newly created tree is not constructed in tree order.

    Using the attached page:

    - Check only the &quot;#n&quot; checkbox.
    - Click the &quot;create source&quot; button.
    - Click the &quot;clone&quot; button.

    You&apos;ll get a tree that looks like this:

    - [#23]
        - [#21]
            - [#20] START.....)
            - [#22] (root-0-0-2)
        - [#24] (root-0-1)
            - [#25] (root-0-1-0)
            - [#26] (root-0-1-1)
            - [#27] (root-0-1-2)
    - [#36] (root-1)
    - [#31] (root-2)
        - [#32] (root-2-0)
            - [#33] (root-2-0-0)
            - [#34] (root-2-0-1)
            - [#35] (root-2-0-2)
        - [#29] (root-2-1)
            - [#30] (root-2-1-0)
            - [#28] (root-2-1-1.....END

    All of the elements in the output tree are cloned. Like the steps for extracting a range [1], the steps for cloning a range [2] imply that the new tree should be constructed in tree order. So, the numbers in the new tree here should be in ascending order from top to bottom.

  [1]: https://dom.spec.whatwg.org/#concept-range-extract
  [2]: https://dom.spec.whatwg.org/#concept-range-clone

# Any other comments?

  The attached file is meant to let you see the ordering of construction / the callbacks. It defines a custom element that displays a small log of when its constructor and callbacks are called. (In brackets, at the start of the element.) You can toggle which things are logged using the checkboxes at the top of the page. Each logged event increments a global and prints its value so you can see the relative order of all of the things you&apos;ve enabled.

  - &quot;#n&quot; shows when the element&apos;s constructor is run.
  - &quot;NEW&quot; shows that the element was constructed during the `cloneContents` or `extractContents` call.
  - &quot;Cn&quot; shows when the element&apos;s `connectedCallback` is run.
  - &quot;Dn&quot; shows when the element&apos;s `disconnectedCallback` is run.

  ... where &apos;n&apos; is the step at which the event happened. For example, an element with the log &quot;[#10, C11, D42, C60]&quot; means &quot;constructed at step 10, connectedCallback at step 11, disconnectedCallback at step 42, connectedCallback at step 60&quot; and &quot;[#49 NEW, C71]&quot; means &quot;constructed at step 49 during the range operation, connectedCallback at step 71&quot;.

  Really, there are only two things to do to use the page:
  1. Click the &quot;create source&quot; button to create the &apos;source&apos; tree (the one in which the range&apos;s boundary points will be placed). A tree in a template will be copied into the blue dashed box (using innerHTML, rather than cloneNode, so that it&apos;s created by the parser).
  2. Click either the &quot;extract&quot; or &quot;clone&quot; button to extract / clone a range between the two nodes with class &quot;start&quot; and &quot;end&quot; (inclusive). The fragment is then appended to the orange dashed box.

  The reason there&apos;s an explicit step for creating the source tree is so that you can change the stuff that&apos;s logged when the tree is created.

  The elements have some text in them (e.g. &quot;(root-2-0-1)&quot;) to show their position in the source tree and also to make it more clear where the boundary points of the range are in that node. None of the CSS is actually relevant to the repro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1447399</commentid>
    <comment_count>1</comment_count>
    <who name="Russell Bicknell">bicknellr</who>
    <bug_when>2018-08-02 15:18:36 -0700</bug_when>
    <thetext>Also, if you check the &quot;#n&quot; and &quot;Cn&quot; checkboxes and click &quot;create source&quot;, you&apos;ll notice that all of the elements in the source tree were constructed before any of them are connected. I&apos;ll file a separate bug for this since it&apos;s not related to ranges.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1447403</commentid>
    <comment_count>2</comment_count>
    <who name="Russell Bicknell">bicknellr</who>
    <bug_when>2018-08-02 15:21:00 -0700</bug_when>
    <thetext>Possibly related: https://bugs.webkit.org/show_bug.cgi?id=160667</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1447422</commentid>
    <comment_count>3</comment_count>
    <who name="Russell Bicknell">bicknellr</who>
    <bug_when>2018-08-02 15:51:31 -0700</bug_when>
    <thetext>Other bugs filed:
https://bugs.chromium.org/p/chromium/issues/detail?id=870464
https://bugzilla.mozilla.org/show_bug.cgi?id=1480618</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1447978</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2018-08-04 22:04:52 -0700</bug_when>
    <thetext>This is presumably also observable via mutation observers since disconnection of a node is typically caused by a removal of the node, which is observable via mutations observers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931585</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-02-06 18:12:08 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/9730</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931890</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-02-07 17:02:55 -0800</bug_when>
    <thetext>Committed 259987@main (fa5a06a66c96): &lt;https://commits.webkit.org/259987@main&gt;

Reviewed commits have been landed. Closing PR #9730 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931891</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-02-07 17:03:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/105154132&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>346421</attachid>
            <date>2018-08-02 15:15:39 -0700</date>
            <delta_ts>2018-08-02 15:15:39 -0700</delta_ts>
            <desc>The test page mentioned in the bug.</desc>
            <filename>rangeOrdering.html</filename>
            <type>text/html</type>
            <size>5319</size>
            <attacher name="Russell Bicknell">bicknellr</attacher>
            
              <data encoding="base64">PCFkb2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