[html5] r7924 - [giow] (3) Define margin collapsing quirk in more detail. Fixing https://www.w3. [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 6 13:33:33 PDT 2013


Author: ianh
Date: 2013-06-06 13:33:32 -0700 (Thu, 06 Jun 2013)
New Revision: 7924

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Define margin collapsing quirk in more detail.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=15993
Affected topics: Rendering

Modified: complete.html
===================================================================
--- complete.html	2013-06-06 20:15:15 UTC (rev 7923)
+++ complete.html	2013-06-06 20:33:32 UTC (rev 7924)
@@ -1319,9 +1319,10 @@
      <li><a href=#sections-and-headings><span class=secno>14.3.7 </span>Sections and headings</a></li>
      <li><a href=#lists><span class=secno>14.3.8 </span>Lists</a></li>
      <li><a href=#tables><span class=secno>14.3.9 </span>Tables</a></li>
-     <li><a href=#form-controls><span class=secno>14.3.10 </span>Form controls</a></li>
-     <li><a href=#the-hr-element-0><span class=secno>14.3.11 </span>The <code>hr</code> element</a></li>
-     <li><a href=#the-fieldset-element-0><span class=secno>14.3.12 </span>The <code>fieldset</code> element</a></ol></li>
+     <li><a href=#margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</a></li>
+     <li><a href=#form-controls><span class=secno>14.3.11 </span>Form controls</a></li>
+     <li><a href=#the-hr-element-0><span class=secno>14.3.12 </span>The <code>hr</code> element</a></li>
+     <li><a href=#the-fieldset-element-0><span class=secno>14.3.13 </span>The <code>fieldset</code> element</a></ol></li>
    <li><a href=#replaced-elements><span class=secno>14.4 </span>Replaced elements</a>
     <ol>
      <li><a href=#embedded-content-2><span class=secno>14.4.1 </span>Embedded content</a></li>
@@ -92943,12 +92944,7 @@
      <td>'hidden'
     <tr><td><code title="">auto</code>
      <td>'auto'
-  </table><hr><p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
-  vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
-  of <code><a href=#the-body-element>body</a></code> elements are expected to be collapsed to
-  zero.</p>
-
-  <hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
+  </table><hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
   non-empty value, the new value is expected to be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
   if this is successful, the user agent is expected to treat the
   attribute as a <a href=#presentational-hints title="presentational hints">presentational
@@ -93865,11 +93861,6 @@
   to the dimension property">map to the dimension property</a> 'width'
   on the element.</p>
 
-  <p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
-  vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
-  of <code><a href=#the-td-element>td</a></code> or <code><a href=#the-th-element>th</a></code> elements are expected to be
-  collapsed to zero.</p>
-
   <hr><p>The <code><a href=#the-caption-element>caption</a></code> element unless specified otherwise
   below, and the <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
   <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, and
@@ -93971,8 +93962,44 @@
   activating the elements will cause the table to be sorted.</p>
 
 
-  <h4 id=form-controls><span class=secno>14.3.10 </span>Form controls</h4>
+  <h4 id=margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</h4>
 
