Skip to content

Commit

Permalink
[] (0) Filling in the rendering section: color-related presentational…
Browse files Browse the repository at this point in the history
… hints; fixes for previous checkin.

git-svn-id: http://svn.whatwg.org/webapps@2751 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 4, 2009
1 parent 7b390a5 commit c706922
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 85 deletions.
128 changes: 89 additions & 39 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -2602,24 +2602,24 @@
<li>Return <var title="">number</var>.</li>

</ol><h5 id=percentages-and-dimensions><span class=secno>2.4.3.5 </span>Percentages and lengths</h5>

<p>A string is a <dfn id=valid-dimension-value>valid dimension value</dfn> if it consists of
<!--(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 <a href=#valid-dimension-value>valid dimension value</a> represents the number that
<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 <a href=#valid-dimension-value title="valid dimension
value">valid dimension values</a>.</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 id=rules-for-parsing-dimension-values>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
Expand Down Expand Up @@ -2680,9 +2680,6 @@

</ol></li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
U+0030 DIGIT ZERO (0) characters, and discard them.</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.</li>

Expand Down Expand Up @@ -3736,13 +3733,19 @@
<li><p>Return <var title="">result</var>, which will be a
<a href=#valid-lowercase-simple-color>valid lowercase simple color</a>.</li>

</ol><p class=note>The <a href=#canvas-context-2d title=canvas-context-2d>2D graphics
</ol><hr><p>Some obsolete legacy attributes parse colors in a more
complicated manner, using the <dfn id=rules-for-parsing-a-legacy-color-value>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 <a href=#simple-color>simple color</a> or an error.</p>

<ol class=XXX><li>...

</ol><hr><p class=note>The <a href=#canvas-context-2d title=canvas-context-2d>2D graphics
context</a> 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 id=space-separated-tokens><span class=secno>2.4.6 </span>Space-separated tokens</h4>

Expand Down Expand Up @@ -55883,23 +55886,6 @@ style, title { display: none; }</pre>
<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 id=maps-to-the-pixel-length-property>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 <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>
doesn't generate an error, then the user agent is expected to use
the parsed value as a pixel length for a <a href=#presentational-hints title="presentational
hints">presentational hint</a> 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 id=maps-to-the-dimension-property>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 <a href=#rules-for-parsing-dimension-values>rules for parsing dimension values</a> doesn't
generate an error, then the user agent is expected to use the parsed
dimension as the value for a <a href=#presentational-hints title="presentational
hints">presentational hint</a> 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 id=display-types><span class=secno>10.3.2 </span>Display types</h4>
Expand Down Expand Up @@ -56007,6 +55993,22 @@ td, th { padding: 1px; }</pre>
<code>frame</code> or <code><a href=#the-iframe-element>iframe</a></code> element. Otherwise, there
is no <a href=#container-frame-element>container frame element</a>.</p>

<hr><p>When the text below says that an attribute <var title="">attribute</var> on an element <var title="">element</var>
<dfn id=maps-to-the-pixel-length-property>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 <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>
doesn't generate an error, then the user agent is expected to use
the parsed value as a pixel length for a <a href=#presentational-hints title="presentational
hints">presentational hint</a> 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 id=maps-to-the-dimension-property>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 <a href=#rules-for-parsing-dimension-values>rules for parsing dimension values</a> doesn't
generate an error, then the user agent is expected to use the parsed
dimension as the value for a <a href=#presentational-hints title="presentational
hints">presentational hint</a> 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><a href=#the-table-element>table</a></code> element's <code title=attr-table-cellspacing>cellspacing</code> attribute
<a href=#maps-to-the-pixel-length-property>maps to the pixel length property</a> 'border-spacing' on the
element.</p>
Expand Down Expand Up @@ -56203,14 +56205,62 @@ thead, tbody, tfoot, tr { border-color: inherit; }</pre>
<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 -->
<hr><p>When a <code><a href=#the-body-element>body</a></code>, <code><a href=#the-table-element>table</a></code>, <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>, or <code><a href=#the-th-element>th</a></code> element has a <code title=attr-background>background</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
hint</a> setting the element's 'background-image' property to the
resulting <a href=#absolute-url>absolute URL</a>.</p>

<p>When a <code><a href=#the-body-element>body</a></code>, <code><a href=#the-table-element>table</a></code>, <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>, or <code><a href=#the-th-element>th</a></code> element has a <code title=attr-bgcolor>bgcolor</code> attribute set, the new value is
expected to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy
color value</a>, and the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
hint</a> setting the element's 'background-color' property to the
resulting color.</p>

<p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-body-text><a href=#attr-body-text>text</a></code> attribute, its value is expected
to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy color
value</a>, and the user agent is expected to treat the attribute
as a <a href=#presentational-hints title="presentational hints">presentational hint</a>
setting the element's 'color' property to the resulting color.</p>

<p>When a <code><a href=#the-body-element>body</a></code> element has a <code title=attr-body-link><a href=#attr-body-link>link</a></code> attribute, its value is expected
to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy color
value</a>, and the user agent is expected to treat the attribute
as a <a href=#presentational-hints title="presentational hints">presentational hint</a>
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><a href=#the-body-element>body</a></code> element has a <code title=attr-body-vlink><a href=#attr-body-vlink>vlink</a></code> attribute, its value is
expected to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy
color value</a>, and the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
hint</a> 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><a href=#the-body-element>body</a></code> element has a <code title=attr-body-alink><a href=#attr-body-alink>alink</a></code> attribute, its value is
expected to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy
color value</a>, and the user agent is expected to treat the
attribute as a <a href=#presentational-hints title="presentational hints">presentational
hint</a> 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><a href=#the-table-element>table</a></code> element has a <code title=attr-table-bordercolor>bordercolor</code> attribute, its
value is expected to be parsed using the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a
legacy color value</a>, and the user agent is expected to treat
the attribute as a <a href=#presentational-hints title="presentational hints">presentational
hint</a> 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 -->
Expand Down
Loading

0 comments on commit c706922

Please sign in to comment.