HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2751Filling in the rendering section: color-related presentational hints; fixes for previous checkin.2009-02-04 10:43
@@ -1701,38 +1701,38 @@
    title="">number</var>. This step cannot fail (<var
    title="">string</var> is guaranteed to be a <span>valid floating
    point number</span>).</li>
 
    <li>Return <var title="">number</var>.</li>
 
   </ol>
 
 
   <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
   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), optionally followed
   by a U+002E FULL STOP character (.) and one of more characters in
   the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and
   optionally suffixed by a U+0025 PERCENT SIGN character (%).</p>
 
   <p>A <span>valid dimension value</span> represents the number that
   is represented in base ten by that string of digits, optionally with
   a fractional component. If the U+0025 PERCENT SIGN is present, then
   the dimension is a percentage; otherwise, it is a length.</p>
 
   <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
   value. This algorithm will either return a number greater than or
   equal to 1.0, or an error; if a number is returned, then it is
   further categorised as either a percentage or a length.</p>
 
   <ol>
 
    <li><p>Let <var title="">input</var> be the string being
@@ -1793,23 +1793,20 @@
      that number by <span title="">10<sup title=""><var
      title="">length</var></sup></span>.</li>
 
      <li><p>Increment <var title="">value</var> by <var
      title="">fraction</var>.</p></li>
 
     </ol>
 
    </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>
 
    <li><p>If the next character is a U+0025 PERCENT SIGN character
    (%), return <var title="">value</var> as a percentage.</p></li>
 
    <li><p>Return <var title="">value</var> as a length.</p></li>
 
   </ol>
@@ -3167,27 +3164,41 @@
    (0) .. U+0039 DIGIT NINE (9) and U+0061 LATIN SMALL LETTER A
    .. U+0066 LATIN SMALL LETTER F, zero-padding if necessary, and
    append these numbers to <var title="">result</var>, in the order
    red, green, blue.</p>
 
    <li><p>Return <var title="">result</var>, which will be a
    <span>valid lowercase simple color</span>.</p></li>
 
   </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
   more words separated by one or more <span title="space
   character">space characters</span>, where words consist of any
   string of one or more characters, none of which are <span
   title="space character">space characters</span>.</p>
 
   <p>A string containing a <span>set of space-separated tokens</span>
@@ -61084,46 +61095,20 @@ style, title { display: none; }</pre>
   called out as <dfn>presentational hints</dfn>.</p>
 
   <p>Rules regarding left and right margins are given here as
   appropriate for elements whose 'direction' property is 'ltr', and
   are expected to be flipped around on elements whose 'direction'
   property is 'rtl'.</p>
 
   <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);
 
 address, article, aside, blockquote, body, center, dd, dialog, dir,
 div, dl, dt, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hr,
 html, layer, legend, listing, menu, multicol, nav, ol, p, plaintext,
 pre, section, ul, xmp { display: block; }
@@ -61244,20 +61229,48 @@ td, th { padding: 1px; }</pre>
   <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>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
   element.</p>
 
   <p>The <code>table</code> element's <code
   title="attr-table-cellpadding">cellpadding</code> attribute <span
   title="maps to the pixel length property">maps to the pixel length
   properties</span> 'padding-top', 'padding-right', 'padding-bottom',
   and 'padding-left' of any <code>td</code> and <code>th</code>
@@ -61465,32 +61478,84 @@ thead, tbody, tfoot, tr { border-color: inherit; }</pre>
            but it's still not optimal... -->
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
 <var title="">x</var> h1 { font-size: 1.05em; }
 <var title="">x</var> <var title="">x</var> h1 { font-size: 1.17em; }
 <var title="">x</var> <var title="">x</var> <var title="">x</var> h1 { font-size: 1.00em; }
 <var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> h1 { font-size: 0.83em; }
 <var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> <var title="">x</var> h1 { font-size: 0.67em; }</pre>
 
   <hr>
 
-  <p class="XXX">...background...</p>
-  <!-- body, table, td, th, tbody, tfoot, thead, tr: background (empty string ignored?), bgcolor -->
-
-  <hr>
-
-  <p class="XXX">...body...</p>
-  <!--link, vlink, alink, text -->
-
-  <hr>
-
-  <p class="XXX">...tables...</p>
-  <!-- table: bordercolor -->
+  <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>
+
+  <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>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>
+
+  <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>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>
   <!-- face=>font-family -->
   <!-- pointsize=>font-size as pt if present;
        otherwise size=>font-size as follows:
         int <0: as x-small
         int >7: as xx-large
         1,2,3,4,5,6: as x-small,small,medium,large,x-large,xx-large; quirks offsets by one?

|