[html5] r8577 - [e] (0) Fix prose around the <textarea> value / maxlength issues to be slightly [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Apr 23 08:38:17 PDT 2014


Author: ianh
Date: 2014-04-23 08:38:15 -0700 (Wed, 23 Apr 2014)
New Revision: 8577

Modified:
   complete.html
   index
   source
Log:
[e] (0) Fix prose around the <textarea> value / maxlength issues to be slightly less confusing and ambiguous. Clean up some text around MutationObservers.
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2014-04-14 23:21:54 UTC (rev 8576)
+++ complete.html	2014-04-23 15:38:15 UTC (rev 8577)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 14 April 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 23 April 2014</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>
@@ -3759,7 +3759,6 @@
      <li>The concept of a DOM <dfn id=concept-range title=concept-range>range</dfn>, and the terms <dfn id=concept-range-start title=concept-range-start>start</dfn>, <dfn id=concept-range-end title=concept-range-end>end</dfn>, and <dfn id=concept-range-bp title=concept-range-bp>boundary point</dfn> as applied to ranges.</li>
 
      <li><dfn id=mutationobserver><code>MutationObserver</code></dfn> interface</li>
-     <li>The <dfn id=mutationobserver-scripting-environment><code>MutationObserver</code> <var title="">scripting environment</var></dfn> concept</li>
      <li>The <dfn id=concept-mo-invoke title=concept-mo-invoke>invoke <code>MutationObserver</code> objects</dfn> algorithm</li>
 
      <li><dfn id=promise>Promise</dfn> interface</li>
@@ -45792,7 +45791,7 @@
   the element's <code><a href=#textcontent>textContent</a></code> IDL attribute.</p>
 
   <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-textarea-raw-value title=concept-textarea-raw-value>value</a> to the
+  elements is to set the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> to the
   value of the element's <code><a href=#textcontent>textContent</a></code> IDL attribute.</p>
 
   <!-- this next bit is also in the <input> Text/Search section -->
@@ -45858,12 +45857,14 @@
 
   <div class=impl>
 
+<!--CLEANUP-->
   <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
+  <a href=#concept-fe-value title=concept-fe-value>value</a>, as used in form submission and other processing models
+  in this specification. 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>
@@ -45878,7 +45879,9 @@
    <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 (LF)
    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>
+  </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 <a href=#textarea-wrapping-transformation>textarea wrapping
+  transformation</a> applied. The <dfn id=textarea-wrapping-transformation>textarea wrapping transformation</dfn> is the following
+  algorithm, as applied to a string:</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
@@ -45897,9 +45900,11 @@
   by the <code><a href=#the-textarea-element>textarea</a></code> element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value
   flag</a>.</p>
 
+<!--CLEANUP-->
   <p>If the <code><a href=#the-textarea-element>textarea</a></code> element has a <a href=#maximum-allowed-value-length>maximum allowed value length</a>, then the
   element's children must be such that the <a href=#code-unit-length>code-unit length</a> of the value of the
-  element's <code><a href=#textcontent>textContent</a></code> IDL attribute is equal to or less than the element's
+  element's <code><a href=#textcontent>textContent</a></code> IDL attribute with the <a href=#textarea-wrapping-transformation>textarea wrapping
+  transformation</a> applied is equal to or less than the element's
   <a href=#maximum-allowed-value-length>maximum allowed value length</a>.</p>
 
   <p>The <dfn id=attr-textarea-minlength title=attr-textarea-minlength><code>minlength</code></dfn> attribute is a <a href=#attr-fe-minlength title=attr-fe-minlength>form control <code title="">minlength</code> attribute</a> controlled
@@ -47480,6 +47485,10 @@
   <p>User agents may prevent the user from causing the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to be set to a value whose <a href=#code-unit-length>code-unit length</a> is
   greater than the element's <a href=#maximum-allowed-value-length>maximum allowed value length</a>.</p>
 
+  <p class=note>In the case of <code><a href=#the-textarea-element>textarea</a></code> elements, this is the <a href=#concept-fe-value title=concept-fe-value>value</a>, not the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw
+  value</a>, so the <a href=#textarea-wrapping-transformation>textarea wrapping transformation</a> is applied before the
+  <a href=#maximum-allowed-value-length>maximum allowed value length</a> is checked.</p>
+
   </div>
 
 
@@ -72239,10 +72248,7 @@
 
   <p class=note>The Web IDL specification also uses these algorithms. <a href=#refsWEBIDL>[WEBIDL]</a></p>
 
-  <hr><!--CLEANUP--><p>For the purposes of <code><a href=#mutationobserver>MutationObserver</a></code>
-  objects, each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> is a distinct <var title="MutationObserver scripting environment"><a href=#mutationobserver-scripting-environment>scripting environment</a></var>.</p>
-
-  <p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=global-script-clean-up-jobs-list>global script
+  <hr><p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=global-script-clean-up-jobs-list>global script
   clean-up jobs list</dfn>, which must initially be empty. A global script clean-up job cannot run
   scripts, and cannot be sensitive to the order in which other clean-up jobs are executed. The File
   API uses this to release <code title="">blob:</code> URLs. <a href=#refsFILEAPI>[FILEAPI]</a></p>
@@ -72676,17 +72682,6 @@
 
    </li>
 
-   <li>
-
-    <p><a href=#concept-mo-invoke title=concept-mo-invoke>Invoke <code>MutationObserver</code> objects</a> for the
-    <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> to which the <a href=#responsible-browsing-context>responsible
-    browsing context</a> specified by the script's <a href=#settings-object>settings object</a> belongs.</p>
-
-    <p class=critical>This will be removed once mutation observers have been updated to use the
-    <a href=#microtask-queue>microtask queue</a>.</p>
-
-   </li>
-
    <li><p><i>Microtask queue handling</i>: If the <a href=#event-loop>event loop</a>'s <a href=#microtask-queue>microtask
    queue</a> is empty, jump to the <i>done</i> step below.</li>
 

Modified: index
===================================================================
--- index	2014-04-14 23:21:54 UTC (rev 8576)
+++ index	2014-04-23 15:38:15 UTC (rev 8577)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 14 April 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 23 April 2014</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>
@@ -3759,7 +3759,6 @@
      <li>The concept of a DOM <dfn id=concept-range title=concept-range>range</dfn>, and the terms <dfn id=concept-range-start title=concept-range-start>start</dfn>, <dfn id=concept-range-end title=concept-range-end>end</dfn>, and <dfn id=concept-range-bp title=concept-range-bp>boundary point</dfn> as applied to ranges.</li>
 
      <li><dfn id=mutationobserver><code>MutationObserver</code></dfn> interface</li>
-     <li>The <dfn id=mutationobserver-scripting-environment><code>MutationObserver</code> <var title="">scripting environment</var></dfn> concept</li>
      <li>The <dfn id=concept-mo-invoke title=concept-mo-invoke>invoke <code>MutationObserver</code> objects</dfn> algorithm</li>
 
      <li><dfn id=promise>Promise</dfn> interface</li>
@@ -45792,7 +45791,7 @@
   the element's <code><a href=#textcontent>textContent</a></code> IDL attribute.</p>
 
   <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-textarea-raw-value title=concept-textarea-raw-value>value</a> to the
+  elements is to set the element's <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw value</a> to the
   value of the element's <code><a href=#textcontent>textContent</a></code> IDL attribute.</p>
 
   <!-- this next bit is also in the <input> Text/Search section -->
@@ -45858,12 +45857,14 @@
 
   <div class=impl>
 
+<!--CLEANUP-->
   <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
+  <a href=#concept-fe-value title=concept-fe-value>value</a>, as used in form submission and other processing models
+  in this specification. 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>
@@ -45878,7 +45879,9 @@
    <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 (LF)
    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>
+  </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 <a href=#textarea-wrapping-transformation>textarea wrapping
+  transformation</a> applied. The <dfn id=textarea-wrapping-transformation>textarea wrapping transformation</dfn> is the following
+  algorithm, as applied to a string:</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
@@ -45897,9 +45900,11 @@
   by the <code><a href=#the-textarea-element>textarea</a></code> element's <a href=#concept-textarea-dirty title=concept-textarea-dirty>dirty value
   flag</a>.</p>
 
+<!--CLEANUP-->
   <p>If the <code><a href=#the-textarea-element>textarea</a></code> element has a <a href=#maximum-allowed-value-length>maximum allowed value length</a>, then the
   element's children must be such that the <a href=#code-unit-length>code-unit length</a> of the value of the
-  element's <code><a href=#textcontent>textContent</a></code> IDL attribute is equal to or less than the element's
+  element's <code><a href=#textcontent>textContent</a></code> IDL attribute with the <a href=#textarea-wrapping-transformation>textarea wrapping
+  transformation</a> applied is equal to or less than the element's
   <a href=#maximum-allowed-value-length>maximum allowed value length</a>.</p>
 
   <p>The <dfn id=attr-textarea-minlength title=attr-textarea-minlength><code>minlength</code></dfn> attribute is a <a href=#attr-fe-minlength title=attr-fe-minlength>form control <code title="">minlength</code> attribute</a> controlled
@@ -47480,6 +47485,10 @@
   <p>User agents may prevent the user from causing the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to be set to a value whose <a href=#code-unit-length>code-unit length</a> is
   greater than the element's <a href=#maximum-allowed-value-length>maximum allowed value length</a>.</p>
 
+  <p class=note>In the case of <code><a href=#the-textarea-element>textarea</a></code> elements, this is the <a href=#concept-fe-value title=concept-fe-value>value</a>, not the <a href=#concept-textarea-raw-value title=concept-textarea-raw-value>raw
+  value</a>, so the <a href=#textarea-wrapping-transformation>textarea wrapping transformation</a> is applied before the
+  <a href=#maximum-allowed-value-length>maximum allowed value length</a> is checked.</p>
+
   </div>
 
 
@@ -72239,10 +72248,7 @@
 
   <p class=note>The Web IDL specification also uses these algorithms. <a href=#refsWEBIDL>[WEBIDL]</a></p>
 
-  <hr><!--CLEANUP--><p>For the purposes of <code><a href=#mutationobserver>MutationObserver</a></code>
-  objects, each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> is a distinct <var title="MutationObserver scripting environment"><a href=#mutationobserver-scripting-environment>scripting environment</a></var>.</p>
-
-  <p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=global-script-clean-up-jobs-list>global script
+  <hr><p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=global-script-clean-up-jobs-list>global script
   clean-up jobs list</dfn>, which must initially be empty. A global script clean-up job cannot run
   scripts, and cannot be sensitive to the order in which other clean-up jobs are executed. The File
   API uses this to release <code title="">blob:</code> URLs. <a href=#refsFILEAPI>[FILEAPI]</a></p>
@@ -72676,17 +72682,6 @@
 
    </li>
 
-   <li>
-
-    <p><a href=#concept-mo-invoke title=concept-mo-invoke>Invoke <code>MutationObserver</code> objects</a> for the
-    <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> to which the <a href=#responsible-browsing-context>responsible
-    browsing context</a> specified by the script's <a href=#settings-object>settings object</a> belongs.</p>
-
-    <p class=critical>This will be removed once mutation observers have been updated to use the
-    <a href=#microtask-queue>microtask queue</a>.</p>
-
-   </li>
-
    <li><p><i>Microtask queue handling</i>: If the <a href=#event-loop>event loop</a>'s <a href=#microtask-queue>microtask
    queue</a> is empty, jump to the <i>done</i> step below.</li>
 

Modified: source
===================================================================
--- source	2014-04-14 23:21:54 UTC (rev 8576)
+++ source	2014-04-23 15:38:15 UTC (rev 8577)
@@ -2472,7 +2472,6 @@
      <li>The concept of a DOM <dfn data-x="concept-range">range</dfn>, and the terms <dfn data-x="concept-range-start">start</dfn>, <dfn data-x="concept-range-end">end</dfn>, and <dfn data-x="concept-range-bp">boundary point</dfn> as applied to ranges.</li>
 
      <li><dfn><code>MutationObserver</code></dfn> interface</li>
-     <li>The <dfn><code>MutationObserver</code> <var data-x="">scripting environment</var></dfn> concept</li>
      <li>The <dfn data-x="concept-mo-invoke">invoke <code>MutationObserver</code> objects</dfn> algorithm</li>
 
      <li><dfn>Promise</dfn> interface</li>
@@ -50202,7 +50201,7 @@
   the element's <code>textContent</code> IDL attribute.</p>
 
   <p>The <span data-x="concept-form-reset-control">reset algorithm</span> for <code>textarea</code>
-  elements is to set the element's <span data-x="concept-textarea-raw-value">value</span> to the
+  elements is to set the element's <span data-x="concept-textarea-raw-value">raw value</span> to the
   value of the element's <code>textContent</code> IDL attribute.</p>
 
   <!-- this next bit is also in the <input> Text/Search section -->
@@ -50283,12 +50282,14 @@
 
   <div class="impl">
 
+<!--CLEANUP-->
   <p>For historical reasons, the element's value is normalised in three different ways for three
   different purposes. The <span data-x="concept-textarea-raw-value">raw value</span> is the value as
   it was originally set. It is not normalized. The <span data-x="concept-textarea-api-value">API
   value</span> is the value used in the <code data-x="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 data-x="concept-fe-value">value</span>. It is normalized so that line breaks
+  <span data-x="concept-fe-value">value</span>, as used in form submission and other processing models
+  in this specification. 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 data-x="attr-textarea-wrap">wrap</code> attribute, additional line breaks
   are inserted to wrap the text at the given width.</p>
@@ -50310,7 +50311,9 @@
   </ol>
 
   <p>The element's <span data-x="concept-fe-value">value</span> is defined to be the element's <span
-  data-x="concept-textarea-raw-value">raw value</span> with the following transformation applied:</p>
+  data-x="concept-textarea-raw-value">raw value</span> with the <span>textarea wrapping
+  transformation</span> applied. The <dfn>textarea wrapping transformation</dfn> is the following
+  algorithm, as applied to a string:</p>
 
   <ol>
 
@@ -50335,9 +50338,11 @@
   by the <code>textarea</code> element's <span data-x="concept-textarea-dirty">dirty value
   flag</span>.</p>
 
+<!--CLEANUP-->
   <p>If the <code>textarea</code> element has a <span>maximum allowed value length</span>, then the
   element's children must be such that the <span>code-unit length</span> of the value of the
-  element's <code>textContent</code> IDL attribute is equal to or less than the element's
+  element's <code>textContent</code> IDL attribute with the <span>textarea wrapping
+  transformation</span> applied is equal to or less than the element's
   <span>maximum allowed value length</span>.</p>
 
   <p>The <dfn data-x="attr-textarea-minlength"><code>minlength</code></dfn> attribute is a <span
@@ -52125,6 +52130,11 @@
   data-x="concept-fe-value">value</span> to be set to a value whose <span>code-unit length</span> is
   greater than the element's <span>maximum allowed value length</span>.</p>
 
+  <p class="note">In the case of <code>textarea</code> elements, this is the <span
+  data-x="concept-fe-value">value</span>, not the <span data-x="concept-textarea-raw-value">raw
+  value</span>, so the <span>textarea wrapping transformation</span> is applied before the
+  <span>maximum allowed value length</span> is checked.</p>
+
   </div>
 
 
@@ -80740,11 +80750,6 @@
 
   <hr>
 
-<!--CLEANUP-->
-  <p>For the purposes of <code>MutationObserver</code>
-  objects, each <span>unit of related similar-origin browsing contexts</span> is a distinct <var
-  data-x="MutationObserver scripting environment">scripting environment</var>.</p>
-
   <p>Each <span>unit of related similar-origin browsing contexts</span> has a <dfn>global script
   clean-up jobs list</dfn>, which must initially be empty. A global script clean-up job cannot run
   scripts, and cannot be sensitive to the order in which other clean-up jobs are executed. The File
@@ -81232,17 +81237,6 @@
 
    </li>
 
-   <li>
-
-    <p><span data-x="concept-mo-invoke">Invoke <code>MutationObserver</code> objects</span> for the
-    <span>unit of related similar-origin browsing contexts</span> to which the <span>responsible
-    browsing context</span> specified by the script's <span>settings object</span> belongs.</p>
-
-    <p class="critical">This will be removed once mutation observers have been updated to use the
-    <span>microtask queue</span>.</p>
-
-   </li>
-
    <li><p><i>Microtask queue handling</i>: If the <span>event loop</span>'s <span>microtask
    queue</span> is empty, jump to the <i>done</i> step below.</p></li>
 




More information about the Commit-Watchers mailing list