[html5] r5740 - [acgiow] (1) Revamp how type=email multiple='' is specced. Fixing http://www.w3. [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jan 5 15:42:20 PST 2011


Author: ianh
Date: 2011-01-05 15:42:19 -0800 (Wed, 05 Jan 2011)
New Revision: 5740

Modified:
   complete.html
   index
   source
Log:
[acgiow] (1) Revamp how type=email multiple='' is specced.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11137

Modified: complete.html
===================================================================
--- complete.html	2011-01-05 00:38:49 UTC (rev 5739)
+++ complete.html	2011-01-05 23:42:19 UTC (rev 5740)
@@ -39953,7 +39953,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=yes> Yes† <!-- E-mail -->
      <td class=no> · <!-- Password -->
      <td class=yes> Yes     <!-- Date and Time -->
 <!-- <td class="yes"> Yes          Date -->
@@ -39977,7 +39977,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40001,7 +40001,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40025,7 +40025,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40049,7 +40049,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40166,8 +40166,13 @@
      <td class=no> · <!-- Reset Button -->
 <!-- <td class="no"> ·      Button -->
 
-  </table><div class=impl>
+  </table><p class=note>† The dagger symbol (†) indicates that
+  the feature only applies when the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is not
+  specified.</p>
 
+
+  <div class=impl>
+
   <p>Some states of the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
   attribute define a <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>.</p>
 
@@ -40797,67 +40802,143 @@
 
   </div>
 
-  <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a control
-  for editing a list of e-mail addresses given in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+  <p>How the <a href=#e-mail-state title=attr-input-type-email>E-mail</a> state
+  operates depends on whether the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is specified
+  or not.</p>
 
-  <div class=impl>
+  <dl class=switch><dt>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute is not specified on the element</dt>
 
-  <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
-  the user agent should allow the user to change the e-mail addresses
-  represented by its <a href=#concept-fe-value title=concept-fe-value>value</a>. If
-  the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
-  specified, then the user agent should allow the user to select or
-  provide multiple addresses; otherwise, the user agent should act in
-  a manner consistent with expecting the user to provide a single
-  e-mail address. User agents may allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that is not a
-  <a href=#valid-e-mail-address-list>valid e-mail address list</a>. User agents should allow the
-  user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the
-  empty string. User agents must not allow users to insert U+000A LINE
-  FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>. User agents may transform the
-  <a href=#concept-fe-value title=concept-fe-value>value</a> for display and editing
-  (e.g. converting punycode in the <a href=#concept-fe-value title=concept-fe-value>value</a> to IDN in the display and vice
-  versa).</p>
+   <dd>
 
-  </div>
+    <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a
+    control for editing an e-mail address given in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
 
-  <p>If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
-  attribute is specified on the element, then the <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if specified, must
-  have a value that is a <a href=#valid-e-mail-address-list>valid e-mail address list</a>;
-  otherwise, the <code title=attr-input-value><a href=#attr-input-value>value</a></code>
-  attribute, if specified, must have a value that is a single
-  <a href=#valid-e-mail-address>valid e-mail address</a>.</p>
+    <div class=impl>
 
-  <div class=impl>
+    <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+    the user agent should allow the user to change the e-mail address
+    represented by its <a href=#concept-fe-value title=concept-fe-value>value</a>.
+    User agents may allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that is not a
+    <a href=#valid-e-mail-address>valid e-mail address</a>. The user agent should act in a
+    manner consistent with expecting the user to provide a single
+    e-mail address. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string. User
+    agents must not allow users to insert U+000A LINE FEED (LF) or
+    U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>. User agents may transform
+    the <a href=#concept-fe-value title=concept-fe-value>value</a> for display and
+    editing (e.g. converting punycode in the <a href=#concept-fe-value title=concept-fe-value>value</a> to IDN in the display and
+    vice versa).</p>
 
-  <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
-  follows</strong>: <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+    </div>
 
-  <p><strong>Constraint validation</strong>: If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is specified
-  on the element, then, while the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
-  <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the element is
-  <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>; otherwise, while the
-  <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
-  single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
-  <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+    <p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+    specified, must have a value that is a single <a href=#valid-e-mail-address>valid e-mail
+    address</a>.</p>
 
-  <p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
-  attribute is specified on the element, then, the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
-  <a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
-  the element's <a href=#concept-fe-value title=concept-fe-value>value</a>. (This is
-  used to define how the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute applies when the
-  <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
-  specified.)</p>
+    <div class=impl>
 
-  </div>
+    <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
+    follows</strong>: <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
 
-  <p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
-  comma-separated tokens</a>, where each token is itself a
-  <a href=#valid-e-mail-address>valid e-mail address</a>. <span class=impl>To obtain the
-  list of tokens from a <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the
-  user agent must <a href=#split-a-string-on-commas title="split a string on commas">split the
-  string on commas</a>.</span></p>
+    <p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+    attribute is removed, the user agent must run the <a href=#value-sanitization-algorithm>value
+    sanitization algorithm</a>.</p>
 
