- From: poot <cvsmail@w3.org>
- Date: Fri, 5 Jun 2009 10:25:37 +0900 (JST)
- To: public-html-diffs@w3.org
Correct the algorithm for <textarea> dimensions. (credit: ov) (whatwg
r3193)
Diffs for this change per section:
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#status-of-this-document
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#introduction-11
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#a-vocabulary-and-associated-apis-for-html-and-xhtml
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#the-input-element-as-a-text-entry-widget
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#converting-a-character-width-to-pixels
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#editor-s-draft-date-1-january-1970
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#textarea-effective-width
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#textarea-effective-height
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#the-input-element-as-domain-specific-widgets
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#the-bb-element-0
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2346.html#the-textarea-element-0
http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2345&r2=1.2346&f=h
http://html5.org/tools/web-apps-tracker?from=3192&to=3193
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2345
retrieving revision 1.2346
diff -u -d -r1.2345 -r1.2346
--- Overview.html 4 Jun 2009 23:42:59 -0000 1.2345
+++ Overview.html 5 Jun 2009 01:24:01 -0000 1.2346
@@ -152,7 +152,7 @@
<h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
<!--ZZZ:-->
<!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
- <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 4 June 2009</h2>
+ <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 5 June 2009</h2>
<!--:ZZZ-->
<dl><!-- ZZZ: update the month/day (twice), (un)comment out
<dt>This Version:</dt>
@@ -245,7 +245,7 @@
track.
<!--ZZZ:-->
<!--This specification is the 23 April 2009 Working Draft.-->
- This specification is the 4 June 2009 Editor's Draft.
+ This specification is the 5 June 2009 Editor's Draft.
<!--:ZZZ-->
</p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -63082,14 +63082,6 @@
implement any relevant animations, etc, that are appropriate for the
platform. <a href="#references">[CSSUI]</a></p>
- <hr><p>The <dfn id="converting-a-character-width-to-pixels">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 id="the-bb-element-0"><span class="secno">11.4.2 </span>The <code><a href="#the-bb-element">bb</a></code> element</h4>
@@ -63195,6 +63187,14 @@
from applying the <a href="#converting-a-character-width-to-pixels">converting a character width to
pixels</a> algorithm to the number 20.</p>
+ <p>The <dfn id="converting-a-character-width-to-pixels">converting a character width to pixels</dfn> algorithm
+ returns <span>(<var title="">size</var>-1)×<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 id="the-input-element-as-domain-specific-widgets"><span class="secno">11.4.7 </span>The <code><a href="#the-input-element">input</a></code> element as domain-specific widgets</h4>
@@ -63641,17 +63641,33 @@
attribute, 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 attribute as a <a href="#presentational-hints" title="presentational hints">presentational hint</a> for the
- 'width' property on the element, with the value obtained from
- applying the <a href="#converting-a-character-width-to-pixels">converting a character width to pixels</a>
- algorithm to the value of the attribute and then adding the width of
- a scroll bar.</p>
+ 'width' property on the element, with the value being the
+ <a href="#textarea-effective-width">textarea effective width</a> (as defined below). Otherwise,
+ the user agent is expected to act as if it had a user-agent-level
+ style sheet rule setting the 'width' property on the element to the
+ <a href="#textarea-effective-width">textarea effective width</a>.</p>
+
+ <p>The <dfn id="textarea-effective-width">textarea effective width</dfn> of a
+ <code><a href="#the-textarea-element">textarea</a></code> element is <span><var title="">size</var>×<var title="">avg</var> + <var title="">sbw</var></span>, where <var title="">size</var> is the
+ element's <a href="#attr-textarea-cols-value" title="attr-textarea-cols-value">character
+ width</a>, <var title="">avg</var> is the average character width
+ of the primary font of the element, in CSS pixels, and <var title="">sbw</var> is the width of a scroll bar, in CSS pixels. (The
+ element's 'letter-spacing' property does not affect the result.)</p>
<p>If the element has a <code title="attr-textarea-rows"><a href="#attr-textarea-rows">rows</a></code>
attribute, 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 attribute as a <a href="#presentational-hints" title="presentational hints">presentational hint</a> for the
- 'height' property on the element, with the value being the specified
- number of lines, plus the height of a scrollbar.</p>
+ 'height' property on the element, with the value being the
+ <a href="#textarea-effective-height">textarea effective height</a> (as defined
+ below). Otherwise, the user agent is expected to act as if it had a
+ user-agent-level style sheet rule setting the 'height' property on
+ the element to the <a href="#textarea-effective-height">textarea effective height</a>.</p>
+
+ <p>The <dfn id="textarea-effective-height">textarea effective height</dfn> of a
+ <code><a href="#the-textarea-element">textarea</a></code> element is the height in CSS pixels of the
+ number of lines specified the element's <a href="#attr-textarea-rows-value" title="attr-textarea-rows-value">character height</a>, plus the
+ height of a scrollbar in CSS pixels.</p>
<p>For historical reasons, if the element has a <code title="attr-textarea-wrap"><a href="#attr-textarea-wrap">wrap</a></code> attribute whose value is an
<a href="#ascii-case-insensitive">ASCII case-insensitive</a> match for the string "<code title="attr-textarea-wrap-off">off</code>", then the user agent is
Received on Friday, 5 June 2009 01:26:13 UTC