Try to specify the occasional reuse of Window objects when navigating away from about:blank initial docs to docs in the same origin. (credit: bz, sw) (whatwg r3351)

Try to specify the occasional reuse of Window objects when navigating
away from about:blank initial docs to docs in the same origin. (credit:
bz, sw) (whatwg r3351)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2488&r2=1.2489&f=h
http://html5.org/tools/web-apps-tracker?from=3350&to=3351

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2488
retrieving revision 1.2489
diff -u -d -r1.2488 -r1.2489
--- Overview.html 1 Jul 2009 21:38:53 -0000 1.2488
+++ Overview.html 1 Jul 2009 22:08:27 -0000 1.2489
@@ -40739,16 +40739,24 @@
   everything to the <a href="#active-document">active document</a>'s <a href="#default-view">default
   view</a>'s <code><a href="#window">Window</a></code> object.<div class="impl">
 
-  <p>The <code title="">defaultView</code> attribute on the
-  <code>Document</code> object's <code>DocumentView</code> interface
-  must return the <a href="#browsing-context">browsing context</a>'s
-  <code><a href="#windowproxy">WindowProxy</a></code> object, not the actual
+  <p>The <code title="dom-document-defaultView">defaultView</code>
+  attribute on the <code>Document</code> object's
+  <code>DocumentView</code> interface must return the <a href="#browsing-context">browsing
+  context</a>'s <code><a href="#windowproxy">WindowProxy</a></code> object, not the actual
   <code>AbstractView</code> object of the <a href="#default-view">default
   view</a>. <a href="#references">[DOM3VIEWS]</a></p>
 
-  </div><p class="note">The <code title="">document</code> attribute of an
-  <code>AbstractView</code> object representing a <a href="#view">view</a>
-  gives the view's corresponding <code>Document</code> object. <a href="#references">[DOM2VIEWS]</a><div class="impl">
+  </div><p class="note">The <code title="dom-document">document</code>
+  attribute of an <code>AbstractView</code> object representing a
+  <a href="#view">view</a> gives the view's corresponding
+  <code>Document</code> object. <a href="#references">[DOM2VIEWS]</a><p class="note">In general, there is a 1-to-1 mapping from the
+  <code><a href="#window">Window</a></code> object to the <code>Document</code> object. In
+  one particular case, a set of <a href="#view" title="view">views</a> can be
+  reused for the presentation of a second <code>Document</code> in the
+  same <a href="#browsing-context">browsing context</a>, such that the mapping is then
+  2:1. This occurs when a <a href="#browsing-context">browsing context</a> is <a href="#navigate" title="navigate">navigated</a> from the initial
+  <code><a href="#about:blank">about:blank</a></code> <code>Document</code> to another, with
+  <a href="#replacement-enabled">replacement enabled</a>.<div class="impl">
 
   <p>Events that use the <code>UIEvent</code> interface are related to
   a specific <a href="#view">view</a> (the view in which the event happened);
@@ -41528,8 +41536,10 @@
 
   <p class="note">The <a href="#browsing-context">browsing context</a>'s <a href="#default-view">default
   view</a>'s <code><a href="#window">Window</a></code> object <a href="#implied-strong-reference" title="implied strong
-  reference">has a strong reference of its own</a> to its
-  <code>Document</code> object.</p>
+  reference">has a strong reference</a> to its
+  <code>Document</code> object through the <code title="dom-document">document</code> attribute of the
+  <code>AbstractView</code> interface. Thus, references from other
+  scripts to either of those objects will keep both alive. <a href="#references">[DOMVIEWS]</a></p>
 
   <p class="note">Whenever a <code>Document</code> object is <a href="#discard-a-document" title="discard a Document">discarded</a>, it is also removed from
   the list of <span>the worker's <code>Document</code>s</span> of each
@@ -46641,6 +46651,22 @@
     is set when <a href="#concept-js-deref" title="concept-js-deref">dereferencing a
     <code>javascript:</code> URL</a>.</p>
 
+    <p><dfn id="create-a-document-object" title="create a Document object">Creating a new
+    <code>Document</code> object</dfn>: When a <code>Document</code>
+    is created as part of the above steps, a new set of <a href="#view" title="view">views</a> along with the associated
+    <code><a href="#window">Window</a></code> object must be created and associated with the
+    <code>Document</code>, with one exception: if the <a href="#browsing-context">browsing
+    context</a>'s only entry in its <a href="#session-history">session history</a> is
+    the <code><a href="#about:blank">about:blank</a></code> <code>Document</code> that was added
+    when the <a href="#browsing-context">browsing context</a> was created, and navigation
+    is occurring with <a href="#replacement-enabled">replacement enabled</a>, and that
+    <code>Document</code> has the <a href="#same-origin">same origin</a> as the new
+    <code>Document</code>, then the <code><a href="#window">Window</a></code> object and
+    associated <a href="#view" title="view">views</a> of that
+    <code>Document</code> must be used instead, and the <code title="dom-document">document</code> attribute of the
+    <code>AbstractView</code> objects of those <a href="#view" title="view">views</a> must be changed to point to the new
+    <code>Document</code> instead.</p>
+
    </li>
 
    <li id="navigate-non-Document">
