[html5] r8357 - [e] (0) Make the outline algorithm easier to edit by making it all explicit step [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Dec 16 14:30:37 PST 2013


Author: ianh
Date: 2013-12-16 14:30:35 -0800 (Mon, 16 Dec 2013)
New Revision: 8357

Modified:
   complete.html
   index
   source
Log:
[e] (0) Make the outline algorithm easier to edit by making it all explicit steps and breaking out the (currently still identical) steps for entering sectioning content vs sectioning roots.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24100
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-12-16 20:50:45 UTC (rev 8356)
+++ complete.html	2013-12-16 22:30:35 UTC (rev 8357)
@@ -15391,53 +15391,94 @@
      </dd>
 
 
-     <dt>When entering a <a href=#sectioning-content>sectioning content</a> element or a <a href=#sectioning-root>sectioning root</a>
-     element</dt>
+     <dt>When entering a <a href=#sectioning-content>sectioning content</a> element</dt>
 
      <dd>
 
-      <p>If <var title="">current outline target</var> is not null, and the <var title="">current
-      section</var> has no heading, create an implied heading and let that be the heading for the
-      <var title="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>If <var title="">current outline target</var> is not null, push <var title="">current
-      outline target</var> onto the stack.</p>
+      <ol><li>
 
-      <p>Let <var title="">current outline target</var> be the element that is being entered.</p>
+        <p>If <var title="">current outline target</var> is not null, run these substeps:</p>
 
-      <p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
-      element.</p>
+        <ol><li><p>If the <var title="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var title="">current section</var>.</li>
 
-      <p>Associate <var title="">current outline target</var> with <var title="">current
-      section</var>.</p>
+         <li><p>Push <var title="">current outline target</var> onto the stack.</li>
 
-      <p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
-      target</var>, initialized with just the new <var title="">current section</var> as the only
-      <a href=#concept-section title=concept-section>section</a> in the outline.</p>
+        </ol></li>
 
-     </dd>
+       <li><p>Let <var title="">current outline target</var> be the element that is being
+       entered.</li>
 
+       <li><p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
+       element.</li>
 
+       <li><p>Associate <var title="">current outline target</var> with <var title="">current
+       section</var>.</li>
+
+       <li><p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
+       target</var>, initialized with just the new <var title="">current section</var> as the only
+       <a href=#concept-section title=concept-section>section</a> in the outline.</li>
+
+      </ol></dd>
+
+
      <dt>When exiting a <a href=#sectioning-content>sectioning content</a> element, if the stack is not empty</dt>
 
      <dd>
 
-      <p>If the <var title="">current section</var> has no heading, create an implied heading and
-      let that be the heading for the <var title="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>Pop the top element from the stack, and let the <var title="">current outline target</var>
-      be that element.</p>
+      <ol><li><p>If the <var title="">current section</var> has no heading, create an implied heading
+       and let that be the heading for the <var title="">current section</var>.</li>
 
-      <p>Let <var title="">current section</var> be the last section in the <a href=#outline>outline</a> of
-      the <var title="">current outline target</var> element.</p>
+       <li><p>Pop the top element from the stack, and let the <var title="">current outline
+       target</var> be that element.</li>
 
-      <p>Append the <a href=#outline>outline</a> of the <a href=#sectioning-content>sectioning content</a> element being exited
-      to the <var title="">current section</var>. (This does not change which section is the last
-      section in the <a href=#outline>outline</a>.)</p>
+       <li><p>Let <var title="">current section</var> be the last section in the
+       <a href=#outline>outline</a> of the <var title="">current outline target</var> element.</li>
 
-     </dd>
+       <li><p>Append the <a href=#outline>outline</a> of the <a href=#sectioning-content>sectioning content</a> element being
+       exited to the <var title="">current section</var>. (This does not change which section is
+       the last section in the <a href=#outline>outline</a>.)</li>
 
+      </ol></dd>
 
+
+     <dt>When entering a <a href=#sectioning-root>sectioning root</a> element</dt>
+
+     <dd>
+
+      <p>Run these steps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">current outline target</var> is not null, run these substeps:</p>
+
+        <ol><li><p>If the <var title="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var title="">current section</var>.</li>
+
+         <li><p>Push <var title="">current outline target</var> onto the stack.</li>
+
+        </ol></li>
+
+       <li><p>Let <var title="">current outline target</var> be the element that is being
+       entered.</li>
+
+       <li><p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
+       element.</li>
+
+       <li><p>Associate <var title="">current outline target</var> with <var title="">current
+       section</var>.</li>
+
+       <li><p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
+       target</var>, initialized with just the new <var title="">current section</var> as the only
+       <a href=#concept-section title=concept-section>section</a> in the outline.</li>
+
+      </ol></dd>
+
+
      <dt>When exiting a <a href=#sectioning-root>sectioning root</a> element, if the stack is not empty</dt>
 
      <dd>

Modified: index
===================================================================
--- index	2013-12-16 20:50:45 UTC (rev 8356)
+++ index	2013-12-16 22:30:35 UTC (rev 8357)
@@ -15391,53 +15391,94 @@
      </dd>
 
 
-     <dt>When entering a <a href=#sectioning-content>sectioning content</a> element or a <a href=#sectioning-root>sectioning root</a>
-     element</dt>
+     <dt>When entering a <a href=#sectioning-content>sectioning content</a> element</dt>
 
      <dd>
 
-      <p>If <var title="">current outline target</var> is not null, and the <var title="">current
-      section</var> has no heading, create an implied heading and let that be the heading for the
-      <var title="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>If <var title="">current outline target</var> is not null, push <var title="">current
-      outline target</var> onto the stack.</p>
+      <ol><li>
 
-      <p>Let <var title="">current outline target</var> be the element that is being entered.</p>
+        <p>If <var title="">current outline target</var> is not null, run these substeps:</p>
 
-      <p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
-      element.</p>
+        <ol><li><p>If the <var title="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var title="">current section</var>.</li>
 
-      <p>Associate <var title="">current outline target</var> with <var title="">current
-      section</var>.</p>
+         <li><p>Push <var title="">current outline target</var> onto the stack.</li>
 
-      <p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
-      target</var>, initialized with just the new <var title="">current section</var> as the only
-      <a href=#concept-section title=concept-section>section</a> in the outline.</p>
+        </ol></li>
 
-     </dd>
+       <li><p>Let <var title="">current outline target</var> be the element that is being
+       entered.</li>
 
+       <li><p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
+       element.</li>
 
+       <li><p>Associate <var title="">current outline target</var> with <var title="">current
+       section</var>.</li>
+
+       <li><p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
+       target</var>, initialized with just the new <var title="">current section</var> as the only
+       <a href=#concept-section title=concept-section>section</a> in the outline.</li>
+
+      </ol></dd>
+
+
      <dt>When exiting a <a href=#sectioning-content>sectioning content</a> element, if the stack is not empty</dt>
 
      <dd>
 
-      <p>If the <var title="">current section</var> has no heading, create an implied heading and
-      let that be the heading for the <var title="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>Pop the top element from the stack, and let the <var title="">current outline target</var>
-      be that element.</p>
+      <ol><li><p>If the <var title="">current section</var> has no heading, create an implied heading
+       and let that be the heading for the <var title="">current section</var>.</li>
 
-      <p>Let <var title="">current section</var> be the last section in the <a href=#outline>outline</a> of
-      the <var title="">current outline target</var> element.</p>
+       <li><p>Pop the top element from the stack, and let the <var title="">current outline
+       target</var> be that element.</li>
 
-      <p>Append the <a href=#outline>outline</a> of the <a href=#sectioning-content>sectioning content</a> element being exited
-      to the <var title="">current section</var>. (This does not change which section is the last
-      section in the <a href=#outline>outline</a>.)</p>
+       <li><p>Let <var title="">current section</var> be the last section in the
+       <a href=#outline>outline</a> of the <var title="">current outline target</var> element.</li>
 
-     </dd>
+       <li><p>Append the <a href=#outline>outline</a> of the <a href=#sectioning-content>sectioning content</a> element being
+       exited to the <var title="">current section</var>. (This does not change which section is
+       the last section in the <a href=#outline>outline</a>.)</li>
 
+      </ol></dd>
 
+
+     <dt>When entering a <a href=#sectioning-root>sectioning root</a> element</dt>
+
+     <dd>
+
+      <p>Run these steps:</p>
+
+      <ol><li>
+
+        <p>If <var title="">current outline target</var> is not null, run these substeps:</p>
+
+        <ol><li><p>If the <var title="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var title="">current section</var>.</li>
+
+         <li><p>Push <var title="">current outline target</var> onto the stack.</li>
+
+        </ol></li>
+
+       <li><p>Let <var title="">current outline target</var> be the element that is being
+       entered.</li>
+
+       <li><p>Let <var title="">current section</var> be a newly created <a href=#concept-section title=concept-section>section</a> for the <var title="">current outline target</var>
+       element.</li>
+
+       <li><p>Associate <var title="">current outline target</var> with <var title="">current
+       section</var>.</li>
+
+       <li><p>Let there be a new <a href=#outline>outline</a> for the new <var title="">current outline
+       target</var>, initialized with just the new <var title="">current section</var> as the only
+       <a href=#concept-section title=concept-section>section</a> in the outline.</li>
+
+      </ol></dd>
+
+
      <dt>When exiting a <a href=#sectioning-root>sectioning root</a> element, if the stack is not empty</dt>
 
      <dd>

Modified: source
===================================================================
--- source	2013-12-16 20:50:45 UTC (rev 8356)
+++ source	2013-12-16 22:30:35 UTC (rev 8357)
@@ -15974,31 +15974,45 @@
      </dd>
 
 
-     <dt>When entering a <span>sectioning content</span> element or a <span>sectioning root</span>
-     element</dt>
+     <dt>When entering a <span>sectioning content</span> element</dt>
 
      <dd>
 
-      <p>If <var data-x="">current outline target</var> is not null, and the <var data-x="">current
-      section</var> has no heading, create an implied heading and let that be the heading for the
-      <var data-x="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>If <var data-x="">current outline target</var> is not null, push <var data-x="">current
-      outline target</var> onto the stack.</p>
+      <ol>
 
-      <p>Let <var data-x="">current outline target</var> be the element that is being entered.</p>
+       <li>
 
-      <p>Let <var data-x="">current section</var> be a newly created <span
-      data-x="concept-section">section</span> for the <var data-x="">current outline target</var>
-      element.</p>
+        <p>If <var data-x="">current outline target</var> is not null, run these substeps:</p>
 
-      <p>Associate <var data-x="">current outline target</var> with <var data-x="">current
-      section</var>.</p>
+        <ol>
 
-      <p>Let there be a new <span>outline</span> for the new <var data-x="">current outline
-      target</var>, initialized with just the new <var data-x="">current section</var> as the only
-      <span data-x="concept-section">section</span> in the outline.</p>
+         <li><p>If the <var data-x="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var data-x="">current section</var>.</p></li>
 
+         <li><p>Push <var data-x="">current outline target</var> onto the stack.</p></li>
+
+        </ol>
+
+       </li>
+
+       <li><p>Let <var data-x="">current outline target</var> be the element that is being
+       entered.</p></li>
+
+       <li><p>Let <var data-x="">current section</var> be a newly created <span
+       data-x="concept-section">section</span> for the <var data-x="">current outline target</var>
+       element.</p></li>
+
+       <li><p>Associate <var data-x="">current outline target</var> with <var data-x="">current
+       section</var>.</p></li>
+
+       <li><p>Let there be a new <span>outline</span> for the new <var data-x="">current outline
+       target</var>, initialized with just the new <var data-x="">current section</var> as the only
+       <span data-x="concept-section">section</span> in the outline.</p></li>
+
+      </ol>
+
      </dd>
 
 
@@ -16006,22 +16020,70 @@
 
      <dd>
 
-      <p>If the <var data-x="">current section</var> has no heading, create an implied heading and
-      let that be the heading for the <var data-x="">current section</var>.</p>
+      <p>Run these steps:</p>
 
-      <p>Pop the top element from the stack, and let the <var data-x="">current outline target</var>
-      be that element.</p>
+      <ol>
 
-      <p>Let <var data-x="">current section</var> be the last section in the <span>outline</span> of
-      the <var data-x="">current outline target</var> element.</p>
+       <li><p>If the <var data-x="">current section</var> has no heading, create an implied heading
+       and let that be the heading for the <var data-x="">current section</var>.</p></li>
 
-      <p>Append the <span>outline</span> of the <span>sectioning content</span> element being exited
-      to the <var data-x="">current section</var>. (This does not change which section is the last
-      section in the <span>outline</span>.)</p>
+       <li><p>Pop the top element from the stack, and let the <var data-x="">current outline
+       target</var> be that element.</p></li>
 
+       <li><p>Let <var data-x="">current section</var> be the last section in the
+       <span>outline</span> of the <var data-x="">current outline target</var> element.</p></li>
+
+       <li><p>Append the <span>outline</span> of the <span>sectioning content</span> element being
+       exited to the <var data-x="">current section</var>. (This does not change which section is
+       the last section in the <span>outline</span>.)</p></li>
+
+      </ol>
+
      </dd>
 
 
+     <dt>When entering a <span>sectioning root</span> element</dt>
+
+     <dd>
+
+      <p>Run these steps:</p>
+
+      <ol>
+
+       <li>
+
+        <p>If <var data-x="">current outline target</var> is not null, run these substeps:</p>
+
+        <ol>
+
+         <li><p>If the <var data-x="">current section</var> has no heading, create an implied
+         heading and let that be the heading for the <var data-x="">current section</var>.</p></li>
+
+         <li><p>Push <var data-x="">current outline target</var> onto the stack.</p></li>
+
+        </ol>
+
+       </li>
+
+       <li><p>Let <var data-x="">current outline target</var> be the element that is being
+       entered.</p></li>
+
+       <li><p>Let <var data-x="">current section</var> be a newly created <span
+       data-x="concept-section">section</span> for the <var data-x="">current outline target</var>
+       element.</p></li>
+
+       <li><p>Associate <var data-x="">current outline target</var> with <var data-x="">current
+       section</var>.</p></li>
+
+       <li><p>Let there be a new <span>outline</span> for the new <var data-x="">current outline
+       target</var>, initialized with just the new <var data-x="">current section</var> as the only
+       <span data-x="concept-section">section</span> in the outline.</p></li>
+
+      </ol>
+
+     </dd>
+
+
      <dt>When exiting a <span>sectioning root</span> element, if the stack is not empty</dt>
 
      <dd>




More information about the Commit-Watchers mailing list