Browse files

[] (0) WF2: <input type=file> and some editorial fallout.

git-svn-id: http://svn.whatwg.org/webapps@2274 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 64a8bdf commit 5b317b4e6c4a3f42216640414e5cde6658cce72e @Hixie Hixie committed Oct 3, 2008
Showing with 154 additions and 97 deletions.
  1. +73 −47 index
  2. +81 −50 source
View
120 index
@@ -517,7 +517,7 @@
<li><a href=#range-state><span class=secno>4.10.4.1.13 </span>Range state</a></li>
<li><a href=#checkbox-state><span class=secno>4.10.4.1.14 </span>Checkbox state</a></li>
<li><a href=#radio-button-state><span class=secno>4.10.4.1.15 </span>Radio Button state</a></li>
- <li><a href=#file-state><span class=secno>4.10.4.1.16 </span>File state</a></li>
+ <li><a href=#file-upload-state><span class=secno>4.10.4.1.16 </span>File Upload state</a></li>
<li><a href=#submit-button-state><span class=secno>4.10.4.1.17 </span>Submit Button state</a></li>
<li><a href=#image-button-state><span class=secno>4.10.4.1.18 </span>Image Button state</a></li>
<li><a href=#reset-button-state><span class=secno>4.10.4.1.19 </span>Reset Button state</a></li>
@@ -23059,7 +23059,7 @@ function AddCloud(data, x, y) { ... }</pre>
<td> An enumerated value
<td> A radio button
<tr><td> <dfn id=attr-input-type-file-keyword title=attr-input-type-file-keyword><code>file</code></dfn>
- <td> <a href=#file-state title=attr-input-type-file>File</a>
+ <td> <a href=#file-upload-state title=attr-input-type-file>File Upload</a>
<td> Zero or more files each with a MIME type and optionally a file name
<td> A label and a button
<tr><td> <dfn id=attr-input-type-submit-keyword title=attr-input-type-submit-keyword><code>submit</code></dfn>
@@ -23104,7 +23104,7 @@ function AddCloud(data, x, y) { ... }</pre>
<th> <span><a href=#range-state title=attr-input-type-range>Range</a></span>
<th> <span><a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a>,</span>
<span><a href=#radio-button-state title=attr-input-type-radio>Radio Button</a></span>
- <th> <span><a href=#file-state title=attr-input-type-file>File</a></span>
+ <th> <span><a href=#file-upload-state title=attr-input-type-file>File Upload</a></span>
<th> <span><a href=#submit-button-state title=attr-input-type-submit>Submit Button</a></span>
<th> <span><a href=#image-button-state title=attr-input-type-image>Image Button</a></span>
<th> <span><a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>,</span>
@@ -23685,8 +23685,9 @@ function AddCloud(data, x, y) { ... }</pre>
</table><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 changes state, and
when the element is first created, the element's rendering and
behaviour must change to the new state's accordingly and the
- <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn> defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's new state must be
- invoked.</p>
+ <dfn id=value-sanitization-algorithm>value sanitization algorithm</dfn>, if one is defined for the
+ <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's new state,
+ must be invoked.</p>
<p>Each <code><a href=#the-input-element>input</a></code> element has a <a href=#concept-fe-value title=concept-fe-value>value</a>, which is exposed by the <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM attribute. Some states
define an <dfn id=concept-input-value-string-number title=concept-input-value-string-number>algorithm
@@ -23716,8 +23717,8 @@ function AddCloud(data, x, y) { ... }</pre>
have a <i title=concept-input-value-dirty><a href=#concept-input-value-dirty>dirty value</a></i>, the
user agent must set the <a href=#concept-fe-value title=concept-fe-value>value</a>
of the element to the value of the <code title=attr-input-value><a href=#attr-input-value>value</a></code> content attribute, if there is
- one, or the empty string otherwise, and run the <a href=#value-sanitization-algorithm>value
- sanitization algorithm</a>.</p>
+ one, or the empty string otherwise, and then run the current
+ <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if one is defined.</p>
<p>Each <code><a href=#the-input-element>input</a></code> element has a <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, which is exposed by
the <code title=dom-input-checked><a href=#dom-input-checked>checked</a></code> DOM
@@ -23748,7 +23749,8 @@ function AddCloud(data, x, y) { ... }</pre>
if there is one, or the empty string otherwise, set the <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> of the element to true
if the element has a <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>
content attribute and false if it does not, and then invoke the
- <a href=#value-sanitization-algorithm>value sanitization algorithm</a> defined for the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state.</p>
+ <a href=#value-sanitization-algorithm>value sanitization algorithm</a>, if the <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state
+ defines one.</p>
<p>Each <code><a href=#the-input-element>input</a></code> element has a boolean <dfn id=concept-input-mutability title=concept-input-mutability>mutability flag</dfn>. When it is
true, the element is said to be <dfn id=concept-input-mutable title=concept-input-mutable><i>mutable</i></dfn>, and when it is
@@ -23819,9 +23821,6 @@ function AddCloud(data, x, y) { ... }</pre>
the <a href=#hidden-state title=attr-input-type-hidden>Hidden</a> state, it is
<a href=#barred-from-constraint-validation>barred from constraint validation</a>.</p>
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p>If the <code title=attr-input-value><a href=#attr-input-value>name</a></code> attribute is
present and has a value that is a <a href=#case-sensitive>case-sensitive</a> match
for the string "<code title="">_charset_</code>", then the element's
@@ -24989,9 +24988,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code><a href=#the-input-element>input</a></code> element content
attributes and DOM attributes apply to the element:
<code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, and
@@ -25089,9 +25085,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code><a href=#the-input-element>input</a></code> element content
attributes and DOM attributes apply to the element:
<code title=attr-input-checked><a href=#attr-input-checked>checked</a></code> and
@@ -25132,17 +25125,28 @@ function AddCloud(data, x, y) { ... }</pre>
- <h6 id=file-state><span class=secno>4.10.4.1.16 </span><dfn title=attr-input-type-file>File</dfn> state</h6>
+ <h6 id=file-upload-state><span class=secno>4.10.4.1.16 </span><dfn title=attr-input-type-file>File Upload</dfn> state</h6>
- <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=#file-state title=attr-input-type-file>File</a> state, the rules in this
+ <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=#file-upload-state title=attr-input-type-file>File Upload</a> state, the rules in this
section apply.</p>
- <p class=XXX>...</p>
+ <p>The <code><a href=#the-input-element>input</a></code> element represents a list of <dfn id=concept-input-type-file-selected title=concept-input-type-file-selected>selected files</dfn>, each
+ file consisting of a file name, a file type, and a file body (the
+ contents of the file).</p>
- <p>The element's <code title=attr-input-value><a href=#attr-input-value>value</a></code>
- attribute must be omitted.</p>
+ <p>If the element is <i title=concept-input-mutable><a href=#concept-input-mutable>mutable</a></i>,
+ the user 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 connected to
+ the user's device.</p>
- <p>The <dfn id=attr-input-accept title=attr-input-accept><code>accept</code></dfn>
+ <p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i> and the list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a> is
+ empty, then the element is <a href=#suffering-from-being-missing>suffering from being
+ missing</a>.</p>
+
+ <p>There must be no more than one file in the list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>.</p>
+
+ <hr><p>The <dfn id=attr-input-accept title=attr-input-accept><code>accept</code></dfn>
attribute may be specified to provide user agents with a hint of
what file types the server will be able to accept.</p>
@@ -25166,17 +25170,47 @@ function AddCloud(data, x, y) { ... }</pre>
<dd>Indicates that files of the specified type are accepted. <a href=#refsRFC2046>RFC[2046]</a></dd>
- </dl><p>The values must not be <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
- matches for any of the other values (i.e. duplicates are not
+ </dl><p>The tokens must not be <a href=#ascii-case-insensitive>ASCII case-insensitive</a>
+ matches for any of the other tokens (i.e. duplicates are not
allowed).</p>
- <!-- XXX the selected file(s) must either have the given types or be of the given category -->
+ <p>User agents should prevent the user from selecting files that are
+ not accepted by one (or more) of these tokens.</p>
- <p class=XXX>... list of <dfn id=concept-input-type-file-selected title=concept-input-type-file-selected>selected files</dfn></p>
+ <hr><p>The following common <code><a href=#the-input-element>input</a></code> element content
+ attributes apply to the element:
+ <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code> and
+ <code title=attr-input-required><a href=#attr-input-required>required</a></code>.</p>
+
+ <p>The following content attributes must not be specified and do not
+ apply to the element:
+ <code class=no-backref title=attr-fs-action><a href=#attr-fs-action>action</a></code>,
+ <code class=no-backref title=attr-input-alt><a href=#attr-input-alt>alt</a></code>,
+ <code class=no-backref title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>,
+ <code class=no-backref title=attr-input-checked><a href=#attr-input-checked>checked</a></code>,
+ <code class=no-backref title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code>,
+ <code class=no-backref title=attr-input-list><a href=#attr-input-list>list</a></code>,
+ <code class=no-backref title=attr-input-max><a href=#attr-input-max>max</a></code>,
+ <code class=no-backref title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>,
+ <code class=no-backref title=attr-fs-method><a href=#attr-fs-method>method</a></code>,
+ <code class=no-backref title=attr-input-min><a href=#attr-input-min>min</a></code>,
+ <code class=no-backref title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>,
+ <code class=no-backref title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>,
+ <code class=no-backref title=attr-input-size><a href=#attr-input-size>size</a></code>,
+ <code class=no-backref title=attr-input-src><a href=#attr-input-src>src</a></code>,
+ <code class=no-backref title=attr-input-step><a href=#attr-input-step>step</a></code>, and
+ <code class=no-backref title=attr-fs-target><a href=#attr-fs-target>target</a></code>.</p>
+
+ <p>The following DOM attributes and methods do not apply to the element:
+ <code class=no-backref title=dom-input-checked><a href=#dom-input-checked>checked</a></code>,
+ <code class=no-backref title=dom-input-list><a href=#dom-input-list>list</a></code>,
+ <code class=no-backref title=dom-input-selectedOption><a href=#dom-input-selectedoption>selectedOption</a></code>,
+ <code class=no-backref title=dom-input-value><a href=#dom-input-value>value</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> DOM attributes;
+ <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>
- <p><strong>Constraint validation:</strong> If the element is <i title=concept-input-required><a href=#concept-input-required>required</a></i> and the list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a> is
- empty, then the element is <a href=#suffering-from-being-missing>suffering from being
- missing</a>.</p>
@@ -25199,9 +25233,6 @@ function AddCloud(data, x, y) { ... }</pre>
owner</a>, the element must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <a href=#form-owner>form
owner</a> from the <code><a href=#the-input-element>input</a></code> element.</p>
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code><a href=#the-input-element>input</a></code> element content
attributes and DOM attributes apply to the element:
<code title=attr-fs-action><a href=#attr-fs-action>action</a></code>,
@@ -25278,9 +25309,6 @@ function AddCloud(data, x, y) { ... }</pre>
owner</a>, the element must <a href=#concept-form-reset title=concept-form-reset>reset</a> the <a href=#form-owner>form
owner</a>.</p>
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p><strong>Constraint validation:</strong> The element is
<a href=#barred-from-constraint-validation>barred from constraint validation</a>.</p>
@@ -25334,9 +25362,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
- follows:</strong> Do nothing.</p>
-
<p><strong>Constraint validation:</strong> The element is
<a href=#barred-from-constraint-validation>barred from constraint validation</a>.</p>
@@ -25662,7 +25687,8 @@ function AddCloud(data, x, y) { ... }</pre>
it must set the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to the new value, set the
element's <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value
flag</a> to true, and then invoke the <a href=#value-sanitization-algorithm>value sanitization
- algorithm</a> defined for the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state.</dd>
+ algorithm</a>, if the element's <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute's current state
+ defines one.</dd>
<dt><dfn id=dom-input-value-default title=dom-input-value-default>default</dfn>
@@ -26326,7 +26352,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
<p>Attributes for form submission can be specified both on
<code><a href=#the-form-element>form</a></code> elements and on elements that represent buttons
- that submit forms, e.g. an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <span title=attr-input-type-submit-state>Submit Button</span> state. The
+ that submit forms, e.g. an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a> state. The
attributes on the buttons, when omitted, default to the values given
on the corresponding the <code><a href=#the-form-element>form</a></code> element.</p>
@@ -26521,7 +26547,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
false.</li>
<li>The <var title="">field</var> element is an
- <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <span title=attr-input-type-file-state>File Upload</span> state but
+ <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state but
the control does not have any files selected.</li>
</ul><p>Otherwise, process <var title="">field</var> as follows:</p>
@@ -26531,7 +26557,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
<li>
<p>If the <var title="">field</var> element is an
- <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <span title=attr-input-type-image-state>Image Button</span> state,
+ <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state,
then run these further nested substeps:</p>
<ol><li><p>If the <var title="">field</var> element has an <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute specified and value
@@ -26605,11 +26631,11 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
</ol></li>
<li><p>Otherwise, if the <var title="">field</var> element is an
- <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <span title=attr-input-type-file-state>File Upload</span> state, then
- for each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
+ <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state, then for
+ each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
<code><a href=#the-input-element>input</a></code> element, append an entry in the <var title="">form data set</var> with the <var title="">name</var> as
- the name and the file as the value. (Both the file name and the
- file contents are subsequently used.)</li>
+ the name and the file (consisting of the name, the type, and the
+ body) as the value.</li>
<li><p>Otherwise, append an entry in the <var title="">form data
set</var> with <var title="">name</var> as the name and the <a href=#concept-fe-value title=concept-fe-value>value</a> of the <var title="">field</var> element as the value.</li>
View
131 source
@@ -25591,7 +25591,7 @@ function AddCloud(data, x, y) { ... }</pre>
<td> A radio button
<tr>
<td> <dfn title="attr-input-type-file-keyword"><code>file</code></dfn>
- <td> <span title="attr-input-type-file">File</span>
+ <td> <span title="attr-input-type-file">File Upload</span>
<td> Zero or more files each with a MIME type and optionally a file name
<td> A label and a button
<tr>
@@ -25669,7 +25669,7 @@ function AddCloud(data, x, y) { ... }</pre>
<th> <span><span title="attr-input-type-range">Range</span></span>
<th> <span><span title="attr-input-type-checkbox">Checkbox</span>,</span>
<span><span title="attr-input-type-radio">Radio Button</span></span>
- <th> <span><span title="attr-input-type-file">File</span></span>
+ <th> <span><span title="attr-input-type-file">File Upload</span></span>
<th> <span><span title="attr-input-type-submit">Submit Button</span></span>
<th> <span><span title="attr-input-type-image">Image Button</span></span>
<th> <span><span title="attr-input-type-reset">Reset Button</span>,</span>
@@ -26280,9 +26280,9 @@ function AddCloud(data, x, y) { ... }</pre>
title="attr-input-type">type</code> attribute changes state, and
when the element is first created, the element's rendering and
behaviour must change to the new state's accordingly and the
- <dfn>value sanitization algorithm</dfn> defined for the <code
- title="attr-input-type">type</code> attribute's new state must be
- invoked.</p>
+ <dfn>value sanitization algorithm</dfn>, if one is defined for the
+ <code title="attr-input-type">type</code> attribute's new state,
+ must be invoked.</p>
<p>Each <code>input</code> element has a <span
title="concept-fe-value">value</span>, which is exposed by the <code
@@ -26321,8 +26321,8 @@ function AddCloud(data, x, y) { ... }</pre>
user agent must set the <span title="concept-fe-value">value</span>
of the element to the value of the <code
title="attr-input-value">value</code> content attribute, if there is
- one, or the empty string otherwise, and run the <span>value
- sanitization algorithm</span>.</p>
+ one, or the empty string otherwise, and then run the current
+ <span>value sanitization algorithm</span>, if one is defined.</p>
<p>Each <code>input</code> element has a <span
title="concept-fe-checked">checkedness</span>, which is exposed by
@@ -26367,8 +26367,9 @@ function AddCloud(data, x, y) { ... }</pre>
title="concept-fe-checked">checkedness</span> of the element to true
if the element has a <code title="attr-input-checked">checked</code>
content attribute and false if it does not, and then invoke the
- <span>value sanitization algorithm</span> defined for the <code
- title="attr-input-type">type</code> attribute's current state.</p>
+ <span>value sanitization algorithm</span>, if the <code
+ title="attr-input-type">type</code> attribute's current state
+ defines one.</p>
<p>Each <code>input</code> element has a boolean <dfn
title="concept-input-mutability">mutability flag</dfn>. When it is
@@ -26470,9 +26471,6 @@ function AddCloud(data, x, y) { ... }</pre>
the <span title="attr-input-type-hidden">Hidden</span> state, it is
<span>barred from constraint validation</span>.</p>
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p>If the <code title="attr-input-value">name</code> attribute is
present and has a value that is a <span>case-sensitive</span> match
for the string "<code title="">_charset_</code>", then the element's
@@ -27806,9 +27804,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code>input</code> element content
attributes and DOM attributes apply to the element:
<code title="attr-input-checked">checked</code>, and
@@ -27926,9 +27921,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code>input</code> element content
attributes and DOM attributes apply to the element:
<code title="attr-input-checked">checked</code> and
@@ -27969,17 +27961,34 @@ function AddCloud(data, x, y) { ... }</pre>
- <h6><dfn title="attr-input-type-file">File</dfn> state</h6>
+ <h6><dfn title="attr-input-type-file">File Upload</dfn> state</h6>
<p>When an <code>input</code> element's <code
title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-file">File</span> state, the rules in this
+ title="attr-input-type-file">File Upload</span> state, the rules in this
section apply.</p>
- <p class="XXX">...</p>
+ <p>The <code>input</code> element represents a list of <dfn
+ title="concept-input-type-file-selected">selected files</dfn>, each
+ file consisting of a file name, a file type, and a file body (the
+ contents of the file).</p>
- <p>The element's <code title="attr-input-value">value</code>
- attribute must be omitted.</p>
+ <p>If the element is <i title="concept-input-mutable">mutable</i>,
+ the user 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 connected to
+ the user's device.</p>
+
+ <p><strong>Constraint validation:</strong> If the element is <i
+ title="concept-input-required">required</i> and the list of <span
+ title="concept-input-type-file-selected">selected files</span> is
+ empty, then the element is <span>suffering from being
+ missing</span>.</p>
+
+ <p>There must be no more than one file in the list of <span
+ title="concept-input-type-file-selected">selected files</span>.</p>
+
+ <hr>
<p>The <dfn title="attr-input-accept"><code>accept</code></dfn>
attribute may be specified to provide user agents with a hint of
@@ -28009,19 +28018,49 @@ function AddCloud(data, x, y) { ... }</pre>
</dl>
- <p>The values must not be <span>ASCII case-insensitive</span>
- matches for any of the other values (i.e. duplicates are not
+ <p>The tokens must not be <span>ASCII case-insensitive</span>
+ matches for any of the other tokens (i.e. duplicates are not
allowed).</p>
- <!-- XXX the selected file(s) must either have the given types or be of the given category -->
+ <p>User agents should prevent the user from selecting files that are
+ not accepted by one (or more) of these tokens.</p>
- <p class="XXX">... list of <dfn title="concept-input-type-file-selected">selected files</dfn></p>
+ <hr>
+
+ <p>The following common <code>input</code> element content
+ attributes apply to the element:
+ <code title="attr-input-accept">accept</code> and
+ <code title="attr-input-required">required</code>.</p>
+
+ <p>The following content attributes must not be specified and do not
+ apply to the element:
+ <code class="no-backref" title="attr-fs-action">action</code>,
+ <code class="no-backref" title="attr-input-alt">alt</code>,
+ <code class="no-backref" title="attr-input-autocomplete">autocomplete</code>,
+ <code class="no-backref" title="attr-input-checked">checked</code>,
+ <code class="no-backref" title="attr-fs-enctype">enctype</code>,
+ <code class="no-backref" title="attr-input-list">list</code>,
+ <code class="no-backref" title="attr-input-max">max</code>,
+ <code class="no-backref" title="attr-input-maxlength">maxlength</code>,
+ <code class="no-backref" title="attr-fs-method">method</code>,
+ <code class="no-backref" title="attr-input-min">min</code>,
+ <code class="no-backref" title="attr-input-pattern">pattern</code>,
+ <code class="no-backref" title="attr-input-readonly">readonly</code>,
+ <code class="no-backref" title="attr-input-size">size</code>,
+ <code class="no-backref" title="attr-input-src">src</code>,
+ <code class="no-backref" title="attr-input-step">step</code>, and
+ <code class="no-backref" title="attr-fs-target">target</code>.</p>
+
+ <p>The following DOM attributes and methods do not apply to the element:
+ <code class="no-backref" title="dom-input-checked">checked</code>,
+ <code class="no-backref" title="dom-input-list">list</code>,
+ <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
+ <code class="no-backref" title="dom-input-value">value</code>,
+ <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> and
+ <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
+ <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
+ <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
- <p><strong>Constraint validation:</strong> If the element is <i
- title="concept-input-required">required</i> and the list of <span
- title="concept-input-type-file-selected">selected files</span> is
- empty, then the element is <span>suffering from being
- missing</span>.</p>
@@ -28048,9 +28087,6 @@ function AddCloud(data, x, y) { ... }</pre>
title="concept-form-submit">submit</span> the <span>form
owner</span> from the <code>input</code> element.</p>
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p>The following common <code>input</code> element content
attributes and DOM attributes apply to the element:
<code title="attr-fs-action">action</code>,
@@ -28133,9 +28169,6 @@ function AddCloud(data, x, y) { ... }</pre>
title="concept-form-reset">reset</span> the <span>form
owner</span>.</p>
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p><strong>Constraint validation:</strong> The element is
<span>barred from constraint validation</span>.</p>
@@ -28193,9 +28226,6 @@ function AddCloud(data, x, y) { ... }</pre>
<!-- XXX event timing; activation behavior -->
- <p><strong>The <span>value sanitization algorithm</span> is as
- follows:</strong> Do nothing.</p>
-
<p><strong>Constraint validation:</strong> The element is
<span>barred from constraint validation</span>.</p>
@@ -28585,8 +28615,9 @@ function AddCloud(data, x, y) { ... }</pre>
title="concept-fe-value">value</span> to the new value, set the
element's <span title="concept-input-value-dirty-flag">dirty value
flag</span> to true, and then invoke the <span>value sanitization
- algorithm</span> defined for the element's <code
- title="attr-input-type">type</code> attribute's current state.</dd>
+ algorithm</span>, if the element's <code
+ title="attr-input-type">type</code> attribute's current state
+ defines one.</dd>
<dt><dfn title="dom-input-value-default">default</dfn>
@@ -29372,7 +29403,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<code>form</code> elements and on elements that represent buttons
that submit forms, e.g. an <code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-submit-state">Submit Button</span> state. The
+ title="attr-input-type-submit">Submit Button</span> state. The
attributes on the buttons, when omitted, default to the values given
on the corresponding the <code>form</code> element.</p>
@@ -29621,7 +29652,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<li>The <var title="">field</var> element is an
<code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-file-state">File Upload</span> state but
+ title="attr-input-type-file">File Upload</span> state but
the control does not have any files selected.</li>
</ul>
@@ -29635,7 +29666,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<p>If the <var title="">field</var> element is an
<code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-image-state">Image Button</span> state,
+ title="attr-input-type-image">Image Button</span> state,
then run these further nested substeps:</p>
<ol>
@@ -29735,13 +29766,13 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<li><p>Otherwise, if the <var title="">field</var> element is an
<code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-file-state">File Upload</span> state, then
- for each file <span
+ title="attr-input-type-file">File Upload</span> state, then for
+ each file <span
title="concept-input-type-file-selected">selected</span> in the
<code>input</code> element, append an entry in the <var
title="">form data set</var> with the <var title="">name</var> as
- the name and the file as the value. (Both the file name and the
- file contents are subsequently used.)</p></li>
+ the name and the file (consisting of the name, the type, and the
+ body) as the value.</p></li>
<li><p>Otherwise, append an entry in the <var title="">form data
set</var> with <var title="">name</var> as the name and the <span

0 comments on commit 5b317b4

Please sign in to comment.