html5/spec Overview.html,1.1482,1.1483

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv24367

Modified Files:
	Overview.html 
Log Message:
WF2: <textarea wrap=''> and related fallout. (whatwg r2310)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1482
retrieving revision 1.1483
diff -u -d -r1.1482 -r1.1483
--- Overview.html	9 Oct 2008 01:03:49 -0000	1.1482
+++ Overview.html	9 Oct 2008 20:32:39 -0000	1.1483
@@ -21736,47 +21736,72 @@
 };</pre>
    </dd> 
   </dl><!-- XXX add selectionStart and company --><p>The <code><a href=#the-textarea-element>textarea</a></code> element represents a multiline plain
-  text edit control for the element's <a href=#concept-fe-value title=concept-fe-value>value</a>. The contents of the control
-  represent the control's default value.<p><em>Whenever</em> the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is set or changed, for
-  whatever reason, every occurance of a U+000D CARRIAGE RETURN (CR)
-  character not followed by a U+000A LINE FEED (LF) character, and
-  every occurance of a U+000A LINE FEED (LF) character not proceeded
-  by a U+000D CARRIAGE RETURN (CR) character, must be replaced the
-  two-character string consisting of a U+000D CARRIAGE RETURN - U+000A
-  LINE FEED (CRLF) character pair.<p>The <dfn id=attr-textarea-readonly title=attr-textarea-readonly><code>readonly</code></dfn> attribute
+  text edit control for the element's <dfn id=concept-textarea-raw-value title=concept-textarea-raw-value>raw value</dfn>. The contents of
+  the control represent the control's default value.<p>The <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> of
+  a <code><a href=#the-textarea-element>textarea</a></code> control must be initially the empty
+  string.<p>The <dfn id=attr-textarea-readonly title=attr-textarea-readonly><code>readonly</code></dfn> attribute
   is a <a href=#boolean-attribute>boolean attribute</a> used to control whether the text
   can be edited by the user or not.<p><strong>Constraint validation:</strong> If the <code title=attr-textarea-readonly><a href=#attr-textarea-readonly>readonly</a></code> attribute is
   specified on a <code><a href=#the-textarea-element>textarea</a></code> element, the element is
   <a href=#barred-from-constraint-validation>barred from constraint validation</a>.<p>A <code><a href=#the-textarea-element>textarea</a></code> element is <dfn id=concept-textarea-mutable title=concept-textarea-mutable>mutable</dfn> if it is neither
   <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a> nor has a <code title=attr-textarea-readonly><a href=#attr-textarea-readonly>readonly</a></code> attribute
-  specified.<p>When a <code><a href=#the-textarea-element>textarea</a></code> is <a href=#concept-textarea-mutable title=concept-textarea-mutable>mutable</a>, its <a href=#concept-fe-value title=concept-fe-value>value</a> should be editable by the
-  user.<p>A <code><a href=#the-textarea-element>textarea</a></code> element has a <dfn id=concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</dfn>, which must be
+  specified.<p>When a <code><a href=#the-textarea-element>textarea</a></code> is <a href=#concept-textarea-mutable title=concept-textarea-mutable>mutable</a>, its <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> should be
+  editable by the user.<p>A <code><a href=#the-textarea-element>textarea</a></code> element has a <dfn id=concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</dfn>, which must be
   initially set to false, and must be set to true whenever the user
-  interacts with the control in a way that changes the <a href=#concept-fe-value title=concept-fe-value>value</a>.<p>When the <code><a href=#the-textarea-element>textarea</a></code> element's <code><a href=#textcontent>textContent</a></code>
+  interacts with the control in a way that changes the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a>.<p>When the <code><a href=#the-textarea-element>textarea</a></code> element's <code><a href=#textcontent>textContent</a></code>
   DOM attribute changes value, if the element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</a> is false,
-  then the element's <a href=#concept-fe-value title=concept-fe-value>value</a> must
-  be set to the value of the element's <code><a href=#textcontent>textContent</a></code> DOM
-  attribute.<p>The <a href=#concept-form-reset-control title=concept-form-reset-control>reset
+  then the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw
+  value</a> must be set to the value of the element's
+  <code><a href=#textcontent>textContent</a></code> DOM attribute.<p>The <a href=#concept-form-reset-control title=concept-form-reset-control>reset
   algorithm</a> for <code><a href=#the-textarea-element>textarea</a></code> elements is to set the
-  element's <a href=#concept-fe-value title=concept-fe-value>value</a> to the value
-  of the element's <code><a href=#textcontent>textContent</a></code> DOM attribute.<p>The <dfn id=attr-textarea-cols title=attr-textarea-cols><code>cols</code></dfn>
+  element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>value</a> to
+  the value of the element's <code><a href=#textcontent>textContent</a></code> DOM
+  attribute.<p>The <dfn id=attr-textarea-cols title=attr-textarea-cols><code>cols</code></dfn>
   attribute specifies the expected maximum number of characters per
   line. If the <code title=attr-textarea-cols><a href=#attr-textarea-cols>cols</a></code> attribute
   is specified, its value must be a <a href=#valid-non-negative-integer>valid non-negative
   integer</a> greater than zero. If applying the <a href=#rules-for-parsing-non-negative-integers>rules for
   parsing non-negative integers</a> to the attribute's value
