[html5] r6815 - [giow] (2) compat changes for <textarea>.value and .textLength Fixing http://www [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Nov 3 10:06:09 PDT 2011


Author: ianh
Date: 2011-11-03 10:06:05 -0700 (Thu, 03 Nov 2011)
New Revision: 6815

Modified:
   complete.html
   index
   source
Log:
[giow] (2) compat changes for <textarea>.value and .textLength
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13983

Modified: complete.html
===================================================================
--- complete.html	2011-11-02 20:35:57 UTC (rev 6814)
+++ complete.html	2011-11-03 17:06:05 UTC (rev 6815)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 2 November 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 3 November 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -50023,7 +50023,29 @@
 
   <div class=impl>
 
-  <p>The element's <a href=#concept-fe-value title=concept-fe-value>value</a> is
+  <p>For historical reasons, the element's value is normalised in
+  three different ways for three different purposes. The <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> is the value as
+  it was originally set. It is not normalized. The <a href=#concept-textarea-api-value title=concept-textarea-api-value>API value</a> is the value
+  used in the <code title=dom-textarea-value><a href=#dom-textarea-value>value</a></code> IDL
+  attribute. It is normalized so that line breaks use U+000A LINE FEED
+  (LF) characters. Finally, there is the form submission <a href=#concept-fe-value title=concept-fe-value>value</a>. 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><a href=#attr-textarea-wrap>wrap</a></code> attribute, additional line
+  breaks are inserted to wrap the text at the given width.</p>
+
+  <p>The element's <dfn id=concept-textarea-api-value title=concept-textarea-api-value>API
+  value</dfn> 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:</p>
+
+  <ol><li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
+   character pair from the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with a single
+   U+000A LINE FEED (CRLF) character.</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN character from
+   the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with
+   a single U+000A LINE FEED (CRLF) character.</li>
+
+  </ol><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:</p>
 
@@ -50149,7 +50171,7 @@
   IDL attribute.</p>
 
   <p>The <dfn id=dom-textarea-value title=dom-textarea-value><code>value</code></dfn>
-  attribute must, on getting, return the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a>; on setting, it
+  attribute must, on getting, return the element's <a href=#concept-textarea-api-value title=concept-textarea-api-value>API value</a>; on setting, it
   must set the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw
   value</a> to the new value, set the element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</a> to true, and
   should then move the text entry cursor position to the end of the
@@ -50158,7 +50180,8 @@
 
   <p>The <dfn id=dom-textarea-textlength title=dom-textarea-textLength><code>textLength</code></dfn> IDL
   attribute must return the <a href=#code-point-length>code-point length</a> of the
-  element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+  element's <a href=#concept-textarea-api-value title=concept-textarea-api-value>API
+  value</a>.</p>
 
   <p>The <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code>, <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code>, and <code title=dom-cva-validationMessage><a href=#dom-cva-validationmessage>validationMessage</a></code>
   attributes, and the <code title=dom-cva-checkValidatity><a href=#dom-cva-checkvalidatity>checkValidity()</a></code> and <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code>

Modified: index
===================================================================
--- index	2011-11-02 20:35:57 UTC (rev 6814)
+++ index	2011-11-03 17:06:05 UTC (rev 6815)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 2 November 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 3 November 2011</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -50023,7 +50023,29 @@
 
   <div class=impl>
 
-  <p>The element's <a href=#concept-fe-value title=concept-fe-value>value</a> is
+  <p>For historical reasons, the element's value is normalised in
+  three different ways for three different purposes. The <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> is the value as
+  it was originally set. It is not normalized. The <a href=#concept-textarea-api-value title=concept-textarea-api-value>API value</a> is the value
+  used in the <code title=dom-textarea-value><a href=#dom-textarea-value>value</a></code> IDL
+  attribute. It is normalized so that line breaks use U+000A LINE FEED
+  (LF) characters. Finally, there is the form submission <a href=#concept-fe-value title=concept-fe-value>value</a>. 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><a href=#attr-textarea-wrap>wrap</a></code> attribute, additional line
+  breaks are inserted to wrap the text at the given width.</p>
+
+  <p>The element's <dfn id=concept-textarea-api-value title=concept-textarea-api-value>API
+  value</dfn> 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:</p>
+
+  <ol><li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
+   character pair from the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with a single
+   U+000A LINE FEED (CRLF) character.</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN character from
+   the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> with
+   a single U+000A LINE FEED (CRLF) character.</li>
+
+  </ol><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:</p>
 
@@ -50149,7 +50171,7 @@
   IDL attribute.</p>
 
   <p>The <dfn id=dom-textarea-value title=dom-textarea-value><code>value</code></dfn>
-  attribute must, on getting, return the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a>; on setting, it
+  attribute must, on getting, return the element's <a href=#concept-textarea-api-value title=concept-textarea-api-value>API value</a>; on setting, it
   must set the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw
   value</a> to the new value, set the element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value flag</a> to true, and
   should then move the text entry cursor position to the end of the
@@ -50158,7 +50180,8 @@
 
   <p>The <dfn id=dom-textarea-textlength title=dom-textarea-textLength><code>textLength</code></dfn> IDL
   attribute must return the <a href=#code-point-length>code-point length</a> of the
-  element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+  element's <a href=#concept-textarea-api-value title=concept-textarea-api-value>API
+  value</a>.</p>
 
   <p>The <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code>, <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code>, and <code title=dom-cva-validationMessage><a href=#dom-cva-validationmessage>validationMessage</a></code>
   attributes, and the <code title=dom-cva-checkValidatity><a href=#dom-cva-checkvalidatity>checkValidity()</a></code> and <code title=dom-cva-setCustomValidity><a href=#dom-cva-setcustomvalidity>setCustomValidity()</a></code>

Modified: source
===================================================================
--- source	2011-11-02 20:35:57 UTC (rev 6814)
+++ source	2011-11-03 17:06:05 UTC (rev 6815)
@@ -56071,6 +56071,38 @@
 
   <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
@@ -56228,7 +56260,7 @@
 
   <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
@@ -56239,7 +56271,8 @@
   <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




More information about the Commit-Watchers mailing list