Permalink
Browse files

[ow] (2) Make the implicit submission mechanism validate the form.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7511

git-svn-id: http://svn.whatwg.org/webapps@3957 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent ecfb9af commit 61fe884970c7dc69d904d955b27b8f978ccce787 @Hixie Hixie committed Sep 22, 2009
Showing with 36 additions and 36 deletions.
  1. +16 −18 index
  2. +20 −18 source
View
34 index
@@ -30569,7 +30569,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<hr><p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
method, when invoked, must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <code><a href=#the-form-element>form</a></code>
- element from the <code><a href=#the-form-element>form</a></code> element itself.</p>
+ element from the <code><a href=#the-form-element>form</a></code> element itself, with the <var title="">scripted-submit</var> flag set.</p>
<p>The <dfn id=dom-form-reset title=dom-form-reset><code>reset()</code></dfn>
method, when invoked, must <a href=#concept-form-reset title=concept-form-reset>reset</a> the <code><a href=#the-form-element>form</a></code>
@@ -38454,7 +38454,8 @@ fur
<h5 id=form-submission-algorithm><span class=secno>4.10.17.3 </span>Form submission algorithm</h5>
- <p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), the user agent must
+ <p>When a form <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var 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
@@ -38471,22 +38472,19 @@ fur
<!-- lock (implicit in previous step) -->
- <li><p>If the <var title="">submitter</var> is anything but a
- <code><a href=#the-form-element>form</a></code> element, and the <var title="">submitter</var>
- element's <a href=#concept-fs-novalidate title=concept-fs-novalidate>no-validate
- state</a> is false, then <a href=#interactively-validate-the-constraints>interactively validate the
- constraints</a> 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.</li>
-
- <li><p>If the <var title="">submitter</var> is anything but a
- <code><a href=#the-form-element>form</a></code> element, then <a href=#fire-a-simple-event>fire a simple event</a>
- 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).</li>
+ <li><p>If the <var title="">scripted-submit</var> flag is not set,
+ and the <var title="">submitter</var> element's <a href=#concept-fs-novalidate title=concept-fs-novalidate>no-validate state</a> is false,
+ then <a href=#interactively-validate-the-constraints>interactively validate the constraints</a> 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.</li>
+
+ <li><p>If the <var title="">scripted-submit</var> flag is not set,
+ then <a href=#fire-a-simple-event>fire a simple event</a> 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).</li>
<!-- if you add any steps between the "lock" and "unlock" lines,
make sure to update the step immediately before the "lock" line -->
View
38 source
@@ -33914,7 +33914,8 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<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
@@ -43053,7 +43054,8 @@ fur
<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>
@@ -43075,22 +43077,22 @@ fur
<!-- 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 -->

0 comments on commit 61fe884

Please sign in to comment.