@@ -46746,11 +46772,11 @@
   <h4 id="read-html"><span class="secno">6.11.2 </span><dfn title="navigate-html">Page load processing model for HTML files</dfn></h4>
 
   <p>When an HTML document is to be loaded in a <a href="#browsing-context">browsing
-  context</a>, the user agent must create a <code>Document</code>
-  object, mark it as being an <a href="#html-documents" title="HTML documents">HTML
-  document</a>, create an <a href="#html-parser">HTML parser</a>, associate it
-  with the document, and begin to use the bytes provided for the
-  document as the <a href="#the-input-stream">input stream</a> for that parser.</p>
+  context</a>, the user agent must <a href="#create-a-document-object">create a
+  <code>Document</code> object</a>, mark it as being an <a href="#html-documents" title="HTML documents">HTML document</a>, create an <a href="#html-parser">HTML
+  parser</a>, associate it with the document, and begin to use the
+  bytes provided for the document as the <a href="#the-input-stream">input stream</a> for
+  that parser.</p>
 
   <p class="note">The <a href="#the-input-stream">input stream</a> converts bytes into
   characters for use in the <a href="#tokenization" title="tokenization">tokenizer</a>. This process relies, in part,
@@ -46778,9 +46804,9 @@
   <h4 id="read-xml"><span class="secno">6.11.3 </span><dfn title="navigate-xml">Page load processing model for XML files</dfn></h4>
 
   <p>When faced with displaying an XML file inline, user agents must
-  first create a <code>Document</code> object, following the
-  requirements of the XML and Namespaces in XML recommendations, RFC
-  3023, DOM3 Core, and other relevant specifications. <a href="#references">[XML]</a> <a href="#references">[XMLNS]</a> <a href="#references">[RFC3023]</a> <a href="#references">[DOM3CORE]</a></p>
+  first <a href="#create-a-document-object">create a <code>Document</code> object</a>, following
+  the requirements of the XML and Namespaces in XML recommendations,
+  RFC 3023, DOM3 Core, and other relevant specifications. <a href="#references">[XML]</a> <a href="#references">[XMLNS]</a> <a href="#references">[RFC3023]</a> <a href="#references">[DOM3CORE]</a></p>
 
   <p>The actual HTTP headers and other metadata, not the headers as
   mutated or implied by the algorithms given in this specification,
@@ -46832,14 +46858,13 @@
   <h4 id="read-text"><span class="secno">6.11.4 </span><dfn title="navigate-text">Page load processing model for text files</dfn></h4>
 
   <p>When a plain text document is to be loaded in a <a href="#browsing-context">browsing
-  context</a>, the user agent should create a <code>Document</code>
-  object, mark it as being an <a href="#html-documents" title="HTML documents">HTML
-  document</a>, create an <a href="#html-parser">HTML parser</a>, associate it
-  with the document, act as if the tokenizer had emitted a start tag
-  token with the tag name "pre", set the <a href="#tokenization">tokenization</a>
-  stage's <a href="#content-model-flag">content model flag</a> to <i>PLAINTEXT</i>, and
-  begin to pass the stream of characters in the plain text document to
-  that tokenizer.</p>
+  context</a>, the user agent should <a href="#create-a-document-object">create a
+  <code>Document</code> object</a>, mark it as being an <a href="#html-documents" title="HTML documents">HTML document</a>, create an <a href="#html-parser">HTML
+  parser</a>, associate it with the document, act as if the
+  tokenizer had emitted a start tag token with the tag name "pre", set
+  the <a href="#tokenization">tokenization</a> stage's <a href="#content-model-flag">content model
+  flag</a> to <i>PLAINTEXT</i>, and begin to pass the stream of
+  characters in the plain text document to that tokenizer.</p>
 
   <p>The rules for how to convert the bytes of the plain text document
   into actual characters are defined in RFC 2046, RFC 2646, and
@@ -46874,14 +46899,13 @@
   <h4 id="read-image"><span class="secno">6.11.5 </span><dfn title="navigate-image">Page load processing model for images</dfn></h4>
 
   <p>When an image resource is to be loaded in a <a href="#browsing-context">browsing
-  context</a>, the user agent should create a <code>Document</code>
-  object, mark it as being an <a href="#html-documents" title="HTML documents">HTML
-  document</a>, append an <code><a href="#the-html-element">html</a></code> element to the
-  <code>Document</code>, append a <code><a href="#the-head-element">head</a></code> element and a
-  <code><a href="#the-body-element">body</a></code> element to the <code><a href="#the-html-element">html</a></code> element, append
-  an <code><a href="#the-img-element">img</a></code> to the <code><a href="#the-body-element">body</a></code> element, and set the
-  <code title="attr-img-src"><a href="#attr-img-src">src</a></code> attribute of the
-  <code><a href="#the-img-element">img</a></code> element to the address of the image.</p>
+  context</a>, the user agent should <a href="#create-a-document-object">create a
+  <code>Document</code> object</a>, mark it as being an <a href="#html-documents" title="HTML documents">HTML document</a>, append an
+  <code><a href="#the-html-element">html</a></code> element to the <code>Document</code>, append a
+  <code><a href="#the-head-element">head</a></code> element and a <code><a href="#the-body-element">body</a></code> element to the
+  <code><a href="#the-html-element">html</a></code> element, append an <code><a href="#the-img-element">img</a></code> to the
+  <code><a href="#the-body-element">body</a></code> element, and set the <code title="attr-img-src"><a href="#attr-img-src">src</a></code> attribute of the <code><a href="#the-img-element">img</a></code>
+  element to the address of the image.</p>
 
   <!-- next three paragraphs are similar to the navigate-text section,
   keep them in sync -->