-  <p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the
+    <p><strong>Constraint validation</strong>: While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
+    single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
+    <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+   <dt>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute <em>is</em> specified on the element</dt>
+
+   <dd>
+
+    <div class=impl>
+
+    <p>The element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
+    <a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
+    the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+
+    </div>
+
+    <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a
+    control for adding, removing, and editing the e-mail addresses
+    given in the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>.</p>
+
+    <div class=impl>
+
+    <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+    the user agent should allow the user to add, remove, and edit the
+    e-mail addresses represented by its <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>. User agents may
+    allow the user to set any individual value in the list of <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a> to a string that
+    is not a <a href=#valid-e-mail-address>valid e-mail address</a>, but must not allow
+    users to set any individual value to a string containing U+002C
+    COMMA (,), U+000A LINE FEED (LF), or U+000D CARRIAGE RETURN (CR)
+    characters. User agents should allow the user to remove all the
+    addresses in the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>. User agents may
+    transform the <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> for display and
+    editing (e.g. converting punycode in the <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> to IDN in the
+    display and vice versa).</p>
+
+    <p>Whenever the user changes the element's <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a>, the user agent
+    must run the following steps:</p>
+
+    <ol><li><p>Let <var title="">latest values</var> be a copy of the
+     element's <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a>.</li>
+
+     <!-- It's a copy because /values/ might include leading and
+     trailing spaces that we don't necessarily want to remove from the
+     UI but that we do want to remove before serialising. -->
+
+     <li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from
+     each value in <var title="">latest values</var>.</li>
+
+     <li><p>Let the element's <a href=#concept-fe-value title=concept-fe-value>value</a> be the result of
+     concatenating all the values in <var title="">latest
+     values</var>, separating each value from the next by a single
+     U+002C COMMA character (,), maintaining the list's
+     order.</li>
+
+    </ol></div>
+
+    <p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+    specified, must have a value that is a <a href=#valid-e-mail-address-list>valid e-mail address
+    list</a>.</p>
+
+    <div class=impl>
+
+    <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
+    follows</strong>:</p>
+
+    <ol><li><p><a href=#split-a-string-on-commas title="split a string on commas">Split on
+     commas</a> the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#strip-leading-and-trailing-whitespace>strip leading and
+     trailing whitespace</a> from each resulting token, if any, and
+     let the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> be the (possibly
+     empty) resulting list of (possibly empty) tokens, maintaining the
+     original order.</li>
+
+     <li><p>Let the element's <a href=#concept-fe-value title=concept-fe-value>value</a> be the result of
+     concatenating the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, separating each
+     value from the next by a single U+002C COMMA character (,),
+     maintaining the list's order.</li>
+
+    </ol><p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+    attribute is set, the user agent must run the <a href=#value-sanitization-algorithm>value
+    sanitization algorithm</a>.</p>
+
+    <p><strong>Constraint validation</strong>: While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
+    <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the element is
+    <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the
   ABNF production <code title="">1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )</code>
   where <code title="">atext</code> is defined in RFC 5322 section
   3.2.3, and <code title="">ldh-str</code> is defined in RFC 1034
@@ -40871,6 +40952,13 @@
   space characters, and quoted strings in manners unfamiliar to most
   users) to be of practical use here.</p>
 
+  <p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
+  comma-separated tokens</a>, where each token is itself a
+  <a href=#valid-e-mail-address>valid e-mail address</a>. <span class=impl>To obtain the
+  list of tokens from a <a href=#valid-e-mail-address-list>valid e-mail address list</a>, and
+  implementation must <a href=#split-a-string-on-commas title="split a string on commas">split the
+  string on commas</a>.</span></p>
+
   <div class=bookkeeping>
 
    <p>The following common <code><a href=#the-input-element>input</a></code> element content
@@ -40884,14 +40972,15 @@
    <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>,
    <code title=attr-input-required><a href=#attr-input-required>required</a></code>, and
    <code title=attr-input-size><a href=#attr-input-size>size</a></code> content attributes;
-   <code title=dom-input-list><a href=#dom-input-list>list</a></code>,
-   <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code>,
-   <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
-   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
-   <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-input-list><a href=#dom-input-list>list</a></code> and
+   <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes.</p>
 
+   <p>The following common <code><a href=#the-input-element>input</a></code> element content
+   attributes, IDL attributes, and methods apply to the element when
+   the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
+   not specified:
+   <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> IDL attribute.</p>
+
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
 
@@ -40919,8 +41008,12 @@
    element:
    <code class=no-backref title=dom-input-checked><a href=#dom-input-checked>checked</a></code>,
    <code class=no-backref title=dom-input-files><a href=#dom-input-files>files</a></code>,
+   <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
+   <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
 
@@ -43472,17 +43565,20 @@
   attribute is used to identify an element that lists predefined
   options suggested to the user.</p>
 
-  <p>If present, its value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-datalist-element>datalist</a></code>
-  element in the same document.</p>
+  <p>If present, its value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-datalist-element>datalist</a></code> element in
+  the same document.</p>
 
   <div class=impl>
 
   <p>The <dfn id=concept-input-list title=concept-input-list>suggestions source
   element</dfn> is the first element in the document in <a href=#tree-order>tree
-  order</a> to have an <a href=#concept-id title=concept-id>ID</a> equal to the value of the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, if that element is a
-  <code><a href=#the-datalist-element>datalist</a></code> element. If there is no <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, or if there is no
-  element with that <a href=#concept-id title=concept-id>ID</a>, or if the first element with that <a href=#concept-id title=concept-id>ID</a> is not a
-  <code><a href=#the-datalist-element>datalist</a></code> element, then there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>.</p>
+  order</a> to have an <a href=#concept-id title=concept-id>ID</a> equal to
+  the value of the <code title=attr-input-list><a href=#attr-input-list>list</a></code>
+  attribute, if that element is a <code><a href=#the-datalist-element>datalist</a></code> element. If
+  there is no <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, or
+  if there is no element with that <a href=#concept-id title=concept-id>ID</a>,
+  or if the first element with that <a href=#concept-id title=concept-id>ID</a>
+  is not a <code><a href=#the-datalist-element>datalist</a></code> element, then there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>.</p>
 
   <p>If there is a <a href=#concept-input-list title=concept-input-list>suggestions source
   element</a>, then, when the user agent is allowing the user to
@@ -43490,12 +43586,43 @@
   the suggestions represented by the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> to the
   user in a manner suitable for the type of control used. The user
   agent may use the suggestion's <a href=#concept-option-label title=concept-option-label>label</a> to identify the suggestion
-  if appropriate. If the user selects a suggestion, then the
-  <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to the selected
-  suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if
-  the user had written that value himself.</p>
+  if appropriate.</p>
 
