Skip to content

Commit

Permalink
[e] (0) Refactor form submission browsing context details. This in th…
Browse files Browse the repository at this point in the history
…eory didn't change anything.

git-svn-id: http://svn.whatwg.org/webapps@5684 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 30, 2010
1 parent a739853 commit 82cc161
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 148 deletions.
85 changes: 35 additions & 50 deletions complete.html
Expand Up @@ -214,7 +214,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 29 November 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 30 November 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -47481,6 +47481,20 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss

<li><p>Let <var title="">target</var> be the <var title="">submitter</var> element's <a href=#concept-fs-target title=concept-fs-target>target</a>.</li>

<li><p>If the user indicated a specific <a href=#browsing-context>browsing
context</a> to use when submitting the form, then let <var title="">target browsing context</var> be that <a href=#browsing-context>browsing
context</a>. Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
browsing context given a browsing context name</a> using <var title="">target</var> as the name and the <a href=#browsing-context>browsing
context</a> of <var title="">form</var> as the context in which
the algorithm is executed, and let <var title="">target browsing
context</var> be the resulting <a href=#browsing-context>browsing
context</a>.</li>

<li><p>If <var title="">target browsing context</var> was created
in the previous step, then let <var title="">replace</var> be true.
Otherwise, let it be false.</li>
<!-- XXXXX this is about to change -->

<li>

<p>Select the appropriate row in the table below based on the
Expand Down Expand Up @@ -47535,14 +47549,11 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss
replaced by <var title="">query</var> (adding a U+003F QUESTION
MARK character (?) if appropriate).</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47553,9 +47564,6 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss
the <var title="">form data set</var> using the
<a href=#appropriate-form-encoding-algorithm>appropriate form encoding algorithm</a>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p>Let <var title="">MIME type</var> be determined as
follows:</p>

Expand All @@ -47579,22 +47587,19 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss
POST can trigger this now, and that's historically
unrestricted)--><p>Otherwise, <a href=#navigate>navigate</a><!--DONAV form--> <var title="">target browsing context</var> to <var title="">action</var> using the HTTP method given by <var title="">method</var> and with <var title="">entity body</var>
as the entity body, of type <var title="">MIME type</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

<dt><dfn id=submit-get-action title=submit-get-action>Get action</dfn>
<dd>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">action</var>. If <var title="">target browsing context</var> was newly created for
this purpose by the steps above, then it must be navigated with
<a href=#replacement-enabled>replacement enabled</a>.</p>
browsing context</var> to <var title="">action</var>. If <var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47621,14 +47626,10 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss
string, replace the first occurrence of "<code title="">%%</code>" in <var title="">action</var> with the
resulting escaped string. <a href=#refsRFC3986>[RFC3986]</a></p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to the potentially modified <var title="">action</var>. If <var title="">target browsing
context</var> was newly created for this purpose by the steps
above, then it must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>
browsing context</var> to the potentially modified <var title="">action</var>. If <var title="">replace</var> is true,
then <var title="">target browsing context</var> must be
navigated with <a href=#replacement-enabled>replacement enabled</a>.</p>

</dd>

Expand All @@ -47651,14 +47652,11 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss

<p>Append <var title="">headers</var> to <var title="">destination</var>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47685,29 +47683,15 @@ <h5 id=form-submission-algorithm><span class=secno>4.10.22.3 </span>Form submiss
<p>Append <var title="">body</var>, interpreted as a US-ASCII
string, to <var title="">destination</var>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

</dl><p><dfn id=the-form-submission-target-browsing-context>The form submission target browsing context</dfn> is
obtained, when needed by the behaviors described above, as
follows: If the user indicated a specific <a href=#browsing-context>browsing
context</a> to use when submitting the form, then that is the
target browsing context. Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for
choosing a browsing context given a browsing context name</a>
using <var title="">target</var> as the name and the
<a href=#browsing-context>browsing context</a> of <var title="">form</var> as the
context in which the algorithm is executed; the resulting
<a href=#browsing-context>browsing context</a> is the target browsing context.</p>

<p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
</dl><p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
determined as follows:</p>

<dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
Expand Down Expand Up @@ -58921,6 +58905,7 @@ <h4 id=the-location-interface><span class=secno>6.4.3 </span>The <code><a href=#
must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code>
method had been called with the new value as its argument.</p><!--
v2: may wish to allow replace instead as a UI improvement -->
<!-- XXXXX the above is about to change -->

<!-- we could change the magic .location setter to simply refer
straight to assign(), so we don't have two levels of indirection -->
Expand Down
85 changes: 35 additions & 50 deletions index
Expand Up @@ -218,7 +218,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 29 November 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 30 November 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -47461,6 +47461,20 @@ fur

