Permalink
Browse files

[] (0) Clarify how to handle legacy color attributes when the parser …

…for them returns an error. (credit: sp) (bug 6556)

git-svn-id: http://svn.whatwg.org/webapps@2941 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent f4f94a3 commit 5dbfa5bf8bcba93a7138e92be17cbb56e56025ce @Hixie Hixie committed Mar 31, 2009
Showing with 80 additions and 78 deletions.
  1. +37 −39 index
  2. +43 −39 source
View
76 index
@@ -60606,56 +60606,53 @@ table[frames=border] > tfoot > tr > td, table[frames=border] > tfoot
<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>
+ color value</a>, and if that does not return an error, 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>
+ value</a>, and if that does not return an error, 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>
+ value</a>, and if that does not return an error, 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>
+ color value</a>, and if that does not return an error, 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>
+ color value</a>, and if that does not return an error, 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>
+ legacy color value</a>, and if that does not return an error, 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>When a <code>font</code> element has a <code title=attr-font-color>color</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>
+ color value</a>, and if that does not return an error, 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>font</code> element has a <code title=attr-font-face>face</code> attribute, the user agent is
expected to treat the attribute as a <a href=#presentational-hints title="presentational
@@ -61018,9 +61015,10 @@ hr[color], hr[noshade] { border-style: solid; }</pre>
<p>When an <code><a href=#the-hr-element>hr</a></code> element has a <code title=attr-hr-color>color</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>
+ value</a>, and if that does not return an error, 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>
@@ -61900,10 +61898,10 @@ textarea { binding: <i title="">textarea</i>; }</pre>
<code>frame</code> element is the color obtained from the
following algorithm:</p>
- <ol><li><p>If the element has a <code title=attr-frames-bordercolor>bordercolor</code> attribute,
- then return the color obtained from applying the <a href=#rules-for-parsing-a-legacy-color-value>rules for
- parsing a legacy color value</a> to that attribute's
- value.</li>
+ <ol><li><p>If the element has a <code title=attr-frames-bordercolor>bordercolor</code> attribute, and
+ applying the <a href=#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy color value</a>
+ to that attribute's value does not result in an error, then
+ return the color so obtained.</li>
<li><p>Otherwise, if the element has a parent element that is a
<code>frameset</code> element, then the <a href=#frame-border-color>frame border
View
82 source
@@ -71084,64 +71084,67 @@ table[frames=border] > tfoot > tr > td, table[frames=border] > tfoot > tr > th {
<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>
+ color value</span>, and if that does not return an error, 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>
+ value</span>, and if that does not return an error, 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>
+ value</span>, and if that does not return an error, 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>
+ color value</span>, and if that does not return an error, 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>
+ color value</span>, and if that does not return an error, 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>
+ legacy color value</span>, and if that does not return an error, 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>When a <code>font</code> element has a <code
title="attr-font-color">color</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>
+ color value</span>, and if that does not return an error, 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>font</code> element has a <code
title="attr-font-face">face</code> attribute, the user agent is
@@ -71538,9 +71541,10 @@ hr[color], hr[noshade] { border-style: solid; }</pre>
<p>When an <code>hr</code> element has a <code
title="attr-hr-color">color</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>
+ value</span>, and if that does not return an error, 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>
@@ -72552,10 +72556,10 @@ textarea { binding: <i title="">textarea</i>; }</pre>
<ol>
<li><p>If the element has a <code
- title="attr-frames-bordercolor">bordercolor</code> attribute,
- then return the color obtained from applying the <span>rules for
- parsing a legacy color value</span> to that attribute's
- value.</p></li>
+ title="attr-frames-bordercolor">bordercolor</code> attribute, and
+ applying the <span>rules for parsing a legacy color value</span>
+ to that attribute's value does not result in an error, then
+ return the color so obtained.</p></li>
<li><p>Otherwise, if the element has a parent element that is a
<code>frameset</code> element, then the <span>frame border

0 comments on commit 5dbfa5b

Please sign in to comment.