-  <hr><p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
+  <p>How user selections of suggestions are handled depends on whether
+  the element is a control accepting a single value only, or whether
+  it accepts multiple values:</p>
+
+  <dl class=switch><dt>If the element does not have a <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified or
+   if the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute
+   does not apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the <code><a href=#the-input-element>input</a></code>
+    element's <a href=#concept-fe-value title=concept-fe-value>value</a> must be set
+    to the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if the user had
+    written that value himself.</p>
+
+   </dd>
+
+   <dt>If the element <em>does</em> have a <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified,
+   and the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute
+   does apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the user agent must either
+    add a new entry to the <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, whose value is
+    the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, or change an existing
+    entry in the <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> to have the value
+    given by the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if the user had
+    himself added an entry with that value, or edited an existing
+    entry to be that value. Which behavior is to be applied depends on
+    the user interface in a user-agent-defined manner.</p>
+
+   </dd>
+
+  </dl><hr><p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
   not apply, there is no <a href=#concept-input-list title=concept-input-list>suggestions
   source element</a>.</p>
 
@@ -44328,16 +44455,28 @@
   any, or null otherwise.</p>
 
   <p>The <dfn id=dom-input-selectedoption title=dom-input-selectedOption><code>selectedOption</code></dfn>
-  IDL attribute must return the first <code><a href=#the-option-element>option</a></code> element, in
-  <a href=#tree-order>tree order</a>, to be a child of the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> and
-  whose <a href=#concept-option-value title=concept-option-value>value</a> matches the
-  <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a>, if any. If there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>, or if
-  it contains no matching <code><a href=#the-option-element>option</a></code> element, then the <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> attribute
-  must return null.</p>
+  IDL attribute must return the value determined by the following
+  steps:</p>
 
-  </div>
+  <ol><li><p>If there is no <a href=#concept-input-list title=concept-input-list>suggestions
+   source element</a> (e.g. because the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute doesn't apply or is
+   not specified), then return null and abort thee steps.</li>
 
+   <li><p>If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute is specified and applies, then return null and abort
+   these steps. (The <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> IDL
+   attribute doesn't apply.)</li>
 
+   <li><p>Return the first <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree
+   order</a>, to be a child of the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> and
+   whose <a href=#concept-option-value title=concept-option-value>value</a> matches the
+   <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a>, if any. If the <a href=#concept-input-list title=concept-input-list>suggestions source element</a>
+   contains no matching <code><a href=#the-option-element>option</a></code> element, then return null
+   instead.</li>
+
+  </ol></div>
+
+
   <div class=impl>
 
   <h5 id=common-event-behaviors><span class=secno>4.10.7.4 </span>Common event behaviors</h5>

Modified: index
===================================================================
--- index	2011-01-05 00:38:49 UTC (rev 5739)
+++ index	2011-01-05 23:42:19 UTC (rev 5740)
@@ -39935,7 +39935,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=yes> Yes† <!-- E-mail -->
      <td class=no> · <!-- Password -->
      <td class=yes> Yes     <!-- Date and Time -->
 <!-- <td class="yes"> Yes          Date -->
@@ -39959,7 +39959,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -39983,7 +39983,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40007,7 +40007,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40031,7 +40031,7 @@
      <td class=yes> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class=yes> Yes     <!-- URL, Telephone -->
-     <td class=yes> Yes     <!-- E-mail -->
+     <td class=no> · <!-- E-mail -->
      <td class=yes> Yes     <!-- Password -->
      <td class=no> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -40148,8 +40148,13 @@
      <td class=no> · <!-- Reset Button -->
 <!-- <td class="no"> ·      Button -->
 
-  </table><div class=impl>
+  </table><p class=note>† The dagger symbol (†) indicates that
+  the feature only applies when the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is not
+  specified.</p>
 
+
+  <div class=impl>
+
   <p>Some states of the <code title=attr-input-type><a href=#attr-input-type>type</a></code>
   attribute define a <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>.</p>
 
@@ -40779,67 +40784,143 @@
 
   </div>
 
-  <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a control
-  for editing a list of e-mail addresses given in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+  <p>How the <a href=#e-mail-state title=attr-input-type-email>E-mail</a> state
+  operates depends on whether the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is specified
+  or not.</p>
 
-  <div class=impl>
+  <dl class=switch><dt>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute is not specified on the element</dt>
 
-  <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
-  the user agent should allow the user to change the e-mail addresses
-  represented by its <a href=#concept-fe-value title=concept-fe-value>value</a>. If
-  the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
-  specified, then the user agent should allow the user to select or
-  provide multiple addresses; otherwise, the user agent should act in
-  a manner consistent with expecting the user to provide a single
-  e-mail address. User agents may allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that is not a
-  <a href=#valid-e-mail-address-list>valid e-mail address list</a>. User agents should allow the
-  user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the
-  empty string. User agents must not allow users to insert U+000A LINE
-  FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>. User agents may transform the
-  <a href=#concept-fe-value title=concept-fe-value>value</a> for display and editing
-  (e.g. converting punycode in the <a href=#concept-fe-value title=concept-fe-value>value</a> to IDN in the display and vice
-  versa).</p>
+   <dd>
 
-  </div>
+    <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a
+    control for editing an e-mail address given in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
 
-  <p>If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
-  attribute is specified on the element, then the <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if specified, must
-  have a value that is a <a href=#valid-e-mail-address-list>valid e-mail address list</a>;
-  otherwise, the <code title=attr-input-value><a href=#attr-input-value>value</a></code>
-  attribute, if specified, must have a value that is a single
-  <a href=#valid-e-mail-address>valid e-mail address</a>.</p>
+    <div class=impl>
 
-  <div class=impl>
+    <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+    the user agent should allow the user to change the e-mail address
+    represented by its <a href=#concept-fe-value title=concept-fe-value>value</a>.
+    User agents may allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a string that is not a
+    <a href=#valid-e-mail-address>valid e-mail address</a>. The user agent should act in a
+    manner consistent with expecting the user to provide a single
+    e-mail address. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string. User
+    agents must not allow users to insert U+000A LINE FEED (LF) or
+    U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value title=concept-fe-value>value</a>. User agents may transform
+    the <a href=#concept-fe-value title=concept-fe-value>value</a> for display and
+    editing (e.g. converting punycode in the <a href=#concept-fe-value title=concept-fe-value>value</a> to IDN in the display and
+    vice versa).</p>
 
-  <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
-  follows</strong>: <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+    </div>
 
-  <p><strong>Constraint validation</strong>: If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is specified
-  on the element, then, while the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
-  <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the element is
-  <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>; otherwise, while the
-  <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
-  single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
-  <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+    <p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+    specified, must have a value that is a single <a href=#valid-e-mail-address>valid e-mail
+    address</a>.</p>
 
-  <p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
-  attribute is specified on the element, then, the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
-  <a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
-  the element's <a href=#concept-fe-value title=concept-fe-value>value</a>. (This is
-  used to define how the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> attribute applies when the
-  <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
-  specified.)</p>
+    <div class=impl>
 
