hixie: Revamp how type=email multiple='' is specced. (whatwg r5740)

hixie: Revamp how type=email multiple='' is specced. (whatwg r5740)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4602&r2=1.4603&f=h
http://html5.org/tools/web-apps-tracker?from=5739&to=5740

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4602
retrieving revision 1.4603
diff -u -d -r1.4602 -r1.4603
--- Overview.html 5 Jan 2011 00:38:54 -0000 1.4602
+++ Overview.html 5 Jan 2011 23:42:26 -0000 1.4603
@@ -30927,7 +30927,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&dagger; <!-- E-mail -->
      <td class="no"> &middot; <!-- Password -->
      <td class="yes"> Yes     <!-- Date and Time -->
 <!-- <td class="yes"> Yes          Date -->
@@ -30951,7 +30951,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"> &middot; <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> &middot; <!-- Date and Time -->
 <!-- <td class="no"> &middot;      Date -->
@@ -30975,7 +30975,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"> &middot; <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> &middot; <!-- Date and Time -->
 <!-- <td class="no"> &middot;      Date -->
@@ -30999,7 +30999,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"> &middot; <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> &middot; <!-- Date and Time -->
 <!-- <td class="no"> &middot;      Date -->
@@ -31023,7 +31023,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"> &middot; <!-- E-mail -->
      <td class="yes"> Yes     <!-- Password -->
      <td class="no"> &middot; <!-- Date and Time -->
 <!-- <td class="no"> &middot;      Date -->
@@ -31140,7 +31140,9 @@
      <td class="no"> &middot; <!-- Reset Button -->
 <!-- <td class="no"> &middot;      Button -->
 
-  </table><div class="impl">
+  </table><p class="note">&dagger; The dagger symbol (&dagger;) 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.<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>
@@ -31679,57 +31681,141 @@
   <p>When an <code><a href="#the-input-element">input</a></code> element's <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute is in the <a href="#e-mail-state" title="attr-input-type-email">E-mail</a> state, the rules in this
   section apply.</p>
 
-  </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>.<div class="impl">
+  </div><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.<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>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>.<div class="impl">
+    <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><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 class="impl">
 
-  <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>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>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>
 
-  </div><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>A <dfn id="valid-e-mail-address">valid e-mail address</dfn> is a string that matches the
+    <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>
+
+    <div class="impl">
+
+    <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>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><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*(&nbsp;atext&nbsp;/&nbsp;"."&nbsp;)&nbsp;"@"&nbsp;ldh-str&nbsp;1*(&nbsp;"."&nbsp;ldh-str&nbsp;)</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
@@ -31739,7 +31825,12 @@
   simultaneously too strict (before the "@" character), too vague
   (after the "@" character), and too lax (allowing comments, white
   space characters, and quoted strings in manners unfamiliar to most
-  users) to be of practical use here.<div class="bookkeeping">
+  users) to be of practical use here.<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><div class="bookkeeping">
 
    <p>The following common <code><a href="#the-input-element">input</a></code> element content
    attributes, IDL attributes, and methods apply to the element:
@@ -31752,13 +31843,14 @@
    <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>
@@ -31787,8 +31879,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>
 
@@ -33971,15 +34067,18 @@
 
   </div><h6 id="the-list-attribute"><span class="secno">4.10.7.2.3 </span>The <code title="attr-input-list"><a href="#attr-input-list">list</a></code> attribute</h6><p>The <dfn id="attr-input-list" title="attr-input-list"><code>list</code></dfn>
   attribute is used to identify an element that lists predefined
-  options suggested to the user.<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.<div class="impl">
+  options suggested to the user.<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.<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
@@ -33987,12 +34086,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>
 
@@ -34701,14 +34831,26 @@
   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><div class="impl">
+  <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>

Received on Wednesday, 12 January 2011 02:44:13 UTC