-  results in a number greater than zero, then the user agent may use
-  that number as a hint to the user as to how many characters the
-  server prefers per line (e.g. for visual user agents by making the
-  width of the control be that many characters).<p>The <dfn id=attr-textarea-rows title=attr-textarea-rows><code>rows</code></dfn>
+  results in a number greater than zero, then the element's <dfn id=attr-textarea-cols-value title=attr-textarea-cols-value>character width</dfn> is that value;
+  otherwise, it is 20.<p>The user agent may use the <code><a href=#the-textarea-element>textarea</a></code> element's <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character width</a> as a hint to
+  the user as to how many characters the server prefers per line
+  (e.g. for visual user agents by making the width of the control be
+  that many characters). In visual renderings, the user agent should
+  wrap the user's input in the rendering so that each line is no wider
+  than this number of characters.<p>The <dfn id=attr-textarea-rows title=attr-textarea-rows><code>rows</code></dfn>
   attribute specifies the number of lines to show. If the <code title=attr-textarea-rows><a href=#attr-textarea-rows>rows</a></code> attribute is specified, its
   value must be a <a href=#valid-non-negative-integer>valid non-negative integer</a> greater than
   zero. If applying the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative
   integers</a> to the attribute's value results in a number greater
-  than zero, then visual user agents should set the height of the
-  control to the specified number of lines.<p class=XXX> ... <dfn id=attr-textarea-wrap title=attr-textarea-wrap><code>wrap</code></dfn>
+  than zero, then the element's <dfn id=attr-textarea-rows-value title=attr-textarea-rows-value>character height</dfn> is that
+  value; otherwise, it is 2.<p>Visual user agents should set the height of the control to the
+  number of lines given by <a href=#attr-textarea-rows-value title=attr-textarea-rows-value>character height</a>.<p>The <dfn id=attr-textarea-wrap title=attr-textarea-wrap><code>wrap</code></dfn>
+  attribute is an <a href=#enumerated-attribute>enumerated attribute</a> with two keywords
+  and states: the <dfn id=attr-textarea-wrap-soft title=attr-textarea-wrap-soft><code>soft</code></dfn> keyword
+  which maps to the <dfn id=attr-textarea-wrap-soft-state title=attr-textarea-wrap-soft-state>Soft</dfn> state, and the the
+  <dfn id=attr-textarea-wrap-hard title=attr-textarea-wrap-hard><code>hard</code></dfn> keyword
+  which maps to the <dfn id=attr-textarea-wrap-hard-state title=attr-textarea-wrap-hard-state>Hard</dfn> state. The
+  <i>missing value default</i> is the <a href=#attr-textarea-wrap-soft-state title=attr-textarea-wrap-soft-state>Soft</a> state.<p>If the element's <code title=attr-textarea-wrap><a href=#attr-textarea-wrap>wrap</a></code>
+  attribute is in the <a href=#attr-textarea-wrap-hard-state title=attr-textarea-wrap-hard-state>Hard</a> state, the <code title=attr-textarea-cols><a href=#attr-textarea-cols>cols</a></code> attribute must be
+  specified.<p>The element's <a href=#concept-fe-value title=concept-fe-value>value</a> is
+  defined to be the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with the
+  following transformation applied:<ol><li><p>Replace every occurance of a U+000D CARRIAGE RETURN (CR)
+   character not followed by a U+000A LINE FEED (LF) character, and
+   every occurance of a U+000A LINE FEED (LF) character not proceeded
+   by a U+000D CARRIAGE RETURN (CR) character, by a two-character
+   string consisting of a U+000D CARRIAGE RETURN - U+000A LINE FEED
+   (CRLF) character pair.</li>
 
-  <p class=XXX> ... <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn>
+   <li><p>If the element's <code title=attr-textarea-wrap><a href=#attr-textarea-wrap>wrap</a></code> attribute is in the <a href=#attr-textarea-wrap-hard-state title=attr-textarea-wrap-hard-state>Hard</a> state, insert
+   U+000D CARRIAGE RETURN - U+000A LINE FEED (CRLF) character pairs
+   into the string using a UA-defined algorithm so that each line so
+   that each line has no more than <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character width</a>
+   characters. The the purposes of this requirement, lines are
+   delimited by the start of the string, the end of the string, and
+   U+000D CARRIAGE RETURN - U+000A LINE FEED (CRLF) character
+   pairs.</li>
+
+  </ol><p class=XXX> ... <dfn id=attr-textarea-maxlength title=attr-textarea-maxlength><code>maxlength</code></dfn>
 
   <p class=XXX> ... <dfn id=attr-textarea-required title=attr-textarea-required><code>required</code></dfn>
 

Received on Thursday, 9 October 2008 20:32:50 UTC