-  </div>
+    <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
+    follows</strong>: <a href=#strip-line-breaks>Strip line breaks</a> from the <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
 
-  <p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
-  comma-separated tokens</a>, where each token is itself a
-  <a href=#valid-e-mail-address>valid e-mail address</a>. <span class=impl>To obtain the
-  list of tokens from a <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the
-  user agent must <a href=#split-a-string-on-commas title="split a string on commas">split the
-  string on commas</a>.</span></p>
+    <p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+    attribute is removed, the user agent must run the <a href=#value-sanitization-algorithm>value
+    sanitization algorithm</a>.</p>
 
-  <p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the
+    <p><strong>Constraint validation</strong>: While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
+    single <a href=#valid-e-mail-address>valid e-mail address</a>, the element is
+    <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+   <dt>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute <em>is</em> specified on the element</dt>
+
+   <dd>
+
+    <div class=impl>
+
+    <p>The element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> are the result of
+    <a href=#split-a-string-on-commas title="split a string on commas">splitting on commas</a>
+    the element's <a href=#concept-fe-value title=concept-fe-value>value</a>.</p>
+
+    </div>
+
+    <p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a
+    control for adding, removing, and editing the e-mail addresses
+    given in the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>.</p>
+
+    <div class=impl>
+
+    <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+    the user agent should allow the user to add, remove, and edit the
+    e-mail addresses represented by its <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>. User agents may
+    allow the user to set any individual value in the list of <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a> to a string that
+    is not a <a href=#valid-e-mail-address>valid e-mail address</a>, but must not allow
+    users to set any individual value to a string containing U+002C
+    COMMA (,), U+000A LINE FEED (LF), or U+000D CARRIAGE RETURN (CR)
+    characters. User agents should allow the user to remove all the
+    addresses in the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>. User agents may
+    transform the <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> for display and
+    editing (e.g. converting punycode in the <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> to IDN in the
+    display and vice versa).</p>
+
+    <p>Whenever the user changes the element's <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a>, the user agent
+    must run the following steps:</p>
+
+    <ol><li><p>Let <var title="">latest values</var> be a copy of the
+     element's <a href=#concept-fe-value title=concept-fe-value>value<em>s</em></a>.</li>
+
+     <!-- It's a copy because /values/ might include leading and
+     trailing spaces that we don't necessarily want to remove from the
+     UI but that we do want to remove before serialising. -->
+
+     <li><p><a href=#strip-leading-and-trailing-whitespace>Strip leading and trailing whitespace</a> from
+     each value in <var title="">latest values</var>.</li>
+
+     <li><p>Let the element's <a href=#concept-fe-value title=concept-fe-value>value</a> be the result of
+     concatenating all the values in <var title="">latest
+     values</var>, separating each value from the next by a single
+     U+002C COMMA character (,), maintaining the list's
+     order.</li>
+
+    </ol></div>
+
+    <p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
+    specified, must have a value that is a <a href=#valid-e-mail-address-list>valid e-mail address
+    list</a>.</p>
+
+    <div class=impl>
+
+    <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
+    follows</strong>:</p>
+
+    <ol><li><p><a href=#split-a-string-on-commas title="split a string on commas">Split on
+     commas</a> the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#strip-leading-and-trailing-whitespace>strip leading and
+     trailing whitespace</a> from each resulting token, if any, and
+     let the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> be the (possibly
+     empty) resulting list of (possibly empty) tokens, maintaining the
+     original order.</li>
+
+     <li><p>Let the element's <a href=#concept-fe-value title=concept-fe-value>value</a> be the result of
+     concatenating the element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, separating each
+     value from the next by a single U+002C COMMA character (,),
+     maintaining the list's order.</li>
+
+    </ol><p>When the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+    attribute is set, the user agent must run the <a href=#value-sanitization-algorithm>value
+    sanitization algorithm</a>.</p>
+
+    <p><strong>Constraint validation</strong>: While the <a href=#concept-fe-value title=concept-fe-value>value</a> of the element is not a
+    <a href=#valid-e-mail-address-list>valid e-mail address list</a>, the element is
+    <a href=#suffering-from-a-type-mismatch>suffering from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+  </dl><p>A <dfn id=valid-e-mail-address>valid e-mail address</dfn> is a string that matches the
   ABNF production <code title="">1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )</code>
   where <code title="">atext</code> is defined in RFC 5322 section
   3.2.3, and <code title="">ldh-str</code> is defined in RFC 1034
@@ -40853,6 +40934,13 @@
   space characters, and quoted strings in manners unfamiliar to most
   users) to be of practical use here.</p>
 
+  <p>A <dfn id=valid-e-mail-address-list>valid e-mail address list</dfn> is a <a href=#set-of-comma-separated-tokens>set of
+  comma-separated tokens</a>, where each token is itself a
+  <a href=#valid-e-mail-address>valid e-mail address</a>. <span class=impl>To obtain the
+  list of tokens from a <a href=#valid-e-mail-address-list>valid e-mail address list</a>, and
+  implementation must <a href=#split-a-string-on-commas title="split a string on commas">split the
+  string on commas</a>.</span></p>
+
   <div class=bookkeeping>
 
    <p>The following common <code><a href=#the-input-element>input</a></code> element content
@@ -40866,14 +40954,15 @@
    <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>,
    <code title=attr-input-required><a href=#attr-input-required>required</a></code>, and
    <code title=attr-input-size><a href=#attr-input-size>size</a></code> content attributes;
-   <code title=dom-input-list><a href=#dom-input-list>list</a></code>,
-   <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code>,
-   <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
-   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
-   <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-input-list><a href=#dom-input-list>list</a></code> and
+   <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes.</p>
 
