HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2164WF2: Complete the 'construcint the form data set' subalgorithm.2008-09-11 22:16
@@ -24133,20 +24133,23 @@ function AddCloud(data, x, y) { ... }</pre>
 };</pre>
    </dd> 
   </dl>
 
   <!-- XXX add selectionStart and company -->
 
   <p class="big-issue">...</p>
 
   <p class="big-issue">... <dfn title="concept-input-checked">checked</dfn></p>
 
+  <p class="big-issue">... image: <dfn title="concept-input-type-image-coordinate">selected coordinate</dfn></p>
+
+  <p class="big-issue">... <dfn title="concept-input-type-file-selected">selected file</dfn></p>
 
   <h4>The <dfn><code>button</code></dfn> element</h4>
 
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
    <dd><span>Form-associated element</span>.</dd>
    <dd><span title="category-field">Field element</span>.</dd>
    <dd><span title="category-listed-form-element">Listed form element</span>.</dd>
@@ -24357,20 +24360,24 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-input-value">value</span>;
 
   readonly attribute DOMString <span title="dom-option-text">text</span>;
   readonly attribute long <span title="dom-option-index">index</span>;
 };</pre>
    </dd> 
   </dl>
 
   <p class="big-issue">...</p>
 
+  <p class="big-issue">... <dfn title="concept-option-selected">selected</dfn></p>
+
+  <p class="big-issue">... <dfn title="concept-option-value">value</dfn></p>
+
   <p class="big-issue">
    <dfn title="dom-option"><code>Option()</code></dfn>
    <dfn title="dom-option-n"><code>Option(<var title="">name</var>)</code></dfn>
    <dfn title="dom-option-nv"><code>Option(<var title="">name</var>, <var title="">value</var>)</code></dfn>
    ... must return a new <code>HTMLOptionElement</code> object (a new
    <code>option</code> element). ... argument processing ...
   </p>
 
 
   <h4>The <dfn><code>textarea</code></dfn> element</h4>
@@ -24580,20 +24587,22 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
   <p class="big-issue">... <dfn title="attr-fe-name">name</dfn> content attribute</p>
 
   <p class="big-issue">... <dfn title="dom-fe-name">name</dfn> DOM attribute</p>
 
   <p class="big-issue">... <dfn title="concept-fe-disabled">disabled</dfn></p>
 
   <p class="big-issue">... <dfn title="attr-fe-disabled">disabled</dfn> content attribute</p>
 
   <p class="big-issue">... <dfn title="dom-fe-disabled">disabled</dfn> DOM attribute</p>
 
+  <p class="big-issue">... <dfn title="concept-fe-value">value</dfn></p>
+
 
   <h4>Constraint validation</h4>
 
   <p class="big-issue">...</p>
 
 
   <h4>Form submission</h4>
 
   <p>When a form <var title="">form</var> is <dfn
   title="concept-form-submit">submitted</dfn> from an element <var
@@ -24624,46 +24633,38 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
    the default action is to perform the submission).</p></li>
 
    <li><p>Let <var title="">controls</var> be a list of all the <span
    title="category-field">field elements</span> whose <span>form
    owner</span> is <var title="">form</var>, in <span>tree
    order</span>.</p></li>
 
    <li><p>Let the <var title="">form data set</var> be a list of
    name/value pairs, initially empty.</p></li>
 
-   <li>
+   <li id="constructing-form-data-set">
 
-    <p>For each element <var title="">field</var> in <var
-    title="">controls</var>, in <span>tree order</span>, run the
-    following substeps:</p>
+    <p><strong>Constructing the form data set</strong>. For each
+    element <var title="">field</var> in <var title="">controls</var>,
+    in <span>tree order</span>, run the following substeps:</p>
 
     <ol>
 
      <li>
 
       <p>If any of the following conditions are met, then skip these
       substeps for this element:</p>
 
       <ul>
 
        <li>The <var title="">field</var> element has a
        <code>datalist</code> element ancestor.</li>
 
