Short URL: http://html5.org/r/2769
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2769 | Filling in the rendering section: <textarea>; minor editorial fixes here and there. | 2009-02-10 00:15 |
Index: source
===================================================================
--- source (revision 2768)
+++ source (revision 2769)
@@ -62570,7 +62570,21 @@
implement any relevant animations, etc, that are appropriate for the
platform. <a href="#refsCSSUI">[CSSUI]</a></p>
+ <hr>
+ <p>The <dfn>converting a character width to pixels</dfn> algorithm,
+ used by some of the bindings below, returns <span>(<var
+ title="">size-1</var>)×<var
+ title="">avg</var> + <var title="">max</var></span>, where
+ <var title="">size</var> is the character width to convert, <var
+ title="">avg</var> is the average character width of the primary
+ font for the element for which the algorithm is being run, in
+ pixels, and <var title="">max</var> is the maximum character width
+ of that same font, also in pixels. (The element's 'letter-spacing'
+ property does not affect the result.)</p>
+
+
+
<h4>The <code>bb</code> element</h4>
<pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
@@ -62672,11 +62686,11 @@
states has a <code title="attr-input-size">size</code> attribute,
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 attribute as a
- <span>presentational hints</span> for the 'width' property on the
- element, with the value obtained from applying the <span>converting
- a character width to pixels</span> algorithm to the value of the
- attribute.</p>
+ user agent is expected to use the attribute as a <span
+ title="presentational hints">presentational hint</span> for the
+ 'width' property on the element, with the value obtained from
+ applying the <span>converting a character width to pixels</span>
+ algorithm to the value of the attribute.</p>
<p>If an <code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in one of the above
@@ -62687,18 +62701,8 @@
from applying the <span>converting a character width to
pixels</span> algorithm to the number 20.</p>
- <p>The <dfn>converting a character width to pixels</dfn> algorithm
- return <span>(<var title="">size-1</var>)×<var
- title="">avg</var> + <var title="">max</var></span>, where
- <var title="">size</var> is the character width to convert, <var
- title="">avg</var> is the average character width of the primary
- font for the element for which the algorithm is being run, in
- pixels, and <var title="">max</var> is the maximum character width
- of that same font, also in pixels. (The element's 'letter-spacing'
- property does not affect the result.)</p>
-
<h4>The <code>input</code> element as domain-specific widgets</h4>
<pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
@@ -62975,19 +62979,20 @@
as an 'inline-block' box whose 'height' is the height necessary to
contain as many rows for items as <span title="rules for parsing
non-negative integers">specified</span> by the element's <code
- title="attr-select-size">size</code> attribute, and whose 'width' is
- the <span>width of the <code>select</code>'s labels</span>, plus the
- width of a scrollbar.</p>
+ title="attr-select-size">size</code> attribute, or four rows if the
+ attribute is absent, and whose 'width' is the <span>width of the
+ <code>select</code>'s labels</span> plus the width of a
+ scrollbar.</p>
<p>When the <i title="">select</i> binding applies to a
<code>select</code> element whose <code
title="attr-select-multiple">multiple</code> attribute is absent,
and the element's <code title="attr-select-size">size</code>
attribute is either absent or <span title="rules for parsing
- non-negative integers">specifies</span> a value less than or equal
- to 1, the element is expected to render as a one-line drop down box
- whose width is the <span>width of the <code>select</code>'s
- labels</span>.</p>
+ non-negative integers">specifies</span> either no value (an error),
+ or a value less than or equal to 1, the element is expected to
+ render as a one-line drop down box whose width is the <span>width of
+ the <code>select</code>'s labels</span>.</p>
<p>In either case (list box or drop-down box), the element's items
are expected to be the element's <span
@@ -63013,15 +63018,36 @@
+ <h4>The <code>textarea</code> element</h4>
+ <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
+textarea { binding: <i title="">textarea</i>; }</pre>
- <h4>The <code>textarea</code> element</h4>
+ <p>When the <i title="">textarea</i> binding applies to a
+ <code>textarea</code> element, the element is expected to render as
+ an 'inline-block' box rendered as a multiline text field.</p>
- <p class="XXX">...</p>
+ <p>If the element has a <code title="attr-input-cols">cols</code>
+ attribute, 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 attribute as a <span
+ title="presentational hints">presentational hint</span> for the
+ 'width' property on the element, with the value obtained from
+ applying the <span>converting a character width to pixels</span>
+ algorithm to the value of the attribute and then adding the width of
+ a scroll bar.</p>
+ <p>If the element has a <code title="attr-input-rows">rows</code>
+ attribute, 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 attribute as a <span
+ title="presentational hints">presentational hint</span> for the
+ 'height' property on the element, with the value being the specified
+ number of lines, plus the height of a scrollbar.</p>
+
<h3>Frames and framesets</h3>
<p>When an <code>html</code> element's second child element is a