+   <p>The following common <code><a href=#the-input-element>input</a></code> element content
+   attributes, IDL attributes, and methods apply to the element when
+   the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute is
+   not specified:
+   <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> IDL attribute.</p>
+
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
 
@@ -40901,8 +40990,12 @@
    element:
    <code class=no-backref title=dom-input-checked><a href=#dom-input-checked>checked</a></code>,
    <code class=no-backref title=dom-input-files><a href=#dom-input-files>files</a></code>,
+   <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
+   <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
 
@@ -43454,17 +43547,20 @@
   attribute is used to identify an element that lists predefined
   options suggested to the user.</p>
 
-  <p>If present, its value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-datalist-element>datalist</a></code>
-  element in the same document.</p>
+  <p>If present, its value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-datalist-element>datalist</a></code> element in
+  the same document.</p>
 
   <div class=impl>
 
   <p>The <dfn id=concept-input-list title=concept-input-list>suggestions source
   element</dfn> is the first element in the document in <a href=#tree-order>tree
-  order</a> to have an <a href=#concept-id title=concept-id>ID</a> equal to the value of the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, if that element is a
-  <code><a href=#the-datalist-element>datalist</a></code> element. If there is no <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, or if there is no
-  element with that <a href=#concept-id title=concept-id>ID</a>, or if the first element with that <a href=#concept-id title=concept-id>ID</a> is not a
-  <code><a href=#the-datalist-element>datalist</a></code> element, then there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>.</p>
+  order</a> to have an <a href=#concept-id title=concept-id>ID</a> equal to
+  the value of the <code title=attr-input-list><a href=#attr-input-list>list</a></code>
+  attribute, if that element is a <code><a href=#the-datalist-element>datalist</a></code> element. If
+  there is no <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute, or
+  if there is no element with that <a href=#concept-id title=concept-id>ID</a>,
+  or if the first element with that <a href=#concept-id title=concept-id>ID</a>
+  is not a <code><a href=#the-datalist-element>datalist</a></code> element, then there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>.</p>
 
   <p>If there is a <a href=#concept-input-list title=concept-input-list>suggestions source
   element</a>, then, when the user agent is allowing the user to
@@ -43472,12 +43568,43 @@
   the suggestions represented by the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> to the
   user in a manner suitable for the type of control used. The user
   agent may use the suggestion's <a href=#concept-option-label title=concept-option-label>label</a> to identify the suggestion
-  if appropriate. If the user selects a suggestion, then the
-  <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to the selected
-  suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if
-  the user had written that value himself.</p>
+  if appropriate.</p>
 
-  <hr><p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
+  <p>How user selections of suggestions are handled depends on whether
+  the element is a control accepting a single value only, or whether
+  it accepts multiple values:</p>
+
+  <dl class=switch><dt>If the element does not have a <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified or
+   if the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute
+   does not apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the <code><a href=#the-input-element>input</a></code>
+    element's <a href=#concept-fe-value title=concept-fe-value>value</a> must be set
+    to the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if the user had
+    written that value himself.</p>
+
+   </dd>
+
+   <dt>If the element <em>does</em> have a <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute specified,
+   and the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute
+   does apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the user agent must either
+    add a new entry to the <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a>, whose value is
+    the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, or change an existing
+    entry in the <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-values title=concept-fe-values>value<em>s</em></a> to have the value
+    given by the selected suggestion's <a href=#concept-option-value title=concept-option-value>value</a>, as if the user had
+    himself added an entry with that value, or edited an existing
+    entry to be that value. Which behavior is to be applied depends on
+    the user interface in a user-agent-defined manner.</p>
+
+   </dd>
+
+  </dl><hr><p>If the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute does
   not apply, there is no <a href=#concept-input-list title=concept-input-list>suggestions
   source element</a>.</p>
 
@@ -44310,16 +44437,28 @@
   any, or null otherwise.</p>
 
   <p>The <dfn id=dom-input-selectedoption title=dom-input-selectedOption><code>selectedOption</code></dfn>
-  IDL attribute must return the first <code><a href=#the-option-element>option</a></code> element, in
-  <a href=#tree-order>tree order</a>, to be a child of the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> and
-  whose <a href=#concept-option-value title=concept-option-value>value</a> matches the
-  <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a>, if any. If there is no <a href=#concept-input-list title=concept-input-list>suggestions source element</a>, or if
-  it contains no matching <code><a href=#the-option-element>option</a></code> element, then the <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> attribute
-  must return null.</p>
+  IDL attribute must return the value determined by the following
+  steps:</p>
 
-  </div>
+  <ol><li><p>If there is no <a href=#concept-input-list title=concept-input-list>suggestions
+   source element</a> (e.g. because the <code title=attr-input-list><a href=#attr-input-list>list</a></code> attribute doesn't apply or is
+   not specified), then return null and abort thee steps.</li>
 
