HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/7210

SVNBugCommentTime (UTC)
7210Factor out mutability, for autocomplete's use.2012-07-26 22:37
Index: source
===================================================================
--- source	(revision 7209)
+++ source	(revision 7210)
@@ -54980,26 +54980,25 @@
   <code title="attr-input-type">type</code> attribute's current state
   defines one.</p>
 
-  <p>Each <code>input</code> element is either <dfn
-  title="concept-input-mutable"><i>mutable</i></dfn> or <dfn
-  title="concept-input-immutable"><i>immutable</i></dfn>. Except where
-  otherwise specified, an <code>input</code> element is always <i
-  title="concept-input-mutable">mutable</i>. Similarly, except where
+  <p>Each <code>input</code> element can be <i
+  title="concept-fe-mutable">mutable</i>. Except where otherwise
+  specified, an <code>input</code> element is always <i
+  title="concept-fe-mutable">mutable</i>. Similarly, except where
   otherwise specified, the user agent should not allow the user to
   modify the element's <span title="concept-fe-value">value</span> or
   <span title="concept-fe-checked">checkedness</span>.</p>
 
   <p>When an <code>input</code> element is <span
-  title="concept-fe-disabled">disabled</span>, it is <i
-  title="concept-input-immutable">immutable</i>.</p>
+  title="concept-fe-disabled">disabled</span>, it is not <i
+  title="concept-fe-mutable">mutable</i>.</p>
 
   <p class="note">The <code
   title="attr-input-readonly">readonly</code> attribute can also in
   some cases (e.g. for the <span
   title="attr-input-type-date">Date</span> state, but not the <span
-  title="attr-input-type-checkbox">Checkbox</span> state) make an
-  <code>input</code> element <i
-  title="concept-input-immutable">immutable</i>.</p>
+  title="attr-input-type-checkbox">Checkbox</span> state) stop an
+  <code>input</code> element from being <i
+  title="concept-fe-mutable">mutable</i>.</p>
 
   <p>The <span title="concept-node-clone-ext">cloning steps</span> for
   <code>input</code> elements must propagate the <span
@@ -55302,7 +55301,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   its <span title="concept-fe-value">value</span> should be editable
   by the user. User agents must not allow users to insert U+000A LINE
   FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the
@@ -55310,7 +55309,7 @@
 
   <!-- this next bit is also in the <textarea> section -->
   <!-- and something similar is in the session history section -->
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the writing direction
   of the element, setting it either to a left-to-right writing
   direction or a right-to-left writing direction. If the user does so,
@@ -55422,7 +55421,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   its <span title="concept-fe-value">value</span> should be editable
   by the user. User agents may change the spacing and, with care, the
   punctuation of <span title="concept-fe-value">values</span> that the
@@ -55534,7 +55533,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the URL represented
   by its <span title="concept-fe-value">value</span>. User agents may
   allow the user to set the <span
@@ -55700,7 +55699,7 @@
 
     <div class="impl">
 
-    <p>If the element is <i title="concept-input-mutable">mutable</i>,
+    <p>If the element is <i title="concept-fe-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
@@ -55765,7 +55764,7 @@
 
     <div class="impl">
 
-    <p>If the element is <i title="concept-input-mutable">mutable</i>,
+    <p>If the element is <i title="concept-fe-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
@@ -55982,7 +55981,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   its <span title="concept-fe-value">value</span> should be editable
   by the user. User agents must not allow users to insert U+000A LINE
   FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span
@@ -56081,7 +56080,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-datetime">global date and time</span> represented by
   its <span title="concept-fe-value">value</span>, as obtained by
@@ -56322,7 +56321,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-date">date</span> represented by its <span
   title="concept-fe-value">value</span>, as obtained by <span
@@ -56505,7 +56504,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-month">month</span> represented by its <span
   title="concept-fe-value">value</span>, as obtained by <span
