HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
681513983[Gecko] [Internet Explorer] [Opera] [Webkit] compat changes for <textarea>.value and .textLength2011-11-03 17:06
@@ -56064,20 +56064,52 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
   title="attr-textarea-wrap-hard-state">Hard</span> state, the <code
   title="attr-textarea-cols">cols</code> attribute must be
   specified.</p>
 
   <!-- attr-textarea-wrap-off (attr-textarea-wrap-off-state): not
   conforming; turns off the rendering of wrapping but otherwise acts
   like 'soft' -->
 
   <div class="impl">
 
+  <p>For historical reasons, the element's value is normalised in
+  three different ways for three different purposes. The <span
+  title="concept-textarea-raw-value">raw value</span> is the value as
+  it was originally set. It is not normalized. The <span
+  title="concept-textarea-api-value">API value</span> is the value
+  used in the <code title="dom-textarea-value">value</code> IDL
+  attribute. It is normalized so that line breaks use U+000A LINE FEED
+  (LF) characters. Finally, there is the form submission <span
+  title="concept-fe-value">value</span>. It is normalized so that line
+  breaks use U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character
+  pairs, and in addition, if necessary given the element's <code
+  title="attr-textarea-wrap">wrap</code> attribute, additional line
+  breaks are inserted to wrap the text at the given width.</p>
+
+  <p>The element's <dfn title="concept-textarea-api-value">API
+  value</dfn> is defined to be the element's <span
+  title="concept-textarea-raw-value">raw value</span> with the
+  following transformation applied:</p>
+
+  <ol>
+
+   <li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
+   character pair from the <span
+   title="concept-textarea-raw-value">raw value</span> with a single
+   U+000A LINE FEED (CRLF) character.</p></li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN character from
+   the <span title="concept-textarea-raw-value">raw value</span> with
+   a single U+000A LINE FEED (CRLF) character.</p></li>
+
+  </ol>
+
   <p>The element's <span title="concept-fe-value">value</span> is
   defined to be the element's <span
   title="concept-textarea-raw-value">raw value</span> with the
   following transformation applied:</p>
 
   <ol>
 
    <li><p>Replace every occurrence of a U+000D CARRIAGE RETURN (CR)
    character not followed by a U+000A LINE FEED (LF) character, and
    every occurrence of a U+000A LINE FEED (LF) character not preceded
@@ -56221,32 +56253,33 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
   <p>The <dfn title="dom-textarea-type"><code>type</code></dfn> IDL
   attribute must return the value "<code title="">textarea</code>".</p>
 
   <p>The <dfn
   title="dom-textarea-defaultValue"><code>defaultValue</code></dfn>
   IDL attribute must act like the element's <code>textContent</code>
   IDL attribute.</p>
 
   <p>The <dfn title="dom-textarea-value"><code>value</code></dfn>
   attribute must, on getting, return the element's <span
-  title="concept-textarea-raw-value">raw value</span>; on setting, it
+  title="concept-textarea-api-value">API value</span>; on setting, it
   must set the element's <span title="concept-textarea-raw-value">raw
   value</span> to the new value, set the element's <span
   title="concept-textarea-dirty">dirty value flag</span> to true, and
   should then move the text entry cursor position to the end of the
   text field, unselecting any selected text and resetting the
   selection direction to <i>none</i>.</p>
 
   <p>The <dfn
   title="dom-textarea-textLength"><code>textLength</code></dfn> IDL
   attribute must return the <span>code-point length</span> of the
-  element's <span title="concept-fe-value">value</span>.</p>
+  element's <span title="concept-textarea-api-value">API
+  value</span>.</p>
 
   <p>The <code title="dom-cva-willValidate">willValidate</code>, <code
   title="dom-cva-validity">validity</code>, and <code
   title="dom-cva-validationMessage">validationMessage</code>
   attributes, and the <code
   title="dom-cva-checkValidatity">checkValidity()</code> and <code
   title="dom-cva-setCustomValidity">setCustomValidity()</code>
   methods, are part of the <span>constraint validation API</span>. The
   <code title="dom-lfe-labels">labels</code> attribute provides a list
   of the element's <code>label</code>s. The <code

|