<li><p>Let <var title="">target</var> be the <var title="">submitter</var> element's <a href=#concept-fs-target title=concept-fs-target>target</a>.</li>

<li><p>If the user indicated a specific <a href=#browsing-context>browsing
context</a> to use when submitting the form, then let <var title="">target browsing context</var> be that <a href=#browsing-context>browsing
context</a>. Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
browsing context given a browsing context name</a> using <var title="">target</var> as the name and the <a href=#browsing-context>browsing
context</a> of <var title="">form</var> as the context in which
the algorithm is executed, and let <var title="">target browsing
context</var> be the resulting <a href=#browsing-context>browsing
context</a>.</li>

<li><p>If <var title="">target browsing context</var> was created
in the previous step, then let <var title="">replace</var> be true.
Otherwise, let it be false.</li>
<!-- XXXXX this is about to change -->

<li>

<p>Select the appropriate row in the table below based on the
Expand Down Expand Up @@ -47515,14 +47529,11 @@ fur
replaced by <var title="">query</var> (adding a U+003F QUESTION
MARK character (?) if appropriate).</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47533,9 +47544,6 @@ fur
the <var title="">form data set</var> using the
<a href=#appropriate-form-encoding-algorithm>appropriate form encoding algorithm</a>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p>Let <var title="">MIME type</var> be determined as
follows:</p>

Expand All @@ -47559,22 +47567,19 @@ fur
POST can trigger this now, and that's historically
unrestricted)--><p>Otherwise, <a href=#navigate>navigate</a><!--DONAV form--> <var title="">target browsing context</var> to <var title="">action</var> using the HTTP method given by <var title="">method</var> and with <var title="">entity body</var>
as the entity body, of type <var title="">MIME type</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

<dt><dfn id=submit-get-action title=submit-get-action>Get action</dfn>
<dd>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">action</var>. If <var title="">target browsing context</var> was newly created for
this purpose by the steps above, then it must be navigated with
<a href=#replacement-enabled>replacement enabled</a>.</p>
browsing context</var> to <var title="">action</var>. If <var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47601,14 +47606,10 @@ fur
string, replace the first occurrence of "<code title="">%%</code>" in <var title="">action</var> with the
resulting escaped string. <a href=#refsRFC3986>[RFC3986]</a></p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to the potentially modified <var title="">action</var>. If <var title="">target browsing
context</var> was newly created for this purpose by the steps
above, then it must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>
browsing context</var> to the potentially modified <var title="">action</var>. If <var title="">replace</var> is true,
then <var title="">target browsing context</var> must be
navigated with <a href=#replacement-enabled>replacement enabled</a>.</p>

</dd>

Expand All @@ -47631,14 +47632,11 @@ fur

<p>Append <var title="">headers</var> to <var title="">destination</var>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

Expand All @@ -47665,29 +47663,15 @@ fur
<p>Append <var title="">body</var>, interpreted as a US-ASCII
string, to <var title="">destination</var>.</p>

<p>Let <var title="">target browsing context</var> be <a href=#the-form-submission-target-browsing-context>the
form submission target browsing context</a>.</p>

<p><a href=#navigate>Navigate</a><!--DONAV form--> <var title="">target
browsing context</var> to <var title="">destination</var>. If
<var title="">target browsing context</var> was newly created
for this purpose by the steps above, then it must be navigated
with <a href=#replacement-enabled>replacement enabled</a>.</p>
<var title="">replace</var> is true, then <var title="">target
browsing context</var> must be navigated with <a href=#replacement-enabled>replacement
enabled</a>.</p>

</dd>

</dl><p><dfn id=the-form-submission-target-browsing-context>The form submission target browsing context</dfn> is
obtained, when needed by the behaviors described above, as
follows: If the user indicated a specific <a href=#browsing-context>browsing
context</a> to use when submitting the form, then that is the
target browsing context. Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for
choosing a browsing context given a browsing context name</a>
using <var title="">target</var> as the name and the
<a href=#browsing-context>browsing context</a> of <var title="">form</var> as the
context in which the algorithm is executed; the resulting
<a href=#browsing-context>browsing context</a> is the target browsing context.</p>

<p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
</dl><p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
determined as follows:</p>

<dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
Expand Down Expand Up @@ -58901,6 +58885,7 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code>
method had been called with the new value as its argument.</p><!--
v2: may wish to allow replace instead as a UI improvement -->
<!-- XXXXX the above is about to change -->

<!-- we could change the magic .location setter to simply refer
straight to assign(), so we don't have two levels of indirection -->
Expand Down

0 comments on commit 82cc161

Please sign in to comment.