Merge WHATWG change: Remove the terminate send()/abort() concept in favor of using the error flag.
--- a/Overview.html Thu May 09 23:18:24 2013 +0900
+++ b/Overview.html Thu May 09 23:48:52 2013 +0900
@@ -690,8 +690,7 @@
<a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a> state.
<p>The <dfn id="error-flag">error flag</dfn> indicates some type of
- network error or request abortion. It is initially unset and is used
- during the <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a> state.
+ network error or fetch termination. It is initially unset.
<h3 id="request"><span class="secno">4.6 </span>Request</h3>
@@ -871,9 +870,11 @@
"<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception and
terminate these steps.
- <li><p><a href="#terminate-abort()" title="terminate abort()">Terminate the <code>abort()</code> algorithm</a>.</li>
-
- <li><p><a href="#terminate-send()" title="terminate send()">Terminate the <code>send()</code> algorithm</a>.</li>
+ <li>
+ <p>Set the <a href="#error-flag">error flag</a>.
+
+ <p class="note">This is meaningless unless the
+ <code title="dom-XMLHttpRequest-send"><a href="#dom-xmlhttprequest-send">send()</a></code> algorithm is running.
<li><p>The user agent should cancel any network
activity for which the object is responsible.</li>
@@ -1212,18 +1213,8 @@
</dd>
</dl>
- <p>The
- <dfn id="dom-xmlhttprequest-send" title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
- method must run these steps (unless otherwise noted). This algorithm can
- be <dfn id="terminate-send()" title="terminate send()">terminated</dfn> by invoking the
- <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> or
- <code title="dom-XMLHttpRequest-abort"><a href="#dom-xmlhttprequest-abort">abort()</a></code> method. When it is
- <a href="#terminate-send()" title="terminate send()">terminated</a> the user agent
- must terminate the algorithm after finishing the step it is on.</p>
-
- <p class="note">The <code title="dom-XMLHttpRequest-send"><a href="#dom-xmlhttprequest-send">send()</a></code>
- algorithm can only be terminated if the <a href="#synchronous-flag">synchronous flag</a> is
- unset and only after the method call has returned.</p>
+<p>The <dfn id="dom-xmlhttprequest-send" title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
+method must run these steps (unless otherwise noted):
<ol>
<li><p>If the state is not
@@ -1614,6 +1605,9 @@
<p>The <dfn id="same-origin-request-event-rules">same-origin request event rules</dfn> are as follows:</p>
<dl class="switch">
+ <dt>If the <a href="#error-flag">error flag</a> is set
+ <dd><p>Terminate these steps.
+
<dt>If the response has an HTTP status code of 301, 302, 303, 307, or 308</dt>
<dd>
<p>If the redirect violates infinite loop precautions this is a
@@ -1690,6 +1684,9 @@
<p>The <dfn id="cross-origin-request-event-rules">cross-origin request event rules</dfn> are as follows:</p>
<dl class="switch">
+ <dt>If the <a href="#error-flag">error flag</a> is set
+ <dd><p>Terminate these steps.
+
<dt>If the <a class="external" href="http://www.w3.org/TR/cors/#cross-origin-request-status">cross-origin request status</a>
is <i>preflight complete</i> and the <a href="#synchronous-flag">synchronous flag</a> is
unset</dt>
@@ -1910,21 +1907,11 @@
<dd>Cancels any network activity.
</dl>
- <p>The
- <dfn id="dom-xmlhttprequest-abort" title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn>
- method must run these steps (unless otherwise noted). This algorithm can
- be <dfn id="terminate-abort()" title="terminate abort()">terminated</dfn> by invoking the
- <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> method. When it is
- <a href="#terminate-abort()" title="terminate abort()">terminated</a> the user agent
- must terminate the algorithm after finishing the step it is on.
-
- <p class="note">The <code title="dom-XMLHttpRequest-abort"><a href="#dom-xmlhttprequest-abort">abort()</a></code>
- algorithm can only be terminated by invoking
- <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> from an event
- handler.</p>
+<p>The <dfn id="dom-xmlhttprequest-abort" title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn> method must run
+these steps (unless otherwise noted):
<ol>
- <li><p><a href="#terminate-send()" title="terminate send()">Terminate the <code>send()</code> algorithm</a>.</li>
+ <li><p>Set the <a href="#error-flag">error flag</a>.
<li><p>The user agent should cancel any network
activity for which the object is responsible.</li>
@@ -1935,10 +1922,6 @@
the <a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#task-queue" title="task queue">task queues</a>,
then remove them.
- <li><p>Set the <a href="#error-flag">error flag</a>.
-
- <li><p>Unset the <a href="#synchronous-flag">synchronous flag</a>.
-
<li>
<p>If the state is <a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a>,
<a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a> with the
@@ -2332,7 +2315,7 @@
<a href="#request-url">request URL</a>.
<li><p>Set <var title="">document</var>'s
- <a class="external" href="http://dev.w3.org/html5/spec/browsers.html#origin">origin</a> to the
+ <a class="external" href="http://dev.w3.org/html5/spec/browsers.html#origin">origin</a> to
<a href="#source-origin">source origin</a>.
<li><p>Return <var title="">document</var>.
@@ -2924,6 +2907,7 @@
David Levin,
Dean Jackson,
Denis Sureau,
+ Dominik Röttsches,
Doug Schepers,
Douglas Livingstone,
Elliotte Harold,
--- a/Overview.src.html Thu May 09 23:18:24 2013 +0900
+++ b/Overview.src.html Thu May 09 23:48:52 2013 +0900
@@ -699,8 +699,7 @@
<span title="dom-XMLHttpRequest-OPENED">OPENED</span> state.
<p>The <dfn id="error-flag">error flag</dfn> indicates some type of
- network error or request abortion. It is initially unset and is used
- during the <span title="dom-XMLHttpRequest-DONE">DONE</span> state.
+ network error or fetch termination. It is initially unset.
<h3 id="request">Request</h3>
@@ -880,9 +879,11 @@
"<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
terminate these steps.
- <li><p><span title="terminate abort()">Terminate the <code>abort()</code> algorithm</span>.</p></li>
-
- <li><p><span title="terminate send()">Terminate the <code>send()</code> algorithm</span>.</p></li>
+ <li>
+ <p>Set the <span>error flag</span>.
+
+ <p class=note>This is meaningless unless the
+ <code title=dom-XMLHttpRequest-send>send()</code> algorithm is running.
<li><p>The user agent should cancel any network
activity for which the object is responsible.</p></li>
@@ -1221,18 +1222,8 @@
</dd>
</dl>
- <p>The
- <dfn title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
- method must run these steps (unless otherwise noted). This algorithm can
- be <dfn title="terminate send()">terminated</dfn> by invoking the
- <code title="dom-XMLHttpRequest-open">open()</code> or
- <code title="dom-XMLHttpRequest-abort">abort()</code> method. When it is
- <span title="terminate send()">terminated</span> the user agent
- must terminate the algorithm after finishing the step it is on.</p>
-
- <p class=note>The <code title="dom-XMLHttpRequest-send">send()</code>
- algorithm can only be terminated if the <span>synchronous flag</span> is
- unset and only after the method call has returned.</p>
+<p>The <dfn title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
+method must run these steps (unless otherwise noted):
<ol>
<li><p>If the state is not
@@ -1623,6 +1614,9 @@
<p>The <dfn>same-origin request event rules</dfn> are as follows:</p>
<dl class=switch>
+ <dt>If the <span>error flag</span> is set
+ <dd><p>Terminate these steps.
+
<dt>If the response has an HTTP status code of 301, 302, 303, 307, or 308</dt>
<dd>
<p>If the redirect violates infinite loop precautions this is a
@@ -1699,6 +1693,9 @@
<p>The <dfn>cross-origin request event rules</dfn> are as follows:</p>
<dl class=switch>
+ <dt>If the <span>error flag</span> is set
+ <dd><p>Terminate these steps.
+
<dt>If the <span data-anolis-spec=cors>cross-origin request status</span>
is <i>preflight complete</i> and the <span>synchronous flag</span> is
unset</dt>
@@ -1919,21 +1916,11 @@
<dd>Cancels any network activity.
</dl>
- <p>The
- <dfn title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn>
- method must run these steps (unless otherwise noted). This algorithm can
- be <dfn title="terminate abort()">terminated</dfn> by invoking the
- <code title="dom-XMLHttpRequest-open">open()</code> method. When it is
- <span title="terminate abort()">terminated</span> the user agent
- must terminate the algorithm after finishing the step it is on.
-
- <p class=note>The <code title="dom-XMLHttpRequest-abort">abort()</code>
- algorithm can only be terminated by invoking
- <code title="dom-XMLHttpRequest-open">open()</code> from an event
- handler.</p>
+<p>The <dfn title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn> method must run
+these steps (unless otherwise noted):
<ol>
- <li><p><span title="terminate send()">Terminate the <code>send()</code> algorithm</span>.</p></li>
+ <li><p>Set the <span>error flag</span>.
<li><p>The user agent should cancel any network
activity for which the object is responsible.</p></li>
@@ -1944,10 +1931,6 @@
the <span data-anolis-spec=html title="task queue">task queues</span>,
then remove them.
- <li><p>Set the <span>error flag</span>.
-
- <li><p>Unset the <span>synchronous flag</span>.
-
<li>
<p>If the state is <span title="dom-XMLHttpRequest-UNSENT">UNSENT</span>,
<span title="dom-XMLHttpRequest-OPENED">OPENED</span> with the
@@ -2341,7 +2324,7 @@
<span>request URL</span>.
<li><p>Set <var title>document</var>'s
- <span data-anolis-spec=html>origin</span> to the
+ <span data-anolis-spec=html>origin</span> to
<span>source origin</span>.
<li><p>Return <var title>document</var>.
@@ -2875,6 +2858,7 @@
David Levin,
Dean Jackson,
Denis Sureau,
+ Dominik Röttsches,
Doug Schepers,
Douglas Livingstone,
Elliotte Harold,
--- a/data/xrefs/dom/xhr.json Thu May 09 23:18:24 2013 +0900
+++ b/data/xrefs/dom/xhr.json Thu May 09 23:48:52 2013 +0900
@@ -76,8 +76,6 @@
"switch to the headers_received state": "switch-headers-received",
"switch to the loading state": "switch-loading",
"synchronous flag": "synchronous-flag",
- "terminate abort()": "terminate-abort()",
- "terminate send()": "terminate-send()",
"text response entity body": "text-response-entity-body",
"timeout error": "timeout-error",
"upload complete flag": "upload-complete-flag",