@@ -56685,7 +56684,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-week">week</span> represented by its <span
   title="concept-fe-value">value</span>, as obtained by <span
@@ -56871,7 +56870,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-time">time</span> represented by its <span
   title="concept-fe-value">value</span>, as obtained by <span
@@ -57047,7 +57046,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the <span
   title="concept-datetime-local">date and time</span> represented by
   its <span title="concept-fe-value">value</span>, as obtained by
@@ -57245,7 +57244,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the number
   represented by its <span title="concept-fe-value">value</span>, as
   obtained from applying the <span>rules for parsing floating-point
@@ -57431,7 +57430,7 @@
   enforced even during user input, and there is no way to set the
   value to the empty string.</p>
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the number
   represented by its <span title="concept-fe-value">value</span>, as
   obtained from applying the <span>rules for parsing floating-point
@@ -57686,7 +57685,7 @@
   <p class="note">In this state, there is always a color picked, and
   there is no way to set the value to the empty string.</p>
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the color represented
   by its <span title="concept-fe-value">value</span>, as obtained from
   applying the <span>rules for parsing simple color values</span> to
@@ -57805,7 +57804,7 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   then: The <span>pre-click activation steps</span> consist of setting
   the element's <span title="concept-fe-checked">checkedness</span> to
   its opposite value (i.e. true if it is false, false if it is true),
@@ -57822,9 +57821,8 @@
   cancelable. Once this fires, the control is checked, end of story.
   --></p>
 
-  <p>If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  <p>If the element is not <i title="concept-fe-mutable">mutable</i>,
+  it has no <span>activation behavior</span>.</p>
 
   <p><strong>Constraint validation</strong>: If the element is <i
   title="concept-input-required">required</i> and its <span
@@ -57981,7 +57979,7 @@
 
   </ul>
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   then: The <span>pre-click activation steps</span> consist of setting
   the element's <span title="concept-fe-checked">checkedness</span> to
   true. The <span>canceled activation steps</span> consist of setting
@@ -57992,9 +57990,8 @@
   cancelable. Once this fires, the control is checked, end of story.
   -->.</p>
 
-  <p>If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  <p>If the element is not <i title="concept-fe-mutable">mutable</i>,
+  it has no <span>activation behavior</span>.</p>
 
   <p><strong>Constraint validation</strong>: If an element in the
   <i>radio button group</i> is <i
@@ -58101,7 +58098,7 @@
   should be separated from each other using U+005C REVERSE SOLIDUS
   character (\).</p>
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the user agent should allow the user to change the files on the
   list, e.g. adding or removing files. Files can be from the
   filesystem or created on the fly, e.g. a picture taken from a camera
@@ -58349,16 +58346,15 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   then the element's <span>activation behavior</span> is as follows:
   if the element has a <span>form owner</span>, <span
   title="concept-form-submit">submit</span> the <span>form
   owner</span> from the <code>input</code> element; otherwise, do
   nothing.</p>
 
-  <p>If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  <p>If the element is not <i title="concept-fe-mutable">mutable</i>,
+  it has no <span>activation behavior</span>.</p>
 
   </div>
 
@@ -58576,7 +58572,7 @@
   title="concept-input-type-image-coordinate">coordinate</span> from
   the image specified by the <code title="attr-input-src">src</code>
   attribute; if the element is <i
-  title="concept-input-mutable">mutable</i>, the user agent should
+  title="concept-fe-mutable">mutable</i>, the user agent should
   allow the user to select this <span
   title="concept-input-type-image-coordinate">coordinate</span>, and
   the element's <span>activation behavior</span> is as follows: if the
@@ -58591,7 +58587,7 @@
   <p>Otherwise, the element <span>represents</span> a submit button
   whose label is given by the value of the <code
   title="attr-input-alt">alt</code> attribute; if the element is <i
-  title="concept-input-mutable">mutable</i>, then the element's
+  title="concept-fe-mutable">mutable</i>, then the element's
   <span>activation behavior</span> is as follows: if the element has a
   <span>form owner</span>, set the <span
   title="concept-input-type-image-coordinate">selected
