HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2749Filling in the rendering section: <body> margins; administrivia2009-02-04 02:56
@@ -60921,31 +60921,32 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
 
    </li>
 
   </ol>
 
 
 
 
   <h2 id="rendering">Rendering</h2>
 
-  <p><em>This section all its subsections are non-normative.</em></p>
+  <p><em>User agents are not required present HTML documents in any
+  particular way. However, this section provides a set of suggestions
+  for rendering HTML documents that, if followed, are likely to lead
+  to a user experience that closely resembles the experience intended
+  by the documents' authors. So as to avoid confusion regarding the
+  normativity of this section, RFC2119 terms have not been used.
+  Instead, the term "expected" is used to indicate behavior that will
+  lead to this experience.</em></p>
 
 
   <h3>Introduction</h3>
 
-  <p>User agents are not required present HTML documents in any
-  particular way. This section merely provides a set of suggestions
-  for rendering HTML documents that, if followed, are likely to lead
-  to a user experience that closely resembles the experience intended
-  by the documents' authors.</p>
-
   <p>In general, user agents are expected to support CSS, and many of
   the suggestions in this section are expressed in CSS terms. User
   agents that use other presentation mechanisms can derive their
   expected behavior by translating from the CSS rules given in this
   section.</p>
 
   <p>The suggestions in this section generally assume a visual output
   medium with a resolution of 96dpi or greater, but HTML is intended
   to apply to multiple media (it is a <i>media-independent</i>
   language). User agents are encouraged to adapt the suggestions in
@@ -61004,45 +61005,42 @@ tfoot { display: table-footer-group; }
 tr { display: table-row; }
 td, th { display: table-cell; }
 
 li { display: list-item; }</pre>
 
   <!-- del, ins, and map are inline. -->
 
   <p>For the purposes of the CSS table model, the <code>col</code>
   element is to be treated as if it was present as many times as its
   <code title="attr-col-span">span</code> attribute <span title="rules
-  for parsing non-negative integers">specifies</span>.</p> <!-- XXX
-  link to dfn instead of parser -->
+  for parsing non-negative integers">specifies</span>.</p>
 
   <p>For the purposes of the CSS table model, the
   <code>colgroup</code> element, if it contains no <code>col</code>
   element, is to be treated as if it had as many such children as its
   <code title="attr-colgroup-span">span</code> attribute <span
   title="rules for parsing non-negative
-  integers">specifies</span>.</p> <!-- XXX link to dfn instead of
-  parser -->
+  integers">specifies</span>.</p>
 
   <p>For the purposes of the CSS table model, the <code
   title="attr-tdth-colspan">colspan</code> and <code
   title="attr-tdth-rowspan">rowspan</code> attributes on
-  <code>td</code> and <code>th</code> elements are expected to provide
-  the <i>special knowledge</i> regarding cells spanning rows and
-  columns.</p> <!-- XXX link to dfn instead of parser -->
+  <code>td</code> and <code>th</code> elements are expected to <span
+  title="rules for parsing non-negative integers">provide</span> the
+  <i>special knowledge</i> regarding cells spanning rows and
+  columns.</p>
 
 
   <h4>Margins and padding</h4>
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
 
-body { padding: 8px; }<!-- XXX or margin? -->
-
 blockquote, dir, dl, listing, menu, ol, p, plaintext, pre, ul, xmp {
   margin-top: 1em; margin-bottom: 1em;
 }
 dir dir, dir dl, dir menu, dir ol, dir ul,
 dl dir, dl dl, dl menu, dl ol, dl ul,
 menu dir, menu dl, menu menu, menu ol, menu ul,
 ol dir, ol dl, ol menu, ol ol, ol ul,
 ul dir, ul dl, ul menu, ul ol, ul ul {
   margin-top: 0; margin-bottom: 0;
 }
