HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2751

File a bug

SVNBugCommentTime (UTC)
2751Filling in the rendering section: color-related presentational hints; fixes for previous checkin.2009-02-04 10:43
Index: source
===================================================================
--- source	(revision 2750)
+++ source	(revision 2751)
@@ -1708,7 +1708,7 @@
 
 
   <h5 id="percentages-and-dimensions">Percentages and lengths</h5>
-
+<!--(percentages are not used in html5)
   <p>A string is a <dfn>valid dimension value</dfn> if it consists of
   a character in the range U+0031 DIGIT ONE (1) to U+0039 DIGIT NINE
   (9), optionally followed by zero of more characters in the range
@@ -1725,7 +1725,7 @@
   <p class="note">For historical reasons, percentanges and lengths
   less than 1.0 cannot be represented as <span title="valid dimension
   value">valid dimension values</span>.</p>
-
+-->
   <p>The <dfn>rules for parsing dimension values</dfn> are as given in
   the following algorithm. When invoked, the steps must be followed in
   the order given, aborting at the first step that returns a
@@ -1800,9 +1800,6 @@
 
    </li>
 
-   <li><p><span>Collect a sequence of characters</span> that are
-   U+0030 DIGIT ZERO (0) characters, and discard them.</p></li>
-
    <li><p>If <var title="">position</var> is past the end of <var
    title="">input</var>, return <var title="">value</var> as a
    length.</p></li>
@@ -3174,14 +3171,28 @@
 
   </ol>
 
+  <hr>
+
+  <p>Some obsolete legacy attributes parse colors in a more
+  complicated manner, using the <dfn>rules for parsing a legacy color
+  value</dfn>, which are given in the following algorithm. When
+  invoked, the steps must be followed in the order given, aborting at
+  the first step that returns a value. This algorithm will either
+  return a <span>simple color</span> or an error.</p>
+
+  <ol class=XXX>
+
+   <li>...
+
+  </ol>
+
+  <hr>
+
   <p class="note">The <span title="canvas-context-2d">2D graphics
   context</span> has a separate color syntax that also handles
   opacity.</p>
 
-  <p class="note">Some obsolete legacy attributes parse colors in a
-  more complicated manner.</p>
 
-
   <h4>Space-separated tokens</h4>
 
   <p>A <dfn>set of space-separated tokens</dfn> is a set of zero or
@@ -61091,34 +61102,8 @@
   <p class="XXX">Please send feedback if you can accurately describe
   rules required by legacy content.</p>
 
-  <p>When the text below says that an attribute <var
-  title="">attribute</var> on an element <var title="">element</var>
-  <dfn>maps to the pixel length property</dfn> (or properties) <var
-  title="">properties</var>, it means that if <var
-  title="">element</var> has an attribute <var
-  title="">attribute</var> set, and parsing that attribute's value
-  using the <span>rules for parsing non-negative integers</span>
-  doesn't generate an error, then the user agent is expected to use
-  the parsed value as a pixel length for a <span title="presentational
-  hints">presentational hint</span> for <var
-  title="">property</var>.</p>
 
-  <p>When the text below says that an attribute <var
-  title="">attribute</var> on an element <var title="">element</var>
-  <dfn>maps to the dimension property</dfn> (or properties) <var
-  title="">properties</var>, it means that if <var
-  title="">element</var> has an attribute <var
-  title="">attribute</var> set, and parsing that attribute's value
-  using the <span>rules for parsing dimension values</span> doesn't
-  generate an error, then the user agent is expected to use the parsed
-  dimension as the value for a <span title="presentational
-  hints">presentational hint</span> for <var title="">property</var>,
-  with the value given as a pixel length if the dimension was an
-  integer, and with the value given as a percentage if the dimension
-  was a percentage.</p>
 
-
-
   <h4>Display types</h4>
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
@@ -61251,6 +61236,34 @@
 
   <hr>
 