-       <li>The <var title="">field</var> element does not have a <code
-       title="attr-fe-name">name</code> attribute specified, or its
-       <code title="attr-fe-name">name</code> attribute's value is the
-       empty string, and it is not an <code>input</code> elements
-       whose <code title="attr-input-type">type</code> attribute is in
-       the <span title="attr-input-type-image-state">Image
-       Button</span> state.</li>
-
        <li>The <var title="">field</var> element is <span
        title="concept-fe-disabled">disabled</span>.</li>
 
        <li>The <var title="">field</var> element is a <span
        title="concept-button">button</span> but it is not <var
        title="">submitter</var>.</li>
 
        <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
@@ -24679,23 +24680,116 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
        title="concept-input-checked">checked</span>.</li>
 
        <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
        the control does not have any files selected.</li>
 
       </ul>
 
+      <p>Otherwise, process <var title="">field</var> as follows:</p>
+
      </li>
 
-     <li class="big-issue">...</li>
+     <li>
+
+      <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,
+      then run these further nested substeps:</p>
+
+      <ol>
+
+       <li><p>If the <var title="">field</var> element has an <code
+       title="attr-fe-name">name</code> attribute specified and value
+       is not the empty string, let <var title="">name</var> be that
+       value followed by a single U+002E FULL STOP (.)
+       character. Otherwise, let <var title="">name</var> be the empty
+       string.</p></li>
+
+       <li><p>Let <var title="">name<sub title="">x</sub></var> be the
+       string consisting of the concatenation of <var
+       title="">name</var> and a single U+0078 LATIN SMALL LETTER X
+       (x) character.</p></li>
+
+       <li><p>Let <var title="">name<sub title="">y</sub></var> be the
+       string consisting of the concatenation of <var
+       title="">name</var> and a single U+0079 LATIN SMALL LETTER Y
+       (y) character.</p></li>
+
+       <li><p>The <var title="">field</var> element is <var
+       title="">submitter</var>, and before this algorithm was invoked
+       the user <span
+       title="concept-input-type-image-coordinate">indicated a
+       coordinate</span>. Let <var title="">x</var> be the x-component
+       of the coordindate selected by the user, and let <var
+       title="">y</var> be the y-component of the coordinate selected
+       by the user.</p></li>
+
+       <li><p>Append an entry in the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">x</sub></var> and
+       the value <var title="">x</var>.</p></li>
+
+       <li><p>Append an entry in the <var title="">form data set</var>
+       with the name <var title="">name<sub title="">y</sub></var> and
+       the value <var title="">y</var>.</p></li>
+
+       <li><p>Skip the remaining substeps for this element: if there
+       are any more elements in <var title="">controls</var>, return
+       to the top of the <a
+       href="#constructing-form-data-set">constructing the form data
+       set</a> step, otherwise, jump to the next step in the overall
+       form submission algorithm.</p></li>
+
+      </ol>
+
+     </li>
+
+     <li><p>If the <var title="">field</var> element does not have a
+     <code title="attr-fe-name">name</code> attribute specified, or
+     its <code title="attr-fe-name">name</code> attribute's value is
+     the empty string, skip these substeps for this element: if there
+     are any more elements in <var title="">controls</var>, return to
+     the top of the <a href="#constructing-form-data-set">constructing
+     the form data set</a> step, otherwise, jump to the next step in
+     the overall form submission algorithm.</p></li>
+
+     <li><p>Let <var title="">name</var> be the value of the <var
+     title="">field</var> element's <code
+     title="attr-fe-name">name</code> attribute.</p></li>
+
+     <li><p>If the <var title="">field</var> element is a
+     <code>select</code> element, then for each <code>option</code>
+     element in the <code>select</code> element that is <span
+     title="concept-option-selected">selected</span>, append an entry
+     in the <var title="">form data set</var> with the <var
+     title="">name</var> as the name and the <span
+     title="concept-option-value">value</span> of the
+     <code>option</code> element as the value.</p></li>
+
+     <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="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>
+
+     <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
+     title="concept-fe-value">value</span> of the <var
+     title="">field</var> element as the value.</p></li>
 
     </ol>
 
    </li>
 
    <li><p class="big-issue">...</p></li>
 
   </ol>
 
 

|