+   <li><p>If the <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>
+   attribute is specified and applies, then return null and abort
+   these steps. (The <code title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code> IDL
+   attribute doesn't apply.)</li>
 
+   <li><p>Return the first <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree
+   order</a>, to be a child of the <a href=#concept-input-list title=concept-input-list>suggestions source element</a> and
+   whose <a href=#concept-option-value title=concept-option-value>value</a> matches the
+   <code><a href=#the-input-element>input</a></code> element's <a href=#concept-fe-value title=concept-fe-value>value</a>, if any. If the <a href=#concept-input-list title=concept-input-list>suggestions source element</a>
+   contains no matching <code><a href=#the-option-element>option</a></code> element, then return null
+   instead.</li>
+
+  </ol></div>
+
+
   <div class=impl>
 
   <h5 id=common-event-behaviors><span class=secno>4.10.7.4 </span>Common event behaviors</h5>

Modified: source
===================================================================
--- source	2011-01-05 00:38:49 UTC (rev 5739)
+++ source	2011-01-05 23:42:19 UTC (rev 5740)
@@ -44496,7 +44496,7 @@
      <td class="yes"> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class="yes"> Yes     <!-- URL, Telephone -->
-     <td class="yes"> Yes     <!-- E-mail -->
+     <td class="yes"> Yes† <!-- E-mail -->
      <td class="no"> · <!-- Password -->
      <td class="yes"> Yes     <!-- Date and Time -->
 <!-- <td class="yes"> Yes          Date -->
@@ -44521,7 +44521,7 @@
      <td class="yes"> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class="yes"> Yes     <!-- URL, Telephone -->
-     <td class="yes"> Yes     <!-- E-mail -->
+     <td class="no"> · <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -44546,7 +44546,7 @@
      <td class="yes"> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class="yes"> Yes     <!-- URL, Telephone -->
-     <td class="yes"> Yes     <!-- E-mail -->
+     <td class="no"> · <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -44571,7 +44571,7 @@
      <td class="yes"> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class="yes"> Yes     <!-- URL, Telephone -->
-     <td class="yes"> Yes     <!-- E-mail -->
+     <td class="no"> · <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -44596,7 +44596,7 @@
      <td class="yes"> Yes     <!-- Text -->
 <!-- <td class="yes"> Yes          Search -->
      <td class="yes"> Yes     <!-- URL, Telephone -->
-     <td class="yes"> Yes     <!-- E-mail -->
+     <td class="no"> · <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> · <!-- Date and Time -->
 <!-- <td class="no"> ·      Date -->
@@ -44721,6 +44721,12 @@
 
   </table>
 
+  <p class="note">† The dagger symbol (†) indicates that
+  the feature only applies when the <code
+  title="attr-input-multiple">multiple</code> attribute is not
+  specified.</p>
+
+
   <div class="impl">
 
   <p>Some states of the <code title="attr-input-type">type</code>
@@ -45491,76 +45497,177 @@
 
   </div>
 
-  <p>The <code>input</code> element <span>represents</span> a control
-  for editing a list of e-mail addresses given in the element's <span
-  title="concept-fe-value">value</span>.</p>
+  <p>How the <span title="attr-input-type-email">E-mail</span> state
+  operates depends on whether the <code
+  title="attr-input-multiple">multiple</code> attribute is specified
+  or not.</p>
 
-  <div class="impl">
+  <dl class="switch">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
-  the user agent should allow the user to change the e-mail addresses
-  represented by its <span title="concept-fe-value">value</span>. If
-  the <code title="attr-input-multiple">multiple</code> attribute is
-  specified, then the user agent should allow the user to select or
-  provide multiple addresses; otherwise, the user agent should act in
-  a manner consistent with expecting the user to provide a single
-  e-mail address. User agents may allow the user to set the <span
-  title="concept-fe-value">value</span> to a string that is not a
-  <span>valid e-mail address list</span>. User agents should allow the
-  user to set the <span title="concept-fe-value">value</span> to the
-  empty string. User agents must not allow users to insert U+000A LINE
-  FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span
-  title="concept-fe-value">value</span>. User agents may transform the
-  <span title="concept-fe-value">value</span> for display and editing
-  (e.g. converting punycode in the <span
-  title="concept-fe-value">value</span> to IDN in the display and vice
-  versa).</p>
+   <dt>When the <code title="attr-input-multiple">multiple</code>
+   attribute is not specified on the element</dt>
 
-  </div>
+   <dd>
 
-  <p>If the <code title="attr-input-multiple">multiple</code>
-  attribute is specified on the element, then the <code
-  title="attr-input-value">value</code> attribute, if specified, must
-  have a value that is a <span>valid e-mail address list</span>;
-  otherwise, the <code title="attr-input-value">value</code>
-  attribute, if specified, must have a value that is a single
-  <span>valid e-mail address</span>.</p>
+    <p>The <code>input</code> element <span>represents</span> a
+    control for editing an e-mail address given in the element's <span
+    title="concept-fe-value">value</span>.</p>
 
-  <div class="impl">
+    <div class="impl">
 
-  <p><strong>The <span>value sanitization algorithm</span> is as
-  follows</strong>: <span>Strip line breaks</span> from the <span
-  title="concept-fe-value">value</span>.</p>
+    <p>If the element is <i title="concept-input-mutable">mutable</i>,
+    the user agent should allow the user to change the e-mail address
+    represented by its <span title="concept-fe-value">value</span>.
+    User agents may allow the user to set the <span
+    title="concept-fe-value">value</span> to a string that is not a
+    <span>valid e-mail address</span>. The user agent should act in a
+    manner consistent with expecting the user to provide a single
+    e-mail address. User agents should allow the user to set the <span
+    title="concept-fe-value">value</span> to the empty string. User
+    agents must not allow users to insert U+000A LINE FEED (LF) or
+    U+000D CARRIAGE RETURN (CR) characters into the <span
+    title="concept-fe-value">value</span>. User agents may transform
+    the <span title="concept-fe-value">value</span> for display and
+    editing (e.g. converting punycode in the <span
+    title="concept-fe-value">value</span> to IDN in the display and
+    vice versa).</p>
 
-  <p><strong>Constraint validation</strong>: If the <code
-  title="attr-input-multiple">multiple</code> attribute is specified
-  on the element, then, while the <span
-  title="concept-fe-value">value</span> of the element is not a
-  <span>valid e-mail address list</span>, the element is
-  <span>suffering from a type mismatch</span>; otherwise, while the
-  <span title="concept-fe-value">value</span> of the element is not a
-  single <span>valid e-mail address</span>, the element is
-  <span>suffering from a type mismatch</span>.</p>
+    </div>
 
-  <p>When the <code title="attr-input-multiple">multiple</code>
-  attribute is specified on the element, then, the element's <span
-  title="concept-fe-values">value<em>s</em></span> are the result of
-  <span title="split a string on commas">splitting on commas</span>
-  the element's <span title="concept-fe-value">value</span>. (This is
-  used to define how the <code
-  title="attr-input-pattern">pattern</code> attribute applies when the
-  <code title="attr-input-multiple">multiple</code> attribute is
-  specified.)</p>
+    <p>The <code title="attr-input-value">value</code> attribute, if
+    specified, must have a value that is a single <span>valid e-mail
+    address</span>.</p>
 
-  </div>
+    <div class="impl">
 