+  <p>When the text below says that an attribute <var
+  title="">attribute</var> on an element <var title="">element</var>
+  <dfn>maps to the pixel length property</dfn> (or properties) <var
+  title="">properties</var>, it means that if <var
+  title="">element</var> has an attribute <var
+  title="">attribute</var> set, and parsing that attribute's value
+  using the <span>rules for parsing non-negative integers</span>
+  doesn't generate an error, then the user agent is expected to use
+  the parsed value as a pixel length for a <span title="presentational
+  hints">presentational hint</span> for <var
+  title="">properties</var>.</p>
+
+  <p>When the text below says that an attribute <var
+  title="">attribute</var> on an element <var title="">element</var>
+  <dfn>maps to the dimension property</dfn> (or properties) <var
+  title="">properties</var>, it means that if <var
+  title="">element</var> has an attribute <var
+  title="">attribute</var> set, and parsing that attribute's value
+  using the <span>rules for parsing dimension values</span> doesn't
+  generate an error, then the user agent is expected to use the parsed
+  dimension as the value for a <span title="presentational
+  hints">presentational hint</span> for <var
+  title="">properties</var>, with the value given as a pixel length if
+  the dimension was an integer, and with the value given as a
+  percentage if the dimension was a percentage.</p>
+
+  <hr>
+
   <p>The <code>table</code> element's <code
   title="attr-table-cellspacing">cellspacing</code> attribute
   <span>maps to the pixel length property</span> 'border-spacing' on the
@@ -61472,19 +61485,71 @@
 
   <hr>
 
-  <p class="XXX">...background...</p>
-  <!-- body, table, td, th, tbody, tfoot, thead, tr: background (empty string ignored?), bgcolor -->
+  <p>When a <code>body</code>, <code>table</code>, <code>thead</code>,
+  <code>tbody</code>, <code>tfoot</code>, <code>tr</code>,
+  <code>td</code>, or <code>th</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
+  title="resolve a url">resolved</span> relative to the element, and
+  if this is successful, the user agent is expected to treat the
+  attribute as a <span title="presentational hints">presentational
+  hint</span> setting the element's 'background-image' property to the
+  resulting <span>absolute URL</span>.</p>
 
-  <hr>
+  <p>When a <code>body</code>, <code>table</code>, <code>thead</code>,
+  <code>tbody</code>, <code>tfoot</code>, <code>tr</code>,
+  <code>td</code>, or <code>th</code> element has a <code
+  title="attr-bgcolor">bgcolor</code> attribute set, the new value is
+  expected to be parsed using the <span>rules for parsing a legacy
+  color value</span>, and the user agent is expected to treat the
+  attribute as a <span title="presentational hints">presentational
+  hint</span> setting the element's 'background-color' property to the
+  resulting color.</p>
 
-  <p class="XXX">...body...</p>
-  <!--link, vlink, alink, text -->
+  <p>When a <code>body</code> element has a <code
+  title="attr-body-text">text</code> attribute, its value is expected
+  to be parsed using the <span>rules for parsing a legacy color
+  value</span>, and the user agent is expected to treat the attribute
+  as a <span title="presentational hints">presentational hint</span>
+  setting the element's 'color' property to the resulting color.</p>
 
-  <hr>
+  <p>When a <code>body</code> element has a <code
+  title="attr-body-link">link</code> attribute, its value is expected
+  to be parsed using the <span>rules for parsing a legacy color
+  value</span>, and the user agent is expected to treat the attribute
+  as a <span title="presentational hints">presentational hint</span>
+  setting the 'color' property of any element in the
+  <code>Document</code> matching the ':link' pseudo-class to the
+  resulting color.</p>
 
-  <p class="XXX">...tables...</p>
-  <!-- table: bordercolor -->
+  <p>When a <code>body</code> element has a <code
+  title="attr-body-vlink">vlink</code> attribute, its value is
+  expected to be parsed using the <span>rules for parsing a legacy
+  color value</span>, and the user agent is expected to treat the
+  attribute as a <span title="presentational hints">presentational
+  hint</span> setting the 'color' property of any element in the
+  <code>Document</code> matching the ':visited' pseudo-class to the
+  resulting color.</p>
 
+  <p>When a <code>body</code> element has a <code
+  title="attr-body-alink">alink</code> attribute, its value is
+  expected to be parsed using the <span>rules for parsing a legacy
+  color value</span>, and the user agent is expected to treat the
+  attribute as a <span title="presentational hints">presentational
+  hint</span> setting the 'color' property of any element in the
+  <code>Document</code> matching the ':active' pseudo-class and either
+  the ':link' pseudo-class or the ':visited' pseudo-class to the
+  resulting color.</p>
+
+  <p>When a <code>table</code> element has a <code
+  title="attr-table-bordercolor">bordercolor</code> attribute, its
+  value is expected to be parsed using the <span>rules for parsing a
+  legacy color value</span>, and the user agent is expected to treat
+  the attribute as a <span title="presentational hints">presentational
+  hint</span> setting the element's 'border-top-color',
+  'border-right-color', 'border-bottom-color', and
+  'border-right-color' properties to the resulting color.</p>
+
   <hr>
 
   <p class="XXX">...font...</p>

|