HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
39577511[Opera] [Webkit] Make the implicit submission mechanism validate the form.2009-09-22 09:35
@@ -33907,21 +33907,22 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
     of writing, Safari returned the first element, Firefox returned
     null (as we do), and IE7 returned the original collection:
     http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Cform%20action%3D%22%2F%22%3E%3Cinput%20name%3Da%20id%3Dfirst%3E%3Cinput%20name%3Da%20id%3Dsecond%3E%3C%2Fform%3E%0A%3Cscript%3E%0A%20w%28document.forms[0].a%29%3B%0A%20document.getElementsByTagName%28%27input%27%29[0].name%20%3D%20%27b%27%3B%0A%20document.getElementsByTagName%28%27input%27%29[1].name%20%3D%20%27b%27%3B%0A%20w%28document.forms[0].length%29%3B%0A%20w%28document.forms[0].a.id%29%3B%0A%3C%2Fscript%3E
   -->
 
   <hr>
 
   <p>The <dfn title="dom-form-submit"><code>submit()</code></dfn>
   method, when invoked, must <span
   title="concept-form-submit">submit</span> the <code>form</code>
-  element from the <code>form</code> element itself.</p>
+  element from the <code>form</code> element itself, with the <var
+  title="">scripted-submit</var> flag set.</p>
 
   <p>The <dfn title="dom-form-reset"><code>reset()</code></dfn>
   method, when invoked, must <span
   title="concept-form-reset">reset</span> the <code>form</code>
   element.</p>
 
   <p>If the <dfn
   title="dom-form-checkValidity"><code>checkValidity()</code></dfn>
   method is invoked, the user agent must <span>statically validate the
   constraints</span> of the <code>form</code> element, and return true
@@ -43046,21 +43047,22 @@ fur
 
   </div>
 
 
   <div class="impl">
 
   <h5>Form submission algorithm</h5>
 
   <p>When a form <var title="">form</var> is <dfn
   title="concept-form-submit">submitted</dfn> from an element <var
-  title="">submitter</var> (typically a button), the user agent must
+  title="">submitter</var> (typically a button), optionally with a
+  <var title="">scripted-submit</var> flag set, the user agent must
   run the following steps:</p>
 
   <ol>
 
    <li id="sandboxSubmitBlocked"><p>If <var title="">form</var> is in
    a <code>Document</code> that has no associated <span>browsing
    context</span> or whose <span>browsing context</span> has its
    <span>sandboxed forms browsing context flag</span> set, then abort
    these steps without doing anything.</p></li>
 
@@ -43068,36 +43070,36 @@ fur
    (i.e. the form was <span
    title="concept-form-submit">submitted</span> again while processing
    the events fired from the next two steps, probably from a script
    redundantly calling the <code
    title="dom-form-submit">submit()</code> method on <var
    title="">form</var>), then abort these steps. This doesn't affect
    the earlier instance of this algorithm.</p></li>
 
    <!-- lock (implicit in previous step) -->
 
-   <li><p>If the <var title="">submitter</var> is anything but a
-   <code>form</code> element, and the <var title="">submitter</var>
-   element's <span title="concept-fs-novalidate">no-validate
-   state</span> is false, then <span>interactively validate the
-   constraints</span> of <var title="">form</var> and examine the
-   result: if the result is negative (the constraint validation
-   concluded that there were invalid fields and probably informed the
-   user of this) then abort these steps.</p></li>
-
-   <li><p>If the <var title="">submitter</var> is anything but a
-   <code>form</code> element, then <span>fire a simple event</span>
-   that is cancelable called <code title="event-submit">submit</code>,
-   at <var title="">form</var>. If the event's default action is
-   prevented (i.e. if the event is canceled) then abort these
-   steps. Otherwise, continue (effectively the default action is to
-   perform the submission).</p></li>
+   <li><p>If the <var title="">scripted-submit</var> flag is not set,
+   and the <var title="">submitter</var> element's <span
+   title="concept-fs-novalidate">no-validate state</span> is false,
+   then <span>interactively validate the constraints</span> of <var
+   title="">form</var> and examine the result: if the result is
+   negative (the constraint validation concluded that there were
+   invalid fields and probably informed the user of this) then abort
+   these steps.</p></li>
+
+   <li><p>If the <var title="">scripted-submit</var> flag is not set,
+   then <span>fire a simple event</span> that is cancelable called
+   <code title="event-submit">submit</code>, at <var
+   title="">form</var>. If the event's default action is prevented
+   (i.e. if the event is canceled) then abort these steps. Otherwise,
+   continue (effectively the default action is to perform the
+   submission).</p></li>
 
    <!-- if you add any steps between the "lock" and "unlock" lines,
    make sure to update the step immediately before the "lock" line -->
 
    <!-- unlock -->
 
    <li><p>Let <var title="">controls</var> be a list of all the <span
    title="category-submit">submittable</span> elements whose
    <span>form owner</span> is <var title="">form</var>, in <span>tree
    order</span>.</p></li>

|