[html5] r7763 - [giow] (3) Match reality, and factor out an algorithm. Fixing https://www.w3.org [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 21 11:47:32 PDT 2013


Author: ianh
Date: 2013-03-21 11:47:31 -0700 (Thu, 21 Mar 2013)
New Revision: 7763

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Match reality, and factor out an algorithm.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20780
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2013-03-21 18:22:07 UTC (rev 7762)
+++ complete.html	2013-03-21 18:47:31 UTC (rev 7763)
@@ -4157,6 +4157,11 @@
   user agent must remove all <a href=#space-character title="space character">space characters</a> that are at the
   start or end of the string.</p>
 
+  <p>When a user agent is to <dfn id=strip-and-collapse-whitespace>strip and collapse whitespace</dfn> in a string, it must replace
+  any sequence of one or more consecutive <a href=#space-character title="space character">space characters</a> in
+  that string with a single U+0020 SPACE character, and then <a href=#strip-leading-and-trailing-whitespace>strip leading and trailing
+  whitespace</a> from that string.</p>
+
   <p>When a user agent has to <dfn id=strictly-split-a-string>strictly split a string</dfn> on a particular delimiter character
   <var title="">delimiter</var>, it must use the following algorithm:</p>
 
@@ -8591,10 +8596,8 @@
    the empty string if <a href=#the-title-element-0>the <code>title</code> element</a> is
    null.</li>
 
-   <li><p>Replace any sequence of one or more consecutive <a href=#space-character title="space character">space characters</a> in <var title="">value</var> with a single U+0020 SPACE character.</li>
+   <li><p><a href=#strip-and-collapse-whitespace>Strip and collapse whitespace</a> in <var title="">value</var>.</li>
 
-   <li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from <var title="">value</var>.</li>
-
    <li><p>Return <var title="">value</var>.</li>
 
   </ol><p>On setting, the following algorithm must be run. Mutation events
@@ -50795,14 +50798,11 @@
   element's <a href=#concept-option-index title=concept-option-index>index</a>.</p>
 
   <p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> IDL attribute, on getting, must return
-  the concatenation of <a href=#concept-cd-data title=concept-cd-data>data</a> of all the <code><a href=#text>Text</a></code> node
-  descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>, excluding any that are
-  descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are themselves
-  <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code>
-  elements in the <a href=#svg-namespace>SVG namespace</a>, with <a href=#strip-leading-and-trailing-whitespace title="strip leading and trailing
-  whitespace">leading and trailing whitespace stripped</a>, and with any sequences of two or more
-  <a href=#space-character title="space character">space characters</a> replaced by a single U+0020 SPACE
-  character.</p>
+  the result of <a href=#strip-and-collapse-whitespace title="strip and collapse whitespace">stripping and collapsing
+  whitespace</a> from the concatenation of <a href=#concept-cd-data title=concept-cd-data>data</a> of all the
+  <code><a href=#text>Text</a></code> node descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>,
+  excluding any that are descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are
+  themselves <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code> elements in the <a href=#svg-namespace>SVG namespace</a>.</p>
 
   <p>On setting, the <code title=dom-option-text><a href=#dom-option-text>text</a></code> attribute must act as if the
   <code><a href=#textcontent>textContent</a></code> IDL attribute on the element had been set to the new value.</p>

Modified: index
===================================================================
--- index	2013-03-21 18:22:07 UTC (rev 7762)
+++ index	2013-03-21 18:47:31 UTC (rev 7763)
@@ -4157,6 +4157,11 @@
   user agent must remove all <a href=#space-character title="space character">space characters</a> that are at the
   start or end of the string.</p>
 
+  <p>When a user agent is to <dfn id=strip-and-collapse-whitespace>strip and collapse whitespace</dfn> in a string, it must replace
+  any sequence of one or more consecutive <a href=#space-character title="space character">space characters</a> in
+  that string with a single U+0020 SPACE character, and then <a href=#strip-leading-and-trailing-whitespace>strip leading and trailing
+  whitespace</a> from that string.</p>
+
   <p>When a user agent has to <dfn id=strictly-split-a-string>strictly split a string</dfn> on a particular delimiter character
   <var title="">delimiter</var>, it must use the following algorithm:</p>
 
@@ -8591,10 +8596,8 @@
    the empty string if <a href=#the-title-element-0>the <code>title</code> element</a> is
    null.</li>
 
-   <li><p>Replace any sequence of one or more consecutive <a href=#space-character title="space character">space characters</a> in <var title="">value</var> with a single U+0020 SPACE character.</li>
+   <li><p><a href=#strip-and-collapse-whitespace>Strip and collapse whitespace</a> in <var title="">value</var>.</li>
 