@@ -61068,22 +61066,81 @@ form { margin-bottom: 1em; }
 img[align=left] { margin-right: 3px; }
 img[align=right] { margin-left: 3px; }</pre>
 
   <p>When a <code>Document</code> is in <span>quirks mode</span>,
   margins on <span>HTML elements</span> that collapse with the top or
   bottom of the initial containing block are expected to be collapsed
   to zero.</p>
 
   <hr>
 
-  <p class="XXX">...body...</p>
-  <!-- marginwidth, marginheight -->
+  <p>For a <code>body</code> element, the 'margin-top',
+  'margin-right', 'margin-bottom', and 'margin-left' properties are
+  expected to be set by presentational hints from a variety of source,
+  given in the table below in precedence order. If one of the
+  attributes listed is present, then the first such attribute's value
+  is expected to be parsed using the <span>rules for parsing
+  non-negative integers</span>; if this does not result in an error,
+  then the parsed value is expected to be used as a pixel length for
+  the corresponding property. If no attribute is found, or if the
+  attribute's value cannot be parsed successfully, then a default
+  value of 8px is expected to be used.</p>
+
+  <!-- XXX so, uh, about the cross-site-styling hole below... -->
+
+  <table>
+   <thead>
+    <tr>
+     <th>Property
+     <th>Source
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-top'
+     <td><code>body</code> element's <code title="attr-body-marginheight">marginheight</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginheight">marginheight</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-topmargin">topmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-right'
+     <td><code>body</code> element's <code title="attr-body-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-rightmargin">rightmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-bottom'
+     <td><code>body</code> element's <code title="attr-body-marginheight">marginheight</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginheight">marginheight</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-bottommargin">topmargin</code> attribute
+   <tbody>
+    <tr>
+     <td rowspan="3">'margin-left'
+     <td><code>body</code> element's <code title="attr-body-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td>The <code>body</code> element's <span>container frame element</span>'s <code title="attr-frame-marginwidth">marginwidth</code> attribute
+    <tr>
+     <td><code>body</code> element's <code title="attr-body-leftmargin">rightmargin</code> attribute
+  </table>
+
+  <p>If the <code>body</code> element's <code>Document</code>'s
+  <span>browsing context</span> is a <span>nested browsing
+  context</span>, and the <span>browsing context container</span> of
+  that <span>nested browsing context</span> is a <code>frame</code> or
+  <code>iframe</code> element, then the the <dfn>container frame
+  element</dfn> of the <code>body</code> element is that
+  <code>frame</code> or <code>iframe</code> element. Otherwise, there
+  is no <span>container frame element</span>.</p>
 
   <hr>
 
   <p class="XXX">...tables...</p>
   <!-- cellspacing, cellpadding, height, width* (int/%; *width=0 => width:auto); <table hspace/vspace> (int); <table cols>; <table border> (border => border=1); -->
   <!-- td/th width height: 0=>auto; %=>%; n=>px -->
   <!-- col width=int/% span=n -->
   <!-- tbody/thead/tfoot height=int/% (ignore %?) -->
   <!-- tr height=int/% -->
 
@@ -61664,20 +61721,25 @@ target element as follows:
 
   <!-- XXX
 
     Extensions to CSS
       for drag and drop
       for datagrid
       ...
 
   -->
 
+  <!-- XXX need to separate the author-level rules from the user-agent-level rules
+       so that the user-level rules can slide between them
+       the spec lists the attributes that should count as presentational:
+       http://www.w3.org/Style/Group/css2-src/cascade.html#preshint -->
+
 
 
   <h2>Obsolete features</h2>
 
   <p>Authors and documents must not use the features listed in this
   section. They are documented to enable user agents to support legacy
   content in an interoperable fashion.</p>
 
 <!-- XXX Elements that have been dropped: ACRONYM B BASEFONT BLINK BIG
 CENTER DIR DIV FONT FRAME FRAMESET I ISINDEX MARQUEE NOEMBED NOFRAMES

|