@@ -46908,12 +46932,12 @@
 
   <p>When a resource that requires an external resource to be rendered
   is to be loaded in a <a href="#browsing-context">browsing context</a>, the user agent
-  should create a <code>Document</code> object, mark it as being an
-  <a href="#html-documents" title="HTML documents">HTML document</a>, append an
-  <code><a href="#the-html-element">html</a></code> element to the <code>Document</code>, append a
-  <code><a href="#the-head-element">head</a></code> element and a <code><a href="#the-body-element">body</a></code> element to the
-  <code><a href="#the-html-element">html</a></code> element, append an <code><a href="#the-embed-element">embed</a></code> to the
-  <code><a href="#the-body-element">body</a></code> element, and set the <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute of the
+  should <a href="#create-a-document-object">create a <code>Document</code> object</a>, mark it
+  as being an <a href="#html-documents" title="HTML documents">HTML document</a>,
+  append an <code><a href="#the-html-element">html</a></code> element to the <code>Document</code>,
+  append a <code><a href="#the-head-element">head</a></code> element and a <code><a href="#the-body-element">body</a></code> element
+  to the <code><a href="#the-html-element">html</a></code> element, append an <code><a href="#the-embed-element">embed</a></code> to
+  the <code><a href="#the-body-element">body</a></code> element, and set the <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute of the
   <code><a href="#the-embed-element">embed</a></code> element to the address of the resource.</p>
 
   <!-- next three paragraphs are similar to the navigate-text section,
@@ -46944,13 +46968,12 @@
   <h4 id="read-ua-inline"><span class="secno">6.11.7 </span><dfn title="navigate-ua-inline">Page load processing model for inline content that doesn't have a DOM</dfn></h4>
 
   <p>When the user agent is to display a user agent page inline in a
-  <a href="#browsing-context">browsing context</a>, the user agent should create a
-  <code>Document</code> object, mark it as being an <a href="#html-documents" title="HTML
-  documents">HTML document</a>, and then either associate that
-  <code>Document</code> with a custom rendering that is not rendered
-  using the normal <code>Document</code> rendering rules, or mutate
-  that <code>Document</code> until it represents the content the user
-  agent wants to render.</p>
+  <a href="#browsing-context">browsing context</a>, the user agent should <a href="#create-a-document-object">create a
+  <code>Document</code> object</a>, mark it as being an <a href="#html-documents" title="HTML documents">HTML document</a>, and then either
+  associate that <code>Document</code> with a custom rendering that is
+  not rendered using the normal <code>Document</code> rendering rules,
+  or mutate that <code>Document</code> until it represents the content
+  the user agent wants to render.</p>
 
   <!-- next two paragraphs are similar to the navigate-text section,
   keep them in sync -->
@@ -49788,8 +49811,8 @@
   all use the <code><a href="#dragevent">DragEvent</a></code> interface.<pre class="idl">interface <dfn id="dragevent">DragEvent</dfn> : MouseEvent {
   readonly attribute <a href="#datatransfer">DataTransfer</a> <a href="#dom-dragevent-datatransfer" title="dom-DragEvent-dataTransfer">dataTransfer</a>;
 
-  void <a href="#dom-dragevent-initdragevent" title="dom-DragEvent-initDragEvent">initDragEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in AbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in <a href="#datatransfer">DataTransfer</a> dataTransferArg);
-  void <a href="#dom-dragevent-initdrageventns" title="dom-DragEvent-initDragEventNS">initDragEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in AbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DOMString modifiersListArg, in <a href="#datatransfer">DataTransfer</a> dataTransferArg);
+  void <a href="#dom-dragevent-initdragevent" title="dom-DragEvent-initDragEvent">initDragEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <span>AbstractView</span> viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in <a href="#datatransfer">DataTransfer</a> dataTransferArg);
+  void <a href="#dom-dragevent-initdrageventns" title="dom-DragEvent-initDragEventNS">initDragEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <span>AbstractView</span> viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in unsigned short buttonArg, in EventTarget relatedTargetArg, in DOMString modifiersListArg, in <a href="#datatransfer">DataTransfer</a> dataTransferArg);
 };</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-DragEvent-dataTransfer"><a href="#dom-dragevent-datatransfer">dataTransfer</a></code></dt>
 
    <dd>

Received on Wednesday, 1 July 2009 22:09:27 UTC