Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (2) 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)

git-svn-id: http://svn.whatwg.org/webapps@3351 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 1, 2009
1 parent f438cea commit 7d92781
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 96 deletions.
121 changes: 73 additions & 48 deletions index
Expand Up @@ -45380,18 +45380,28 @@ document.body.appendChild(outer);</pre>

<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=#refsDOM3VIEWS>[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=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>
<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=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>

<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>.</p>

<div class=impl>

Expand Down Expand Up @@ -46279,8 +46289,10 @@ interface <dfn id=window>Window</dfn> {

<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=#refsDOMVIEWS>[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
Expand Down Expand Up @@ -51757,6 +51769,22 @@ style/default.css</pre>
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>
Expand Down Expand Up @@ -51862,11 +51890,11 @@ style/default.css</pre>
<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,
Expand Down Expand Up @@ -51894,9 +51922,9 @@ style/default.css</pre>
<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=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsRFC3023>[RFC3023]</a> <a href=#refsDOM3CORE>[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=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsRFC3023>[RFC3023]</a> <a href=#refsDOM3CORE>[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,
Expand Down Expand Up @@ -51948,14 +51976,13 @@ style/default.css</pre>
<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
Expand Down Expand Up @@ -51990,14 +52017,13 @@ style/default.css</pre>
<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 -->
Expand All @@ -52024,12 +52050,12 @@ style/default.css</pre>

<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,
Expand Down Expand Up @@ -52060,13 +52086,12 @@ style/default.css</pre>
<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 -->
Expand Down Expand Up @@ -55480,8 +55505,8 @@ style/default.css</pre>
<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>
Expand Down

0 comments on commit 7d92781

Please sign in to comment.