@@ -58601,11 +58597,11 @@
   element.</p>
 
   <p>In either case, if the element is <i
-  title="concept-input-mutable">mutable</i> but has no <span>form
+  title="concept-fe-mutable">mutable</i> but has no <span>form
   owner</span>, then its <span>activation behavior</span> must be to
-  do nothing. If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  do nothing. If the element is not <i
+  title="concept-fe-mutable">mutable</i>, it has no <span>activation
+  behavior</span>.</p>
 
   <p>The <dfn title="concept-input-type-image-coordinate">selected
   coordinate</dfn> must consist of an <var title="">x</var>-component
@@ -58788,15 +58784,14 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   then the element's <span>activation behavior</span>, if the element
   has a <span>form owner</span>, is to <span
   title="concept-form-reset">reset</span> the <span>form owner</span>;
   otherwise, it is to do nothing.</p>
 
-  <p>If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  <p>If the element is not <i title="concept-fe-mutable">mutable</i>,
+  it has no <span>activation behavior</span>.</p>
 
   <p><strong>Constraint validation</strong>: The element is
   <span>barred from constraint validation</span>.</p>
@@ -58882,12 +58877,11 @@
 
   <div class="impl">
 
-  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  <p>If the element is <i title="concept-fe-mutable">mutable</i>,
   the element's <span>activation behavior</span> is to do nothing.</p>
 
-  <p>If the element is <i
-  title="concept-input-immutable">immutable</i>, it has no
-  <span>activation behavior</span>.</p>
+  <p>If the element is not <i title="concept-fe-mutable">mutable</i>,
+  it has no <span>activation behavior</span>.</p>
 
   <p><strong>Constraint validation</strong>: The element is
   <span>barred from constraint validation</span>.</p>
@@ -59056,8 +59050,8 @@
   <p>The <dfn title="attr-input-readonly"><code>readonly</code></dfn>
   attribute is a <span>boolean attribute</span> that controls whether
   or not the user can edit the form control. <span class="impl">When
-  specified, the element is <i
-  title="concept-input-immutable">immutable</i>.</span></p>
+  specified, the element is not <i
+  title="concept-fe-mutable">mutable</i>.</span></p>
 
   <div class="impl">
 
@@ -59115,7 +59109,7 @@
   title="concept-input-required">required</i>, and its <code
   title="dom-input-value">value</code> IDL attribute applies and is in
   the mode <span title="dom-input-value-value">value</span>, and the
-  element is <i title="concept-input-mutable">mutable</i>, and the
+  element is <i title="concept-fe-mutable">mutable</i>, and the
   element's <span title="concept-fe-value">value</span> is the empty
   string, then the element is <span>suffering from being
   missing</span>.</p>
@@ -60655,6 +60649,10 @@
   submitted. The <code title="attr-fe-autofocus">autofocus</code>
   attribute controls focus.</p>
 
+  <p>A <code>select</code> element that is not <span
+  title="concept-fe-disabled">disabled</span> is <i
+  title="concept-fe-mutable">mutable</i>.</p>
+
 <!--TOPIC:DOM APIs-->
   <dl class="domintro">
 
@@ -61526,14 +61524,14 @@
   specified on a <code>textarea</code> element, the element is
   <span>barred from constraint validation</span>.</p>
 
-  <p>A <code>textarea</code> element is <dfn
-  title="concept-textarea-mutable">mutable</dfn> if it is neither
-  <span title="concept-fe-disabled">disabled</span> nor has a <code
+  <p>A <code>textarea</code> element is <span
+  title="concept-fe-mutable">mutable</span> if it is neither <span
+  title="concept-fe-disabled">disabled</span> nor has a <code
   title="attr-textarea-readonly">readonly</code> attribute
   specified.</p>
 
   <p>When a <code>textarea</code> is <span