-  <p>A <dfn>valid e-mail address list</dfn> is a <span>set of
-  comma-separated tokens</span>, where each token is itself a
-  <span>valid e-mail address</span>. <span class="impl">To obtain the
-  list of tokens from a <span>valid e-mail address list</span>, the
-  user agent must <span title="split a string on commas">split the
-  string on commas</span>.</span></p>
+    <p><strong>The <span>value sanitization algorithm</span> is as
+    follows</strong>: <span>Strip line breaks</span> from the <span
+    title="concept-fe-value">value</span>.</p>
 
+    <p>When the <code title="attr-input-multiple">multiple</code>
+    attribute is removed, the user agent must run the <span>value
+    sanitization algorithm</span>.</p>
+
+    <p><strong>Constraint validation</strong>: While the <span
+    title="concept-fe-value">value</span> of the element is not a
+    single <span>valid e-mail address</span>, the element is
+    <span>suffering from a type mismatch</span>.</p>
+
+    </div>
+
+   </dd>
+
+   <dt>When the <code title="attr-input-multiple">multiple</code>
+   attribute <em>is</em> specified on the element</dt>
+
+   <dd>
+
+    <div class="impl">
+
+    <p>The element's <span
+    title="concept-fe-values">value<em>s</em></span> are the result of
+    <span title="split a string on commas">splitting on commas</span>
+    the element's <span title="concept-fe-value">value</span>.</p>
+
+    </div>
+
+    <p>The <code>input</code> element <span>represents</span> a
+    control for adding, removing, and editing the e-mail addresses
+    given in the element's <span
+    title="concept-fe-values">value<em>s</em></span>.</p>
+
+    <div class="impl">
+
+    <p>If the element is <i title="concept-input-mutable">mutable</i>,
+    the user agent should allow the user to add, remove, and edit the
+    e-mail addresses represented by its <span
+    title="concept-fe-values">value<em>s</em></span>. User agents may
+    allow the user to set any individual value in the list of <span
+    title="concept-fe-value">value<em>s</em></span> to a string that
+    is not a <span>valid e-mail address</span>, but must not allow
+    users to set any individual value to a string containing U+002C
+    COMMA (,), U+000A LINE FEED (LF), or U+000D CARRIAGE RETURN (CR)
+    characters. User agents should allow the user to remove all the
+    addresses in the element's <span
+    title="concept-fe-values">value<em>s</em></span>. User agents may
+    transform the <span
+    title="concept-fe-values">value<em>s</em></span> for display and
+    editing (e.g. converting punycode in the <span
+    title="concept-fe-values">value<em>s</em></span> to IDN in the
+    display and vice versa).</p>
+
+    <p>Whenever the user changes the element's <span
+    title="concept-fe-value">value<em>s</em></span>, the user agent
+    must run the following steps:</p>
+
+    <ol>
+
+     <li><p>Let <var title="">latest values</var> be a copy of the
+     element's <span
+     title="concept-fe-value">value<em>s</em></span>.</p></li>
+
+     <!-- It's a copy because /values/ might include leading and
+     trailing spaces that we don't necessarily want to remove from the
+     UI but that we do want to remove before serialising. -->
+
+     <li><p><span>Strip leading and trailing whitespace</span> from
+     each value in <var title="">latest values</var>.</p></li>
+
+     <li><p>Let the element's <span
+     title="concept-fe-value">value</span> be the result of
+     concatenating all the values in <var title="">latest
+     values</var>, separating each value from the next by a single
+     U+002C COMMA character (,), maintaining the list's
+     order.</p></li>
+
+    </ol>
+
+    </div>
+
+    <p>The <code title="attr-input-value">value</code> attribute, if
+    specified, must have a value that is a <span>valid e-mail address
+    list</span>.</p>
+
+    <div class="impl">
+
+    <p><strong>The <span>value sanitization algorithm</span> is as
+    follows</strong>:</p>
+
+    <ol>
+
+     <li><p><span title="split a string on commas">Split on
+     commas</span> the element's <span
+     title="concept-fe-value">value</span>, <span>strip leading and
+     trailing whitespace</span> from each resulting token, if any, and
+     let the element's <span
+     title="concept-fe-values">value<em>s</em></span> be the (possibly
+     empty) resulting list of (possibly empty) tokens, maintaining the
+     original order.</p></li>
+
+     <li><p>Let the element's <span
+     title="concept-fe-value">value</span> be the result of
+     concatenating the element's <span
+     title="concept-fe-values">value<em>s</em></span>, separating each
+     value from the next by a single U+002C COMMA character (,),
+     maintaining the list's order.</p></li>
+
+    </ol>
+
+    <p>When the <code title="attr-input-multiple">multiple</code>
+    attribute is set, the user agent must run the <span>value
+    sanitization algorithm</span>.</p>
+
+    <p><strong>Constraint validation</strong>: While the <span
+    title="concept-fe-value">value</span> of the element is not a
+    <span>valid e-mail address list</span>, the element is
+    <span>suffering from a type mismatch</span>.</p>
+
+    </div>
+
+   </dd>
+
+  </dl>
+
   <p>A <dfn>valid e-mail address</dfn> is a string that matches the
   ABNF production <code
   title="">1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )</code>
@@ -45578,6 +45685,13 @@
   space characters, and quoted strings in manners unfamiliar to most
   users) to be of practical use here.</p>
 
+  <p>A <dfn>valid e-mail address list</dfn> is a <span>set of
+  comma-separated tokens</span>, where each token is itself a
+  <span>valid e-mail address</span>. <span class="impl">To obtain the
+  list of tokens from a <span>valid e-mail address list</span>, and
+  implementation must <span title="split a string on commas">split the
+  string on commas</span>.</span></p>
+
   <div class="bookkeeping">
 
    <p>The following common <code>input</code> element content
@@ -45591,14 +45705,15 @@
    <code title="attr-input-readonly">readonly</code>,
    <code title="attr-input-required">required</code>, and
    <code title="attr-input-size">size</code> content attributes;
-   <code title="dom-input-list">list</code>,
-   <code title="dom-input-selectedOption">selectedOption</code>,
-   <code title="dom-textarea/input-selectionStart">selectionStart</code>,
-   <code title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
-   <code title="dom-input-value">value</code> IDL attributes;
-   <code title="dom-textarea/input-select">select()</code> and
-   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
+   <code title="dom-input-list">list</code> and
+   <code title="dom-input-value">value</code> IDL attributes.</p>
 
