[html5] r4789 - [giow] (0) Make 'Referer' work correctly for scripts in shared workers. (For som [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Feb 22 17:53:08 PST 2010


Author: ianh
Date: 2010-02-22 17:53:06 -0800 (Mon, 22 Feb 2010)
New Revision: 4789

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Make 'Referer' work correctly for scripts in shared workers. (For some definition of 'correctly' -- it uses the URL of the document that actually created the script. Arguably it should use the URL of the script itself. However, this doesn't change that, it just makes it not leak the URL of documents that that document's browsing context is navigated to.)

Modified: complete.html
===================================================================
--- complete.html	2010-02-22 23:54:26 UTC (rev 4788)
+++ complete.html	2010-02-23 01:53:06 UTC (rev 4789)
@@ -157,7 +157,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 22 February 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 23 February 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>-->
@@ -5247,9 +5247,8 @@
 
      <dt>When fetching resources in response to a call to an API</dt>
 
-     <dd>The <a href=#active-document>active document</a> of the <a href="#script's-browsing-context" title="script's
-     browsing context">browsing context</a> of the <a href=#entry-script>entry
-     script</a>.</dd>
+     <dd>The <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+     document">document</a>.</dd>
 
     </dl><p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
     component from the generated <i>address of the resource from which
@@ -6801,8 +6800,7 @@
   <p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument>createDocument()</code>
   or <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument()</a></code>
   APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
-  document's address</a> of the <a href=#active-document>active document</a> of the
-  <a href="#script's-browsing-context">script's browsing context</a>.</p>
+  document's address</a> of the <a href="#script's-document">script's document</a>.</p>
 
   <p><code><a href=#document>Document</a></code> objects are assumed to be <dfn id=xml-documents>XML
   documents</dfn> unless they are flagged as being <dfn id=html-documents>HTML
@@ -10020,9 +10018,9 @@
    UTF-16.</li>
 
    <li><p>Change <a href="#the-document's-address">the document's address</a> to the
-   <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-   context">browsing context</a>'s <a href=#active-document>active document</a>'s
-   <a href="#the-document's-address" title="the document's address">address</a>.</li>
+   <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+   document">document</a>'s <a href="#the-document's-address" title="the document's
+   address">address</a>.</li>
 
    <li><p>Create a new <a href=#html-parser>HTML parser</a> and associate it with
    the document. This is a <dfn id=script-created-parser>script-created parser</dfn> (meaning
@@ -52905,6 +52903,11 @@
   <a href=#view title=view>views</a> and their <code>AbstractView</code>
   objects.</p>
 
+  <p>Each <a href=#concept-script title=concept-script>script</a> has a strong
+  reference to its <a href="#script's-browsing-context" title="script's browsing context">browsing
+  context</a> and its <a href="#script's-document" title="script's
+  document">document</a>.</p>
+
   <p>When a <a href=#browsing-context>browsing context</a> is to <dfn id=discard-a-document>discard a
   <code>Document</code></dfn>, the user agent must run the following
   steps:</p>
@@ -53907,11 +53910,9 @@
 
      <li>If the <a href=#origin>origin</a> of the resulting <a href=#absolute-url>absolute
      URL</a> is not the same as the <a href=#origin>origin</a> of the
-     <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-     context">browsing context</a>'s <a href=#active-document>active document</a>,
-     and either the <a href=#url-path title=url-path><path></a> or
-     <a href=#url-query title=url-query><query></a> components of the
-     two <a href=#url title=URL>URLs</a> compared in the previous step
+     <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+     document">document</a>, and either the <a href=#url-path title=url-path><path></a> or <a href=#url-query title=url-query><query></a> components of the two
+     <a href=#url title=URL>URLs</a> compared in the previous step
      differ, raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception and abort
      these steps. (This prevents sandboxed content from spoofing other
      pages on the same origin.)</li>
@@ -57773,6 +57774,19 @@
 
    </dd>
 
+   <dt>A relationship with the <dfn id="script's-document">script's document</dfn></dt>
+
+   <dd>
+
+    <p>A <code><a href=#document>Document</a></code> that is assigned responsibility for
+    actions taken by the script.</p>
+
+    <p class=example>When a script <a href=#fetch title=fetch>fetches</a> a resource, the <a href="#the-document's-current-address" title="the
+    document's current address">current address</a> of the
+    <a href="#script's-document">script's document</a> will be used to set the <code title=http-referer>Referer</code> (sic) header.</p>
+
+   </dd>
+
    <dt>A <dfn id="script's-url-character-encoding" title="script's URL character encoding">URL character encoding</dfn></dt>
 
    <dd>
@@ -57857,9 +57871,10 @@
    entry-point</a></i> is the entry-point for that code.</li>
 
    <li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
-   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-url-character-encoding">script's URL
-   character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
-   from the settings passed to this algorithm.</li>
+   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
+   document</a>, the <a href="#script's-url-character-encoding">script's URL character encoding</a>,
+   and the <a href="#script's-base-url">script's base URL</a> from the settings passed to
+   this algorithm.</li>
 
    <li><p><a href=#jump-to-a-code-entry-point title="jump to a code entry-point">Jump</a> to the
    <a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
@@ -58026,8 +58041,7 @@
   <a href=#browsing-context>browsing context</a>, then it is the <a href=#browsing-context>browsing
   context</a>'s <a href=#active-document>active document</a> at the time the task
   was queued; if the task was queued by or for a <a href=#concept-script title=concept-script>script</a> then the document is the
-  <a href="#script's-browsing-context">script's browsing context</a>'s <a href=#active-document>active
-  document</a> at the time the task was queued.</p>
+  <a href="#script's-document">script's document</a>.</p>
 
   <p>A user agent is required to have one <dfn id=storage-mutex>storage
   mutex</dfn>. This mutex is used to control access to shared state
@@ -58437,10 +58451,11 @@
    to null and abort these steps.</li>
 
    <li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
-   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-url-character-encoding">script's URL
-   character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
-   from <a href=#the-script-settings-determined-from-the-node>the script settings determined from the node</a> on
-   which the attribute is being set.</li>
+   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
+   document</a>, the <a href="#script's-url-character-encoding">script's URL character encoding</a>,
+   and the <a href="#script's-base-url">script's base URL</a> from <a href=#the-script-settings-determined-from-the-node>the script
+   settings determined from the node</a> on which the attribute is
+   being set.</li>
 
    <li><p>Set the corresponding <a href=#event-handlers title="event handlers">event
    handler</a> to the aforementioned function.</li>
@@ -59054,13 +59069,14 @@
 
     <p>Otherwise, if the <a href=#method-context>method context</a> is a
     <code><a href=#workerutils>WorkerUtils</a></code> object, let <var title="">global
-    object</var>, <var title="">browsing context</var>, <var title="">character encoding</var>, and <var title="">base
-    URL</var> be the <a href="#script's-global-object">script's global object</a>,
-    <a href="#script's-browsing-context">script's browsing context</a>, <a href="#script's-url-character-encoding">script's URL
-    character encoding</a>, and <a href="#script's-base-url">script's base URL</a>
-    (respectively) of the <a href=#concept-script title=concept-script>script</a>
-    that the <a href=#run-a-worker>run a worker</a> algorithm created when it
-    created the <a href=#method-context>method context</a>.</p>
+    object</var>, <var title="">browsing context</var>, <var title="">document</var>, <var title="">character encoding</var>,
+    and <var title="">base URL</var> be the <a href="#script's-global-object">script's global
+    object</a>, <a href="#script's-browsing-context">script's browsing context</a>,
+    <a href="#script's-document">script's document</a>, <a href="#script's-url-character-encoding">script's URL character
+    encoding</a>, and <a href="#script's-base-url">script's base URL</a> (respectively)
+    of the <a href=#concept-script title=concept-script>script</a> that the
+    <a href=#run-a-worker>run a worker</a> algorithm created when it created the
+    <a href=#method-context>method context</a>.</p>
 
     <p>Otherwise, act as described in the specification that defines
     that the <code><a href=#windowtimers>WindowTimers</a></code> interface is implemented by
@@ -59069,13 +59085,7 @@
    </li>
 
    <li><p>Return a <a href=#concept-task title=concept-task>task</a> that checks
-   if the entry for <var title="">handle</var> in <var title="">list</var>
-   has been cleared, and if it has not, <a href=#create-a-script title="create a
-   script">creates a script</a> using <var title="">script
-   source</var> as the script source, <var title="">scripting
-   language</var> as the scripting language, <var title="">global
-   object</var> as the global object, <var title="">browsing
-   context</var> as the browsing context, <var title="">character
+   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, <var title="">scripting language</var> as the scripting language, <var title="">global object</var> as the global object, <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var title="">base URL</var> as the base URL.</li>
 
   </ol><p>When the above methods are to <dfn id=get-the-timeout>get the timeout</dfn>, they
@@ -64972,9 +64982,12 @@
   <h4 id=processing-model-3><span class=secno>9.2.5 </span>Processing model</h4>
 
   <p>When a user agent is to <dfn id=run-a-worker>run a worker</dfn> for a script with
-  <a href=#url>URL</a> <var title="">url</var>, a browsing context <var title="">owner browsing context</var>, an origin <var title="">owner
-  origin</var>, and with global scope <var title="">worker global
-  scope</var>, it must run the following steps:</p>
+  <a href=#url>URL</a> <var title="">url</var>, a <a href=#browsing-context>browsing
+  context</a> <var title="">owner browsing context</var>, a
+  <code><a href=#document>Document</a></code> <var title="">owner document</var>, an
+  <a href=#origin>origin</a> <var title="">owner origin</var>, and with
+  global scope <var title="">worker global scope</var>, it must run
+  the following steps:</p>
 
   <ol><li>
 
@@ -65036,6 +65049,9 @@
 
     <p>Set the <a href="#script's-browsing-context">script's browsing context</a> to <var title="">owner browsing context</var>.</p>
 
+    <p>Set the <a href="#script's-document">script's document</a> to <var title="">owner
+    document</var>.</p>
+
     <p>Set the <a href="#script's-url-character-encoding">script's URL character encoding</a> to
     UTF-8. (This is just used for encoding non-ASCII characters in the
     query component of URLs.)</p>
@@ -65446,7 +65462,9 @@
     <p><a href=#run-a-worker>Run a worker</a> for the resulting <a href=#absolute-url>absolute
     URL</a>, with the <a href="#script's-browsing-context">script's browsing context</a> of the
     script that invoked the method as the <var title="">owner browsing
-    context</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
+    context</var>, with the <a href="#script's-document">script's document</a> of the
+    script that invoked the method as the <var title="">owner
+    document</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
     script</a> as the <var title="">owner origin</var>, and with
     <var title="">worker global scope</var> as the global scope.</p>
 
@@ -65652,7 +65670,9 @@
     <p><a href=#run-a-worker>Run a worker</a> for <var title="">scriptURL</var>,
     with the <a href="#script's-browsing-context">script's browsing context</a> of the script that
     invoked the method as the <var title="">owner browsing
-    context</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
+    context</var>, with the <a href="#script's-document">script's document</a> of the
+    script that invoked the method as the <var title="">owner
+    document</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
     script</a> as the <var title="">owner origin</var>, and with
     <var title="">worker global scope</var> as the global scope.</p>
 
@@ -69048,9 +69068,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code><a href=#document>Document</a></code> of the <code><a href=#window>Window</a></code> object on which
     the method was invoked does not have the <a href=#same-origin>same origin</a>
-    as the <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a>'s <a href=#active-document>active document</a>,
-    then abort these steps silently.</p>
+    as the <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+    document">document</a>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <a href=#absolute-url>absolute URL</a>, and the <code><a href=#document>Document</a></code> of the
@@ -69165,9 +69184,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code><a href=#document>Document</a></code> of the <code><a href=#window>Window</a></code> object on which
     the method was invoked does not have the <a href=#same-origin>same origin</a>
-    as the <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a>'s <a href=#active-document>active document</a>,
-    then abort these steps silently.</p>
+    as the <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+    document">document</a>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <a href=#absolute-url>absolute URL</a>, and the <code><a href=#document>Document</a></code> of the

Modified: index
===================================================================
--- index	2010-02-22 23:54:26 UTC (rev 4788)
+++ index	2010-02-23 01:53:06 UTC (rev 4789)
@@ -161,7 +161,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 22 February 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 23 February 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>-->
@@ -5151,9 +5151,8 @@
 
      <dt>When fetching resources in response to a call to an API</dt>
 
-     <dd>The <a href=#active-document>active document</a> of the <a href="#script's-browsing-context" title="script's
-     browsing context">browsing context</a> of the <a href=#entry-script>entry
-     script</a>.</dd>
+     <dd>The <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+     document">document</a>.</dd>
 
     </dl><p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
     component from the generated <i>address of the resource from which
@@ -6705,8 +6704,7 @@
   <p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument>createDocument()</code>
   or <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument()</a></code>
   APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
-  document's address</a> of the <a href=#active-document>active document</a> of the
-  <a href="#script's-browsing-context">script's browsing context</a>.</p>
+  document's address</a> of the <a href="#script's-document">script's document</a>.</p>
 
   <p><code><a href=#document>Document</a></code> objects are assumed to be <dfn id=xml-documents>XML
   documents</dfn> unless they are flagged as being <dfn id=html-documents>HTML
@@ -9924,9 +9922,9 @@
    UTF-16.</li>
 
    <li><p>Change <a href="#the-document's-address">the document's address</a> to the
-   <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-   context">browsing context</a>'s <a href=#active-document>active document</a>'s
-   <a href="#the-document's-address" title="the document's address">address</a>.</li>
+   <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+   document">document</a>'s <a href="#the-document's-address" title="the document's
+   address">address</a>.</li>
 
    <li><p>Create a new <a href=#html-parser>HTML parser</a> and associate it with
    the document. This is a <dfn id=script-created-parser>script-created parser</dfn> (meaning
@@ -52812,6 +52810,11 @@
   <a href=#view title=view>views</a> and their <code>AbstractView</code>
   objects.</p>
 
+  <p>Each <a href=#concept-script title=concept-script>script</a> has a strong
+  reference to its <a href="#script's-browsing-context" title="script's browsing context">browsing
+  context</a> and its <a href="#script's-document" title="script's
+  document">document</a>.</p>
+
   <p>When a <a href=#browsing-context>browsing context</a> is to <dfn id=discard-a-document>discard a
   <code>Document</code></dfn>, the user agent must run the following
   steps:</p>
@@ -53814,11 +53817,9 @@
 
      <li>If the <a href=#origin>origin</a> of the resulting <a href=#absolute-url>absolute
      URL</a> is not the same as the <a href=#origin>origin</a> of the
-     <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-     context">browsing context</a>'s <a href=#active-document>active document</a>,
-     and either the <a href=#url-path title=url-path><path></a> or
-     <a href=#url-query title=url-query><query></a> components of the
-     two <a href=#url title=URL>URLs</a> compared in the previous step
+     <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+     document">document</a>, and either the <a href=#url-path title=url-path><path></a> or <a href=#url-query title=url-query><query></a> components of the two
+     <a href=#url title=URL>URLs</a> compared in the previous step
      differ, raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception and abort
      these steps. (This prevents sandboxed content from spoofing other
      pages on the same origin.)</li>
@@ -57695,6 +57696,19 @@
 
    </dd>
 
+   <dt>A relationship with the <dfn id="script's-document">script's document</dfn></dt>
+
+   <dd>
+
+    <p>A <code><a href=#document>Document</a></code> that is assigned responsibility for
+    actions taken by the script.</p>
+
+    <p class=example>When a script <a href=#fetch title=fetch>fetches</a> a resource, the <a href="#the-document's-current-address" title="the
+    document's current address">current address</a> of the
+    <a href="#script's-document">script's document</a> will be used to set the <code title=http-referer>Referer</code> (sic) header.</p>
+
+   </dd>
+
    <dt>A <dfn id="script's-url-character-encoding" title="script's URL character encoding">URL character encoding</dfn></dt>
 
    <dd>
@@ -57779,9 +57793,10 @@
    entry-point</a></i> is the entry-point for that code.</li>
 
    <li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
-   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-url-character-encoding">script's URL
-   character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
-   from the settings passed to this algorithm.</li>
+   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
+   document</a>, the <a href="#script's-url-character-encoding">script's URL character encoding</a>,
+   and the <a href="#script's-base-url">script's base URL</a> from the settings passed to
+   this algorithm.</li>
 
    <li><p><a href=#jump-to-a-code-entry-point title="jump to a code entry-point">Jump</a> to the
    <a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
@@ -57953,8 +57968,7 @@
   <a href=#browsing-context>browsing context</a>, then it is the <a href=#browsing-context>browsing
   context</a>'s <a href=#active-document>active document</a> at the time the task
   was queued; if the task was queued by or for a <a href=#concept-script title=concept-script>script</a> then the document is the
-  <a href="#script's-browsing-context">script's browsing context</a>'s <a href=#active-document>active
-  document</a> at the time the task was queued.</p>
+  <a href="#script's-document">script's document</a>.</p>
 
   <p>A user agent is required to have one <dfn id=storage-mutex>storage
   mutex</dfn>. This mutex is used to control access to shared state
@@ -58364,10 +58378,11 @@
    to null and abort these steps.</li>
 
    <li><p>Set up the <a href="#script's-global-object">script's global object</a>, the
-   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-url-character-encoding">script's URL
-   character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
-   from <a href=#the-script-settings-determined-from-the-node>the script settings determined from the node</a> on
-   which the attribute is being set.</li>
+   <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-document">script's
+   document</a>, the <a href="#script's-url-character-encoding">script's URL character encoding</a>,
+   and the <a href="#script's-base-url">script's base URL</a> from <a href=#the-script-settings-determined-from-the-node>the script
+   settings determined from the node</a> on which the attribute is
+   being set.</li>
 
    <li><p>Set the corresponding <a href=#event-handlers title="event handlers">event
    handler</a> to the aforementioned function.</li>
@@ -58981,13 +58996,14 @@
 
     <p>Otherwise, if the <a href=#method-context>method context</a> is a
     <code>WorkerUtils</code> object, let <var title="">global
-    object</var>, <var title="">browsing context</var>, <var title="">character encoding</var>, and <var title="">base
-    URL</var> be the <a href="#script's-global-object">script's global object</a>,
-    <a href="#script's-browsing-context">script's browsing context</a>, <a href="#script's-url-character-encoding">script's URL
-    character encoding</a>, and <a href="#script's-base-url">script's base URL</a>
-    (respectively) of the <a href=#concept-script title=concept-script>script</a>
-    that the <span>run a worker</span> algorithm created when it
-    created the <a href=#method-context>method context</a>.</p>
+    object</var>, <var title="">browsing context</var>, <var title="">document</var>, <var title="">character encoding</var>,
+    and <var title="">base URL</var> be the <a href="#script's-global-object">script's global
+    object</a>, <a href="#script's-browsing-context">script's browsing context</a>,
+    <a href="#script's-document">script's document</a>, <a href="#script's-url-character-encoding">script's URL character
+    encoding</a>, and <a href="#script's-base-url">script's base URL</a> (respectively)
+    of the <a href=#concept-script title=concept-script>script</a> that the
+    <span>run a worker</span> algorithm created when it created the
+    <a href=#method-context>method context</a>.</p>
 
     <p>Otherwise, act as described in the specification that defines
     that the <code><a href=#windowtimers>WindowTimers</a></code> interface is implemented by
@@ -58996,13 +59012,7 @@
    </li>
 
    <li><p>Return a <a href=#concept-task title=concept-task>task</a> that checks
-   if the entry for <var title="">handle</var> in <var title="">list</var>
-   has been cleared, and if it has not, <a href=#create-a-script title="create a
-   script">creates a script</a> using <var title="">script
-   source</var> as the script source, <var title="">scripting
-   language</var> as the scripting language, <var title="">global
-   object</var> as the global object, <var title="">browsing
-   context</var> as the browsing context, <var title="">character
+   if the entry for <var title="">handle</var> in <var title="">list</var> has been cleared, and if it has not, <a href=#create-a-script title="create a script">creates a script</a> using <var title="">script source</var> as the script source, <var title="">scripting language</var> as the scripting language, <var title="">global object</var> as the global object, <var title="">browsing context</var> as the browsing context, <var title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var title="">base URL</var> as the base URL.</li>
 
   </ol><p>When the above methods are to <dfn id=get-the-timeout>get the timeout</dfn>, they
@@ -64073,9 +64083,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code><a href=#document>Document</a></code> of the <code><a href=#window>Window</a></code> object on which
     the method was invoked does not have the <a href=#same-origin>same origin</a>
-    as the <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a>'s <a href=#active-document>active document</a>,
-    then abort these steps silently.</p>
+    as the <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+    document">document</a>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <a href=#absolute-url>absolute URL</a>, and the <code><a href=#document>Document</a></code> of the
@@ -64190,9 +64199,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code><a href=#document>Document</a></code> of the <code><a href=#window>Window</a></code> object on which
     the method was invoked does not have the <a href=#same-origin>same origin</a>
-    as the <a href=#entry-script>entry script</a>'s <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a>'s <a href=#active-document>active document</a>,
-    then abort these steps silently.</p>
+    as the <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
+    document">document</a>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <a href=#absolute-url>absolute URL</a>, and the <code><a href=#document>Document</a></code> of the

Modified: source
===================================================================
--- source	2010-02-22 23:54:26 UTC (rev 4788)
+++ source	2010-02-23 01:53:06 UTC (rev 4789)
@@ -4781,9 +4781,8 @@
 
      <dt>When fetching resources in response to a call to an API</dt>
 
-     <dd>The <span>active document</span> of the <span title="script's
-     browsing context">browsing context</span> of the <span>entry
-     script</span>.</dd>
+     <dd>The <span>entry script</span>'s <span title="script's
+     document">document</span>.</dd>
 
     </dl>
 
@@ -6573,8 +6572,7 @@
   or <code
   title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument()</code>
   APIs, <span>the document's address</span> is the same as <span>the
-  document's address</span> of the <span>active document</span> of the
-  <span>script's browsing context</span>.</p>
+  document's address</span> of the <span>script's document</span>.</p>
 
   <p><code>Document</code> objects are assumed to be <dfn>XML
   documents</dfn> unless they are flagged as being <dfn>HTML
@@ -10259,9 +10257,9 @@
    UTF-16.</p></li>
 
    <li><p>Change <span>the document's address</span> to the
-   <span>entry script</span>'s <span title="script's browsing
-   context">browsing context</span>'s <span>active document</span>'s
-   <span title="the document's address">address</span>.</p></li>
+   <span>entry script</span>'s <span title="script's
+   document">document</span>'s <span title="the document's
+   address">address</span>.</p></li>
 
    <li><p>Create a new <span>HTML parser</span> and associate it with
    the document. This is a <dfn>script-created parser</dfn> (meaning
@@ -59562,6 +59560,11 @@
   <span title="view">views</span> and their <code>AbstractView</code>
   objects.</p>
 
+  <p>Each <span title="concept-script">script</span> has a strong
+  reference to its <span title="script's browsing context">browsing
+  context</span> and its <span title="script's
+  document">document</span>.</p>
+
   <p>When a <span>browsing context</span> is to <dfn>discard a
   <code>Document</code></dfn>, the user agent must run the following
   steps:</p>
@@ -60715,11 +60718,11 @@
 
      <li>If the <span>origin</span> of the resulting <span>absolute
      URL</span> is not the same as the <span>origin</span> of the
-     <span>entry script</span>'s <span title="script's browsing
-     context">browsing context</span>'s <span>active document</span>,
-     and either the <span title="url-path"><path></span> or
-     <span title="url-query"><query></span> components of the
-     two <span title="URL">URLs</span> compared in the previous step
+     <span>entry script</span>'s <span title="script's
+     document">document</span>, and either the <span
+     title="url-path"><path></span> or <span
+     title="url-query"><query></span> components of the two
+     <span title="URL">URLs</span> compared in the previous step
      differ, raise a <code>SECURITY_ERR</code> exception and abort
      these steps. (This prevents sandboxed content from spoofing other
      pages on the same origin.)</li>
@@ -65229,6 +65232,21 @@
 
    </dd>
 
+   <dt>A relationship with the <dfn>script's document</dfn></dt>
+
+   <dd>
+
+    <p>A <code>Document</code> that is assigned responsibility for
+    actions taken by the script.</p>
+
+    <p class="example">When a script <span
+    title="fetch">fetches</span> a resource, the <span title="the
+    document's current address">current address</span> of the
+    <span>script's document</span> will be used to set the <code
+    title="http-referer">Referer</code> (sic) header.</p>
+
+   </dd>
+
    <dt>A <dfn title="script's URL character encoding">URL character encoding</dfn></dt>
 
    <dd>
@@ -65325,9 +65343,10 @@
    entry-point</i> is the entry-point for that code.</p></li>
 
    <li><p>Set up the <span>script's global object</span>, the
-   <span>script's browsing context</span>, the <span>script's URL
-   character encoding</span>, and the <span>script's base URL</span>
-   from the settings passed to this algorithm.</p></li>
+   <span>script's browsing context</span>, the <span>script's
+   document</span>, the <span>script's URL character encoding</span>,
+   and the <span>script's base URL</span> from the settings passed to
+   this algorithm.</p></li>
 
    <li><p><span title="jump to a code entry-point">Jump</span> to the
    <span title="concept-script">script</span>'s <i>initial code
@@ -65524,8 +65543,7 @@
   context</span>'s <span>active document</span> at the time the task
   was queued; if the task was queued by or for a <span
   title="concept-script">script</span> then the document is the
-  <span>script's browsing context</span>'s <span>active
-  document</span> at the time the task was queued.</p>
+  <span>script's document</span>.</p>
 
   <p>A user agent is required to have one <dfn>storage
   mutex</dfn>. This mutex is used to control access to shared state
@@ -66016,10 +66034,11 @@
    to null and abort these steps.</p></li>
 
    <li><p>Set up the <span>script's global object</span>, the
-   <span>script's browsing context</span>, the <span>script's URL
-   character encoding</span>, and the <span>script's base URL</span>
-   from <span>the script settings determined from the node</span> on
-   which the attribute is being set.</p></li>
+   <span>script's browsing context</span>, the <span>script's
+   document</span>, the <span>script's URL character encoding</span>,
+   and the <span>script's base URL</span> from <span>the script
+   settings determined from the node</span> on which the attribute is
+   being set.</p></li>
 
    <li><p>Set the corresponding <span title="event handlers">event
    handler</span> to the aforementioned function.</p></li>
@@ -66745,13 +66764,14 @@
     <p>Otherwise, if the <span>method context</span> is a
     <code>WorkerUtils</code> object, let <var title="">global
     object</var>, <var title="">browsing context</var>, <var
-    title="">character encoding</var>, and <var title="">base
-    URL</var> be the <span>script's global object</span>,
-    <span>script's browsing context</span>, <span>script's URL
-    character encoding</span>, and <span>script's base URL</span>
-    (respectively) of the <span title="concept-script">script</span>
-    that the <span>run a worker</span> algorithm created when it
-    created the <span>method context</span>.</p>
+    title="">document</var>, <var title="">character encoding</var>,
+    and <var title="">base URL</var> be the <span>script's global
+    object</span>, <span>script's browsing context</span>,
+    <span>script's document</span>, <span>script's URL character
+    encoding</span>, and <span>script's base URL</span> (respectively)
+    of the <span title="concept-script">script</span> that the
+    <span>run a worker</span> algorithm created when it created the
+    <span>method context</span>.</p>
 
     <p>Otherwise, act as described in the specification that defines
     that the <code>WindowTimers</code> interface is implemented by
@@ -66760,13 +66780,14 @@
    </li>
 
    <li><p>Return a <span title="concept-task">task</span> that checks
-   if the entry for <var title="">handle</var> in <var title="">list</var>
-   has been cleared, and if it has not, <span title="create a
-   script">creates a script</span> using <var title="">script
-   source</var> as the script source, <var title="">scripting
-   language</var> as the scripting language, <var title="">global
-   object</var> as the global object, <var title="">browsing
-   context</var> as the browsing context, <var title="">character
+   if the entry for <var title="">handle</var> in <var
+   title="">list</var> has been cleared, and if it has not, <span
+   title="create a script">creates a script</span> using <var
+   title="">script source</var> as the script source, <var
+   title="">scripting language</var> as the scripting language, <var
+   title="">global object</var> as the global object, <var
+   title="">browsing context</var> as the browsing context, <var
+   title="">document</var> as the document, <var title="">character
    encoding</var> as the URL character encoding, and <var
    title="">base URL</var> as the base URL.</p></li>
 
@@ -72921,10 +72942,12 @@
   <h4>Processing model</h4>
 
   <p>When a user agent is to <dfn>run a worker</dfn> for a script with
-  <span>URL</span> <var title="">url</var>, a browsing context <var
-  title="">owner browsing context</var>, an origin <var title="">owner
-  origin</var>, and with global scope <var title="">worker global
-  scope</var>, it must run the following steps:</p>
+  <span>URL</span> <var title="">url</var>, a <span>browsing
+  context</span> <var title="">owner browsing context</var>, a
+  <code>Document</code> <var title="">owner document</var>, an
+  <span>origin</span> <var title="">owner origin</var>, and with
+  global scope <var title="">worker global scope</var>, it must run
+  the following steps:</p>
 
   <ol>
 
@@ -72998,6 +73021,9 @@
     <p>Set the <span>script's browsing context</span> to <var
     title="">owner browsing context</var>.</p>
 
+    <p>Set the <span>script's document</span> to <var title="">owner
+    document</var>.</p>
+
     <p>Set the <span>script's URL character encoding</span> to
     UTF-8. (This is just used for encoding non-ASCII characters in the
     query component of URLs.)</p>
@@ -73484,7 +73510,9 @@
     <p><span>Run a worker</span> for the resulting <span>absolute
     URL</span>, with the <span>script's browsing context</span> of the
     script that invoked the method as the <var title="">owner browsing
-    context</var>, with the <span>origin</span> of the <span>entry
+    context</var>, with the <span>script's document</span> of the
+    script that invoked the method as the <var title="">owner
+    document</var>, with the <span>origin</span> of the <span>entry
     script</span> as the <var title="">owner origin</var>, and with
     <var title="">worker global scope</var> as the global scope.</p>
 
@@ -73730,7 +73758,9 @@
     <p><span>Run a worker</span> for <var title="">scriptURL</var>,
     with the <span>script's browsing context</span> of the script that
     invoked the method as the <var title="">owner browsing
-    context</var>, with the <span>origin</span> of the <span>entry
+    context</var>, with the <span>script's document</span> of the
+    script that invoked the method as the <var title="">owner
+    document</var>, with the <span>origin</span> of the <span>entry
     script</span> as the <var title="">owner origin</var>, and with
     <var title="">worker global scope</var> as the global scope.</p>
 
@@ -77645,9 +77675,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code>Document</code> of the <code>Window</code> object on which
     the method was invoked does not have the <span>same origin</span>
-    as the <span>entry script</span>'s <span title="script's browsing
-    context">browsing context</span>'s <span>active document</span>,
-    then abort these steps silently.</p>
+    as the <span>entry script</span>'s <span title="script's
+    document">document</span>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <span>absolute URL</span>, and the <code>Document</code> of the
@@ -77783,9 +77812,8 @@
     literal U+002F SOLIDUS character (/), and the
     <code>Document</code> of the <code>Window</code> object on which
     the method was invoked does not have the <span>same origin</span>
-    as the <span>entry script</span>'s <span title="script's browsing
-    context">browsing context</span>'s <span>active document</span>,
-    then abort these steps silently.</p>
+    as the <span>entry script</span>'s <span title="script's
+    document">document</span>, then abort these steps silently.</p>
 
     <p>Otherwise, if the <var title="">targetOrigin</var> argument is
     an <span>absolute URL</span>, and the <code>Document</code> of the




More information about the Commit-Watchers mailing list