[Bug 26365] [Shadow]: Need an equivalent definition of 'in a Document' for shadow trees

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26365

--- Comment #21 from Hayato Ito <hayato@chromium.org> ---
Let me share my very rough memo as a basis for discussion.

Let's use the following trees as an example:

# Closing tags are being omitted.

HTML:
<body>
  <div id=a class='shadow-host'>
    <div id=b class='distributed-host-child'>
    <div id=c class='distributed-but-not-used-host-child'>
    <div id=d class='not-distributed-host-child'>
  <content id=e class='content-insertion-point-behaves-as-an-unknown-element'>


The node #A hosts three shadow trees as follows, from older to younger:

1. #oldest-shadow-root
  <div id=f class='.not-distributed-to-shadow-insertion-point'>  //
#older-shadow-root doesn't have a shadow insertion point.
  <content id=g select='.distributed-but-not-used-host-child'>

2. #older-shadow-root
  <div id=h class='distributed-to-shadow-insertion-point'>

3. #youngest-shadow-root
  <div>
    <shadow id=i>
       <div id=j class='not-used-shadow-child'>
    <content id=k select='.distributed-host-child'>
       <div id=l class='not-used-fallback-element'>
    <content id=m select='#nothing'>
       <div id=n class='fallback-element'>


In addition, suppose that we have *disconnected* nodes as follows:

var o = document.createElement('div');
var p = o.createShadowRoot();


The composed tree will be:

document:
 <body>
    <div id=a class='shadow-host'>
      <div id=h class='distributed-to-shadow-insertion-point'>
      <div id=b class='distributed-host-child'>
      <div id=n class='fallback-element'>
    <content id=e
class='content-insertion-point-behaves-as-an-unknown-element'>




We can classify the nodes as follows:

                                              a b c d e f g h i j k l m n o p
A). In a document                             x x x x x
B). In a shadow tree                                    x x x x x x x x x   X
C). In a composed tree (root is a document)   x x     x     x           x
D). In a tree of trees (root is a document)   x x x x x x x x x x x x x x
E). Disconnected (from D)                                                 x x

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 1 October 2014 11:37:59 UTC