+   <p>The following common <code>input</code> element content
+   attributes, IDL attributes, and methods apply to the element when
+   the <code title="attr-input-multiple">multiple</code> attribute is
+   not specified:
+   <code title="dom-input-selectedOption">selectedOption</code> IDL attribute.</p>
+
    <p>The <code title="dom-input-value">value</code> IDL attribute is
    in mode <span title="dom-input-value-value">value</span>.</p>
 
@@ -45627,8 +45742,12 @@
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
    <code class="no-backref" title="dom-input-files">files</code>,
+   <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
+   <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
 
@@ -48521,19 +48640,21 @@
   attribute is used to identify an element that lists predefined
   options suggested to the user.</p>
 
-  <p>If present, its value must be the <span title="concept-id">ID</span> of a <code>datalist</code>
-  element in the same document.</p>
+  <p>If present, its value must be the <span
+  title="concept-id">ID</span> of a <code>datalist</code> element in
+  the same document.</p>
 
   <div class="impl">
 
   <p>The <dfn title="concept-input-list">suggestions source
   element</dfn> is the first element in the document in <span>tree
-  order</span> to have an <span title="concept-id">ID</span> equal to the value of the <code
-  title="attr-input-list">list</code> attribute, if that element is a
-  <code>datalist</code> element. If there is no <code
-  title="attr-input-list">list</code> attribute, or if there is no
-  element with that <span title="concept-id">ID</span>, or if the first element with that <span title="concept-id">ID</span> is not a
-  <code>datalist</code> element, then there is no <span
+  order</span> to have an <span title="concept-id">ID</span> equal to
+  the value of the <code title="attr-input-list">list</code>
+  attribute, if that element is a <code>datalist</code> element. If
+  there is no <code title="attr-input-list">list</code> attribute, or
+  if there is no element with that <span title="concept-id">ID</span>,
+  or if the first element with that <span title="concept-id">ID</span>
+  is not a <code>datalist</code> element, then there is no <span
   title="concept-input-list">suggestions source element</span>.</p>
 
   <p>If there is a <span title="concept-input-list">suggestions source
@@ -48545,12 +48666,53 @@
   user in a manner suitable for the type of control used. The user
   agent may use the suggestion's <span
   title="concept-option-label">label</span> to identify the suggestion
-  if appropriate. If the user selects a suggestion, then the
-  <code>input</code> element's <span
-  title="concept-fe-value">value</span> must be set to the selected
-  suggestion's <span title="concept-option-value">value</span>, as if
-  the user had written that value himself.</p>
+  if appropriate.</p>
 
+  <p>How user selections of suggestions are handled depends on whether
+  the element is a control accepting a single value only, or whether
+  it accepts multiple values:</p>
+
+  <dl class="switch">
+
+   <dt>If the element does not have a <code
+   title="attr-input-multiple">multiple</code> attribute specified or
+   if the <code title="attr-input-multiple">multiple</code> attribute
+   does not apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the <code>input</code>
+    element's <span title="concept-fe-value">value</span> must be set
+    to the selected suggestion's <span
+    title="concept-option-value">value</span>, as if the user had
+    written that value himself.</p>
+
+   </dd>
+
+   <dt>If the element <em>does</em> have a <code
+   title="attr-input-multiple">multiple</code> attribute specified,
+   and the <code title="attr-input-multiple">multiple</code> attribute
+   does apply</dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the user agent must either
+    add a new entry to the <code>input</code> element's <span
+    title="concept-fe-values">value<em>s</em></span>, whose value is
+    the selected suggestion's <span
+    title="concept-option-value">value</span>, or change an existing
+    entry in the <code>input</code> element's <span
+    title="concept-fe-values">value<em>s</em></span> to have the value
+    given by the selected suggestion's <span
+    title="concept-option-value">value</span>, as if the user had
+    himself added an entry with that value, or edited an existing
+    entry to be that value. Which behavior is to be applied depends on
+    the user interface in a user-agent-defined manner.</p>
+
+   </dd>
+
+  </dl>
+
   <hr>
 
   <p>If the <code title="attr-input-list">list</code> attribute does
@@ -49545,17 +49707,34 @@
 
   <p>The <dfn
   title="dom-input-selectedOption"><code>selectedOption</code></dfn>
-  IDL attribute must return the first <code>option</code> element, in
-  <span>tree order</span>, to be a child of the <span
-  title="concept-input-list">suggestions source element</span> and
-  whose <span title="concept-option-value">value</span> matches the
-  <code>input</code> element's <span
-  title="concept-fe-value">value</span>, if any. If there is no <span
-  title="concept-input-list">suggestions source element</span>, or if
-  it contains no matching <code>option</code> element, then the <code
-  title="dom-input-selectedOption">selectedOption</code> attribute
-  must return null.</p>
+  IDL attribute must return the value determined by the following
+  steps:</p>
 
+  <ol>
+
+   <li><p>If there is no <span title="concept-input-list">suggestions
+   source element</span> (e.g. because the <code
+   title="attr-input-list">list</code> attribute doesn't apply or is
+   not specified), then return null and abort thee steps.</p></li>
+
+   <li><p>If the <code title="attr-input-multiple">multiple</code>
+   attribute is specified and applies, then return null and abort
+   these steps. (The <code
+   title="dom-input-selectedOption">selectedOption</code> IDL
+   attribute doesn't apply.)</p></li>
+
+   <li><p>Return the first <code>option</code> element, in <span>tree
+   order</span>, to be a child of the <span
+   title="concept-input-list">suggestions source element</span> and
+   whose <span title="concept-option-value">value</span> matches the
+   <code>input</code> element's <span
+   title="concept-fe-value">value</span>, if any. If the <span
+   title="concept-input-list">suggestions source element</span>
+   contains no matching <code>option</code> element, then return null
+   instead.</p></li>
+
+  </ol>
+
   </div>
 
 




More information about the Commit-Watchers mailing list