-  title="concept-textarea-mutable">mutable</span>, its <span
+  title="concept-fe-mutable">mutable</span>, its <span
   title="concept-textarea-raw-value">raw value</span> should be
   editable by the user: the user agent should allow the user to edit,
   insert, and remove text, and to insert and remove line breaks in the
@@ -61571,7 +61569,7 @@
   <!-- this next bit is also in the <input> Text/Search section -->
   <!-- and something similar is in the session history section -->
   <p>If the element is <span
-  title="concept-textarea-mutable">mutable</span>, the user agent
+  title="concept-fe-mutable">mutable</span>, the user agent
   should allow the user to change the writing direction of the
   element, setting it either to a left-to-right writing direction or a
   right-to-left writing direction. If the user does so, the user agent
@@ -61752,7 +61750,7 @@
   <p><strong>Constraint validation</strong>: If the element has its
   <code title="attr-textarea-required">required</code> attribute
   specified, and the element is <span
-  title="concept-textarea-mutable">mutable</span>, and the element's
+  title="concept-fe-mutable">mutable</span>, and the element's
   <span title="concept-fe-value">value</span> is the empty string,
   then the element is <span>suffering from being missing</span>.</p>
 
@@ -63119,6 +63117,19 @@
   title="concept-fe-values">value<em>s</em></dfn>.</p>
 
 
+  <h5>Mutability</h5>
+
+  <p>A form control can be designated as <dfn
+  title="concept-fe-mutable"><i>mutable</i></dfn>.</p>
+
+  <p class="note">This determines (by means of definitions and
+  requirements in this specification that rely on whether an element
+  is so designated) whether or not the user can modify the <span
+  title="concept-fe-value">value</span> or <span
+  title="concept-fe-checked">checkedness</span> of a form control, or
+  whether or not a control can be automatically prefilled.</p>
+
+
   <h5>Association of controls and forms</h5>
 
   <p>A <span>form-associated element</span> can have a relationship
@@ -64006,11 +64017,10 @@
   <p>The autocompletion mechanism must be implemented by the user
   agent acting as if the user had modified the element's <span
   title="concept-fe-value">value</span>, and must be done at a time
-  where the element is <i title="concept-input-mutable">mutable</i>
+  where the element is <i title="concept-fe-mutable">mutable</i>
   (e.g. just after the element has been inserted into the document, or
   when the user agent <span title="stop parsing">stops
-  parsing</span>).</p> <!-- XXX only input elements have
-  concept-input-mutable -->
+  parsing</span>).</p>
 
   <div class="example">
 
@@ -71516,10 +71526,9 @@
 
      <li><code>input</code> elements to which the <code
      title="attr-input-readonly">readonly</code> attribute applies,
-     but that are not <i title="concept-input-immutable">immutable</i>
-     (i.e. that do not have the <code
-     title="attr-input-readonly">readonly</code> attribute specified
-     and that are not <span
+     and that are <i title="concept-fe-mutable">mutable</i> (i.e. that
+     do not have the <code title="attr-input-readonly">readonly</code>
+     attribute specified and that are not <span
      title="concept-fe-disabled">disabled</span>)</li>
 
      <li><code>textarea</code> elements that do not have a <code
@@ -90131,10 +90140,10 @@
    title="attr-input-readonly">readonly</code> attribute applies,
    whose <code title="attr-input-type">type</code> attributes are not
    in the <span title="attr-input-type-password">Password</span>
-   state, and that are not <i
-   title="concept-input-immutable">immutable</i> (i.e. that do not
-   have the <code title="attr-input-readonly">readonly</code>
-   attribute specified and that are not <span
+   state, and that are <i title="concept-fe-mutable">mutable</i> (i.e.
+   that do not have the <code
+   title="attr-input-readonly">readonly</code> attribute specified and
+   that are not <span
    title="concept-fe-disabled">disabled</span>).</li>
 
    <li>The value of <code>textarea</code> elements that do not have a

|