+  <p>A node is <dfn id=concept-rendering-substantial title=concept-rendering-substantial>substantial</dfn> if it is a text node
+  that is not <a href=#inter-element-whitespace>inter-element whitespace</a>, or if it is an element node.</p>
+
+  <p>A node is <dfn id=concept-rendering-blank title=concept-rendering-blank>blank</dfn> if it is an element that contains no
+  <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> nodes.</p>
+
+  <p>The <dfn id=concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>elements with default margins</dfn>
+  are the following elements: <code><a href=#the-blockquote-element>blockquote</a></code>, <code><a href=#dir>dir</a></code>, <code><a href=#the-dl-element>dl</a></code>,
+  <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>,
+  <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code><a href=#listing>listing</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#multicol>multicol</a></code>, <code><a href=#the-ol-element>ol</a></code>,
+  <code><a href=#the-p-element>p</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#xmp>xmp</a></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
+  <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
+  previous siblings is expected to have a user-agent level style sheet rule that sets its
+  'margin-top' property to zero.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
+  <code><a href=#the-th-element>th</a></code> element, has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
+  previous siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have
+  a user-agent level style sheet rule that sets its 'margin-bottom' property to zero also.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code>td<code> or <code><a href=#the-th-element>th</a></code> element, has
+  no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have a user-agent level style sheet
+  rule that sets its 'margin-top' property to zero.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <code><a href=#the-p-element>p</a></code> element that is the child of a <code>td<code>
+  or <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, is expected to have a
+  user-agent level style sheet rule that sets its 'margin-bottom' property to zero.</code></code></p>
+
+
+  <h4 id=form-controls><span class=secno>14.3.11 </span>Form controls</h4>
+
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
 input, select, option, optgroup, button, textarea, keygen {
@@ -93997,7 +94024,7 @@
 
 
 
-  <h4 id=the-hr-element-0><span class=secno>14.3.11 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
+  <h4 id=the-hr-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
@@ -94047,7 +94074,7 @@
 
 
 
-  <h4 id=the-fieldset-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
+  <h4 id=the-fieldset-element-0><span class=secno>14.3.13 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 

Modified: index
===================================================================
--- index	2013-06-06 20:15:15 UTC (rev 7923)
+++ index	2013-06-06 20:33:32 UTC (rev 7924)
@@ -1319,9 +1319,10 @@
      <li><a href=#sections-and-headings><span class=secno>14.3.7 </span>Sections and headings</a></li>
      <li><a href=#lists><span class=secno>14.3.8 </span>Lists</a></li>
      <li><a href=#tables><span class=secno>14.3.9 </span>Tables</a></li>
-     <li><a href=#form-controls><span class=secno>14.3.10 </span>Form controls</a></li>
-     <li><a href=#the-hr-element-0><span class=secno>14.3.11 </span>The <code>hr</code> element</a></li>
-     <li><a href=#the-fieldset-element-0><span class=secno>14.3.12 </span>The <code>fieldset</code> element</a></ol></li>
+     <li><a href=#margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</a></li>
+     <li><a href=#form-controls><span class=secno>14.3.11 </span>Form controls</a></li>
+     <li><a href=#the-hr-element-0><span class=secno>14.3.12 </span>The <code>hr</code> element</a></li>
+     <li><a href=#the-fieldset-element-0><span class=secno>14.3.13 </span>The <code>fieldset</code> element</a></ol></li>
    <li><a href=#replaced-elements><span class=secno>14.4 </span>Replaced elements</a>
     <ol>
      <li><a href=#embedded-content-2><span class=secno>14.4.1 </span>Embedded content</a></li>
@@ -92943,12 +92944,7 @@
      <td>'hidden'
     <tr><td><code title="">auto</code>
      <td>'auto'
-  </table><hr><p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
-  vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
-  of <code><a href=#the-body-element>body</a></code> elements are expected to be collapsed to
-  zero.</p>
-
-  <hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
+  </table><hr><p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-background><a href=#attr-background>background</a></code> attribute set to a
   non-empty value, the new value is expected to be <a href=#resolve-a-url title="resolve a url">resolved</a> relative to the element, and
   if this is successful, the user agent is expected to treat the
   attribute as a <a href=#presentational-hints title="presentational hints">presentational
@@ -93865,11 +93861,6 @@
   to the dimension property">map to the dimension property</a> 'width'
   on the element.</p>
 
-  <p>When a <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>,
-  vertical margins on <a href=#html-elements>HTML elements</a> at the top or bottom
-  of <code><a href=#the-td-element>td</a></code> or <code><a href=#the-th-element>th</a></code> elements are expected to be
-  collapsed to zero.</p>
-
   <hr><p>The <code><a href=#the-caption-element>caption</a></code> element unless specified otherwise
   below, and the <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
   <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, and
@@ -93971,8 +93962,44 @@
   activating the elements will cause the table to be sorted.</p>
 
 
-  <h4 id=form-controls><span class=secno>14.3.10 </span>Form controls</h4>
+  <h4 id=margin-collapsing-quirks><span class=secno>14.3.10 </span>Margin collapsing quirks</h4>
 
+  <p>A node is <dfn id=concept-rendering-substantial title=concept-rendering-substantial>substantial</dfn> if it is a text node
+  that is not <a href=#inter-element-whitespace>inter-element whitespace</a>, or if it is an element node.</p>
+
+  <p>A node is <dfn id=concept-rendering-blank title=concept-rendering-blank>blank</dfn> if it is an element that contains no
+  <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> nodes.</p>
+
+  <p>The <dfn id=concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>elements with default margins</dfn>
+  are the following elements: <code><a href=#the-blockquote-element>blockquote</a></code>, <code><a href=#dir>dir</a></code>, <code><a href=#the-dl-element>dl</a></code>,
+  <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>,
+  <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code><a href=#listing>listing</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#multicol>multicol</a></code>, <code><a href=#the-ol-element>ol</a></code>,
+  <code><a href=#the-p-element>p</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#xmp>xmp</a></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
+  <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
+  previous siblings is expected to have a user-agent level style sheet rule that sets its
+  'margin-top' property to zero.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code><a href=#the-body-element>body</a></code>, <code>td<code>, or
+  <code><a href=#the-th-element>th</a></code> element, has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a>
+  previous siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have
+  a user-agent level style sheet rule that sets its 'margin-bottom' property to zero also.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <a href=#concept-rendering-elements-with-margins title=concept-rendering-elements-with-margins>element
+  with default margins</a> that is the child of a <code>td<code> or <code><a href=#the-th-element>th</a></code> element, has
+  no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, and is <a href=#concept-rendering-blank title=concept-rendering-blank>blank</a>, is expected to have a user-agent level style sheet
+  rule that sets its 'margin-top' property to zero.</code></code></p>
+
+  <p>In <a href=#quirks-mode>quirks mode</a>, any <code><a href=#the-p-element>p</a></code> element that is the child of a <code>td<code>
+  or <code><a href=#the-th-element>th</a></code> element and has no <a href=#concept-rendering-substantial title=concept-rendering-substantial>substantial</a> following siblings, is expected to have a
+  user-agent level style sheet rule that sets its 'margin-bottom' property to zero.</code></code></p>
+
+
+  <h4 id=form-controls><span class=secno>14.3.11 </span>Form controls</h4>
+
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
 input, select, option, optgroup, button, textarea, keygen {
@@ -93997,7 +94024,7 @@
 
 
 
-  <h4 id=the-hr-element-0><span class=secno>14.3.11 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
+  <h4 id=the-hr-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-hr-element>hr</a></code> element</h4>
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 
@@ -94047,7 +94074,7 @@
 
 
 
-  <h4 id=the-fieldset-element-0><span class=secno>14.3.12 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
+  <h4 id=the-fieldset-element-0><span class=secno>14.3.13 </span>The <code><a href=#the-fieldset-element>fieldset</a></code> element</h4>
 
   <pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
 

Modified: source
===================================================================
--- source	2013-06-06 20:15:15 UTC (rev 7923)
+++ source	2013-06-06 20:33:32 UTC (rev 7924)
@@ -103903,13 +103903,6 @@
 
   <hr>
 
-  <p>When a <code>Document</code> is in <span>quirks mode</span>,
-  vertical margins on <span>HTML elements</span> at the top or bottom
-  of <code>body</code> elements are expected to be collapsed to
-  zero.</p>
-
-  <hr>
-
   <p>When a <code>body</code> element has a <code
   title="attr-background">background</code> attribute set to a
   non-empty value, the new value is expected to be <span
@@ -104751,11 +104744,6 @@
   to the dimension property">map to the dimension property</span> 'width'
   on the element.</p>
 
-  <p>When a <code>Document</code> is in <span>quirks mode</span>,
-  vertical margins on <span>HTML elements</span> at the top or bottom
-  of <code>td</code> or <code>th</code> elements are expected to be
-  collapsed to zero.</p>
-
   <hr>
 
   <p>The <code>caption</code> element unless specified otherwise
@@ -104883,6 +104871,44 @@
   activating the elements will cause the table to be sorted.</p>
 
 
+  <h4>Margin collapsing quirks</h4>
+
+  <p>A node is <dfn title="concept-rendering-substantial">substantial</dfn> if it is a text node
+  that is not <span>inter-element whitespace</span>, or if it is an element node.</p>
+
+  <p>A node is <dfn title="concept-rendering-blank">blank</dfn> if it is an element that contains no
+  <span title="concept-rendering-substantial">substantial</span> nodes.</p>
+
+  <p>The <dfn title="concept-rendering-elements-with-margins">elements with default margins</dfn>
+  are the following elements: <code>blockquote</code>, <code>dir</code>, <code>dl</code>,
+  <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>, <code>h5</code>,
+  <code>h6</code>, <code>listing</code>, <code>menu</code>, <code>multicol</code>, <code>ol</code>,
+  <code>p</code>, <code>plaintext</code>, <code>pre</code>, <code>ul</code>, <code>xmp</code></p>
+
+  <p>In <span>quirks mode</span>, any <span title="concept-rendering-elements-with-margins">element
+  with default margins</span> that is the child of a <code>body</code>, <code>td<code>, or
+  <code>th</code> element and has no <span title="concept-rendering-substantial">substantial</span>
+  previous siblings is expected to have a user-agent level style sheet rule that sets its
+  'margin-top' property to zero.</p>
+
+  <p>In <span>quirks mode</span>, any <span title="concept-rendering-elements-with-margins">element
+  with default margins</span> that is the child of a <code>body</code>, <code>td<code>, or
+  <code>th</code> element, has no <span title="concept-rendering-substantial">substantial</span>
+  previous siblings, and is <span title="concept-rendering-blank">blank</span>, is expected to have
+  a user-agent level style sheet rule that sets its 'margin-bottom' property to zero also.</p>
+
+  <p>In <span>quirks mode</span>, any <span title="concept-rendering-elements-with-margins">element
+  with default margins</span> that is the child of a <code>td<code> or <code>th</code> element, has
+  no <span title="concept-rendering-substantial">substantial</span> following siblings, and is <span
+  title="concept-rendering-blank">blank</span>, is expected to have a user-agent level style sheet
+  rule that sets its 'margin-top' property to zero.</p>
+
+  <p>In <span>quirks mode</span>, any <code>p</code> element that is the child of a <code>td<code>
+  or <code>th</code> element and has no <span
+  title="concept-rendering-substantial">substantial</span> following siblings, is expected to have a
+  user-agent level style sheet rule that sets its 'margin-bottom' property to zero.</p>
+
+
   <h4>Form controls</h4>
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);




More information about the Commit-Watchers mailing list