Skip to content

Commit

Permalink
[Issue #128, #289] Update the composed tree children calculation algo…
Browse files Browse the repository at this point in the history
…rithm so tht considers slots.
  • Loading branch information
hayatoito committed Jul 31, 2015
1 parent 0a67f7f commit 1907500
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions spec/shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ <h3>Satisfying Matching Criteria</h3>
<section>
<h2>Composition</h2>

<p>The <dfn>composed tree children calculation algorithm</dfn> <strong>must</strong> be used to determine the child <a lt="node">nodes</a> of a <a>node</a> in the <a>composed tree</a> and <strong>must</strong> be <a lt="processing equivalence">equivalent</a> to processing the following steps:</p>
<p>The <dfn>composed tree children calculation algorithm</dfn> <strong>must</strong> be used to determine the child nodes of a node in the <a>composed tree</a> and <strong>must</strong> be <a lt="processing equivalence">equivalent</a> to processing the following steps:</p>

<div class="algorithm">
<dl>
Expand All @@ -479,30 +479,39 @@ <h2>Composition</h2>

<ol>
<li>Let <var>CHILDREN</var> be an empty ordered list of nodes</li>
<li>If <var>NODE</var> is a <a>shadow host</a>:
<li>
If <var>NODE</var> is a <a>shadow host</a>:
<ol>
<li>Let <var>CHILD-POOL</var> be the children of the <a>shadow root</a> which <var>NODE</var> <a>hosts</a>.</li>
</ol></li>
<li>Otherwise:
<li>Let <var>CHILD-POOL</var> be the child nodes of the <a>shadow root</a> which <var>NODE</var> <a>hosts</a></li>
</ol>
</li>
<li>
Otherwise:
<ol>
<li>Let <var>CHILD-POOL</var> be the child <a lt="node">nodes</a> of NODE</li>
</ol></li>
<li>For each <a>node</a>, <var>CHILD</var>, in <var>CHILD-POOL</var>:
<li>Let <var>CHILD-POOL</var> be the child nodes of <var>NODE</var></li>
</ol>
</li>
<li>
For each <a>node</a>, <var>CHILD</var>, in <var>CHILD-POOL</var>:
<ol>
<li>If <var>CHILD</var> is an <a>insertion point</a>:
<li>
If <var>CHILD</var> is a <a>slot</a>:
<ol>
<li>For each <a>node</a>, <var>DISTRIBUTED-NODE</var>, in the <a>distributed nodes</a> of the <a>insertion point</a> <var>CHILD</var>:
<li>If <var>CHILD</var> is not assigned to any <a>slot</a>:
<ol>
<li>If <var>CHILD</var> is the <a>final destination</a> of <var>DISTRIBUTED-NODE</var>, add <var>DISTRIBUTED-NODE</var> to <var>CHILDREN</var></li>
</ol></li>
</ol></li>
<li>Append all nodes of the <a>distributed nodes</a> of <var>CHILD</var> to <var>CHILDREN</var></li>
</ol>
</li>
</ol>
</li>
<li>Otherwise:
<ol>
<li>Add <var>CHILD</var> to <var>CHILDREN</var></li>
</ol></li>
</ol></li>
<li>Append <var>CHILD</var> to <var>CHILDREN</var></li>
</ol>
</li>
</ol>
</li>
</ol>

</div>

<p>For a given <a>tree of trees</a> <var>TREE-OF-TREES</var>, the <a>composed tree</a> constructed from <var>TREE-OF-TREES</var> <strong>must</strong> be <a lt="processing equivalence">equivalent</a> to the following tree:</p>
Expand Down

0 comments on commit 1907500

Please sign in to comment.