-   <li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from <var title="">value</var>.</li>
-
    <li><p>Return <var title="">value</var>.</li>
 
   </ol><p>On setting, the following algorithm must be run. Mutation events
@@ -50795,14 +50798,11 @@
   element's <a href=#concept-option-index title=concept-option-index>index</a>.</p>
 
   <p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> IDL attribute, on getting, must return
-  the concatenation of <a href=#concept-cd-data title=concept-cd-data>data</a> of all the <code><a href=#text>Text</a></code> node
-  descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>, excluding any that are
-  descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are themselves
-  <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code>
-  elements in the <a href=#svg-namespace>SVG namespace</a>, with <a href=#strip-leading-and-trailing-whitespace title="strip leading and trailing
-  whitespace">leading and trailing whitespace stripped</a>, and with any sequences of two or more
-  <a href=#space-character title="space character">space characters</a> replaced by a single U+0020 SPACE
-  character.</p>
+  the result of <a href=#strip-and-collapse-whitespace title="strip and collapse whitespace">stripping and collapsing
+  whitespace</a> from the concatenation of <a href=#concept-cd-data title=concept-cd-data>data</a> of all the
+  <code><a href=#text>Text</a></code> node descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>,
+  excluding any that are descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are
+  themselves <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code> elements in the <a href=#svg-namespace>SVG namespace</a>.</p>
 
   <p>On setting, the <code title=dom-option-text><a href=#dom-option-text>text</a></code> attribute must act as if the
   <code><a href=#textcontent>textContent</a></code> IDL attribute on the element had been set to the new value.</p>

Modified: source
===================================================================
--- source	2013-03-21 18:22:07 UTC (rev 7762)
+++ source	2013-03-21 18:47:31 UTC (rev 7763)
@@ -3076,6 +3076,11 @@
   user agent must remove all <span title="space character">space characters</span> that are at the
   start or end of the string.</p>
 
+  <p>When a user agent is to <dfn>strip and collapse whitespace</dfn> in a string, it must replace
+  any sequence of one or more consecutive <span title="space character">space characters</span> in
+  that string with a single U+0020 SPACE character, and then <span>strip leading and trailing
+  whitespace</span> from that string.</p>
+
   <p>When a user agent has to <dfn>strictly split a string</dfn> on a particular delimiter character
   <var title="">delimiter</var>, it must use the following algorithm:</p>
 
@@ -8353,13 +8358,8 @@
    the empty string if <span>the <code>title</code> element</span> is
    null.</p></li>
 
-   <li><p>Replace any sequence of one or more consecutive <span
-   title="space character">space characters</span> in <var
-   title="">value</var> with a single U+0020 SPACE character.</p></li>
+   <li><p><span>Strip and collapse whitespace</span> in <var title="">value</var>.</p></li>
 
-   <li><p><span>Strip leading and trailing whitespace</span> from <var
-   title="">value</var>.</p></li>
-
    <li><p>Return <var title="">value</var>.</p></li>
 
   </ol>
@@ -60607,14 +60607,12 @@
   element's <span title="concept-option-index">index</span>.</p>
 
   <p>The <dfn title="dom-option-text"><code>text</code></dfn> IDL attribute, on getting, must return
-  the concatenation of <span title="concept-cd-data">data</span> of all the <code>Text</code> node
-  descendants of the <code>option</code> element, in <span>tree order</span>, excluding any that are
-  descendants of descendants of the <code>option</code> element that are themselves
-  <code>script</code> elements in the <span>HTML namespace</span> or <code title="">script</code>
-  elements in the <span>SVG namespace</span>, with <span title="strip leading and trailing
-  whitespace">leading and trailing whitespace stripped</span>, and with any sequences of two or more
-  <span title="space character">space characters</span> replaced by a single U+0020 SPACE
-  character.</p>
+  the result of <span title="strip and collapse whitespace">stripping and collapsing
+  whitespace</span> from the concatenation of <span title="concept-cd-data">data</span> of all the
+  <code>Text</code> node descendants of the <code>option</code> element, in <span>tree order</span>,
+  excluding any that are descendants of descendants of the <code>option</code> element that are
+  themselves <code>script</code> elements in the <span>HTML namespace</span> or <code
+  title="">script</code> elements in the <span>SVG namespace</span>.</p>
 
   <p>On setting, the <code title="dom-option-text">text</code> attribute must act as if the
   <code>textContent</code> IDL attribute on the element had been set to the new value.</p>




More information about the Commit-Watchers mailing list