[html5] r5701 - [giow] (0) Update localStorage to handle regrafting nested browsing contexts

whatwg at whatwg.org whatwg at whatwg.org
Fri Dec 3 17:32:38 PST 2010


Author: ianh
Date: 2010-12-03 17:32:37 -0800 (Fri, 03 Dec 2010)
New Revision: 5701

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Update localStorage to handle regrafting nested browsing contexts

Modified: complete.html
===================================================================
--- complete.html	2010-12-03 23:54:20 UTC (rev 5700)
+++ complete.html	2010-12-04 01:32:37 UTC (rev 5701)
@@ -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 — 3 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 4 December 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>-->
@@ -56965,8 +56965,10 @@
   <a href=#browsing-context>browsing context</a> <var title="">b</var> must return the
   <code><a href=#windowproxy>WindowProxy</a></code> object of its <a href=#top-level-browsing-context>top-level browsing
   context</a> (which would be its own <code><a href=#windowproxy>WindowProxy</a></code>
-  object if it was a <a href=#top-level-browsing-context>top-level browsing context</a>
-  itself).</p>
+  object if it was a <a href=#top-level-browsing-context>top-level browsing context</a> itself),
+  if it has one, or its own <code><a href=#windowproxy>WindowProxy</a></code> object otherwise
+  (e.g. if it was a detached <a href=#nested-browsing-context>nested browsing
+  context</a>).</p>
 
   <p>The <dfn id=dom-parent title=dom-parent><code>parent</code></dfn> IDL
   attribute on the <code><a href=#window>Window</a></code> object of a
@@ -56975,7 +56977,8 @@
   <var title="">b</var> is a <a href=#child-browsing-context>child browsing context</a>), or
   the <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context>browsing
   context</a> <var title="">b</var> itself, otherwise (i.e. if it
-  is a <a href=#top-level-browsing-context>top-level browsing context</a>).</p>
+  is a <a href=#top-level-browsing-context>top-level browsing context</a> or a detached
+  <a href=#nested-browsing-context>nested browsing context</a>).</p>
 
   <p>The <dfn id=dom-frameelement title=dom-frameElement><code>frameElement</code></dfn>
   IDL attribute on the <code><a href=#window>Window</a></code> object of a
@@ -56983,11 +56986,11 @@
   the following algorithm:</p>
 
   <ol><li><p>If <var title="">d</var> is not a <code><a href=#document>Document</a></code> in a
-   <a href=#child-browsing-context>child browsing context</a>, return null and abort these
+   <a href=#nested-browsing-context>nested browsing context</a>, return null and abort these
    steps.</li>
 
-   <li><p>If the <a href=#parent-browsing-context>parent browsing context</a>'s <a href=#active-document>active
-   document</a> does not have the <a href=#same-origin title="same
+   <li><p>If the <a href=#browsing-context-container>browsing context container</a>'s
+   <code><a href=#document>Document</a></code> does not have the <a href=#same-origin title="same
    origin">same</a> <a href=#effective-script-origin>effective script origin</a> as the
    <a href=#entry-script>entry script</a>, then throw a <code><a href=#security_err>SECURITY_ERR</a></code>
    exception.</li>
@@ -74027,16 +74030,25 @@
   to the lifetime of the actual user agent process itself, as the user
   agent may support resuming sessions after a restart.</p>
 
-  <p>When a new <code><a href=#htmldocument>HTMLDocument</a></code> is created, the user agent
-  must check to see if the document's <a href=#top-level-browsing-context>top-level browsing
-  context</a> has allocated a session storage area for that
-  document's <a href=#origin>origin</a>. If it has not, a new storage area
-  for that document's <a href=#origin>origin</a> must be created.</p>
+  <p>When a new <code><a href=#document>Document</a></code> is created in a <a href=#browsing-context>browsing
+  context</a> which has a <a href=#top-level-browsing-context>top-level browsing context</a>,
+  the user agent must check to see if that <a href=#top-level-browsing-context>top-level browsing
+  context</a> has a session storage area for that document's
+  <a href=#origin>origin</a>. If it does, then that is the
+  <code><a href=#document>Document</a></code>'s assigned session storage area. If it does
+  not, a new storage area for that document's <a href=#origin>origin</a> must
+  be created, and then <em>that</em> is the <code><a href=#document>Document</a></code>'s
+  assigned session storage area. A <code><a href=#document>Document</a></code>'s assigned
+  storage area does not change during the lifetime of a
+  <code><a href=#document>Document</a></code>, even in the case of a <a href=#nested-browsing-context>nested browsing
+  context</a> (e.g. in an <code><a href=#the-iframe-element>iframe</a></code>) being moved to
+  another <a href=#parent-browsing-context>parent browsing context</a>.</p>
 
   <p>The <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code>
-  attribute must return the <code><a href=#storage-0>Storage</a></code> object associated
-  with that session storage area. Each <code><a href=#document>Document</a></code> object
-  must have a separate object for its <code><a href=#window>Window</a></code>'s <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute.</p>
+  attribute must return a <code><a href=#storage-0>Storage</a></code> object associated with
+  the <code><a href=#document>Document</a></code>'s assigned session storage area, if any,
+  or null if there isn't one. Each <code><a href=#document>Document</a></code> object must
+  have a separate object for its <code><a href=#window>Window</a></code>'s <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute.</p>
 
   <p>When a new <a href=#top-level-browsing-context>top-level browsing context</a> is created by
   cloning an existing <a href=#browsing-context>browsing context</a>, the new browsing
@@ -74048,16 +74060,16 @@
   a <a href=#concept-script title=concept-script>script</a> in an existing
   <a href=#browsing-context>browsing context</a>, or by the user following a link in an
   existing browsing context, or in some other way related to a
-  specific <code><a href=#htmldocument>HTMLDocument</a></code>, then the session storage area of
-  the <a href=#origin>origin</a> of that <code><a href=#htmldocument>HTMLDocument</a></code> must be
-  copied into the new browsing context when it is created. From that
-  point on, however, the two session storage areas must be considered
+  specific <code><a href=#document>Document</a></code>, then the session storage area of the
+  <a href=#origin>origin</a> of that <code><a href=#document>Document</a></code> must be copied
+  into the new browsing context when it is created. From that point
+  on, however, the two session storage areas must be considered
   separate, not affecting each other in any way.</p>
 
   <p id=sessionStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
   <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated
   with a session storage area, if the methods did something, then in
-  every <code><a href=#htmldocument>HTMLDocument</a></code> object whose <code><a href=#window>Window</a></code>
+  every <code><a href=#document>Document</a></code> object whose <code><a href=#window>Window</a></code>
   object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code>
   attribute's <code><a href=#storage-0>Storage</a></code> object is associated with the same
   storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.</p>
@@ -74108,7 +74120,7 @@
   </ol><p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
   <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated
   with a local storage area, if the methods did something, then in
-  every <code><a href=#htmldocument>HTMLDocument</a></code> object whose <code><a href=#window>Window</a></code>
+  every <code><a href=#document>Document</a></code> object whose <code><a href=#window>Window</a></code>
   object's <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code>
   attribute's <code><a href=#storage-0>Storage</a></code> object is associated with the same
   storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.</p>

Modified: index
===================================================================
--- index	2010-12-03 23:54:20 UTC (rev 5700)
+++ index	2010-12-04 01:32:37 UTC (rev 5701)
@@ -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 — 3 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 4 December 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>-->
@@ -56946,8 +56946,10 @@
   <a href=#browsing-context>browsing context</a> <var title="">b</var> must return the
   <code><a href=#windowproxy>WindowProxy</a></code> object of its <a href=#top-level-browsing-context>top-level browsing
   context</a> (which would be its own <code><a href=#windowproxy>WindowProxy</a></code>
-  object if it was a <a href=#top-level-browsing-context>top-level browsing context</a>
-  itself).</p>
+  object if it was a <a href=#top-level-browsing-context>top-level browsing context</a> itself),
+  if it has one, or its own <code><a href=#windowproxy>WindowProxy</a></code> object otherwise
+  (e.g. if it was a detached <a href=#nested-browsing-context>nested browsing
+  context</a>).</p>
 
   <p>The <dfn id=dom-parent title=dom-parent><code>parent</code></dfn> IDL
   attribute on the <code><a href=#window>Window</a></code> object of a
@@ -56956,7 +56958,8 @@
   <var title="">b</var> is a <a href=#child-browsing-context>child browsing context</a>), or
   the <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context>browsing
   context</a> <var title="">b</var> itself, otherwise (i.e. if it
-  is a <a href=#top-level-browsing-context>top-level browsing context</a>).</p>
+  is a <a href=#top-level-browsing-context>top-level browsing context</a> or a detached
+  <a href=#nested-browsing-context>nested browsing context</a>).</p>
 
   <p>The <dfn id=dom-frameelement title=dom-frameElement><code>frameElement</code></dfn>
   IDL attribute on the <code><a href=#window>Window</a></code> object of a
@@ -56964,11 +56967,11 @@
   the following algorithm:</p>
 
   <ol><li><p>If <var title="">d</var> is not a <code><a href=#document>Document</a></code> in a
-   <a href=#child-browsing-context>child browsing context</a>, return null and abort these
+   <a href=#nested-browsing-context>nested browsing context</a>, return null and abort these
    steps.</li>
 
-   <li><p>If the <a href=#parent-browsing-context>parent browsing context</a>'s <a href=#active-document>active
-   document</a> does not have the <a href=#same-origin title="same
+   <li><p>If the <a href=#browsing-context-container>browsing context container</a>'s
+   <code><a href=#document>Document</a></code> does not have the <a href=#same-origin title="same
    origin">same</a> <a href=#effective-script-origin>effective script origin</a> as the
    <a href=#entry-script>entry script</a>, then throw a <code><a href=#security_err>SECURITY_ERR</a></code>
    exception.</li>

Modified: source
===================================================================
--- source	2010-12-03 23:54:20 UTC (rev 5700)
+++ source	2010-12-04 01:32:37 UTC (rev 5701)
@@ -64724,8 +64724,10 @@
   <span>browsing context</span> <var title="">b</var> must return the
   <code>WindowProxy</code> object of its <span>top-level browsing
   context</span> (which would be its own <code>WindowProxy</code>
-  object if it was a <span>top-level browsing context</span>
-  itself).</p>
+  object if it was a <span>top-level browsing context</span> itself),
+  if it has one, or its own <code>WindowProxy</code> object otherwise
+  (e.g. if it was a detached <span>nested browsing
+  context</span>).</p>
 
   <p>The <dfn title="dom-parent"><code>parent</code></dfn> IDL
   attribute on the <code>Window</code> object of a
@@ -64735,7 +64737,8 @@
   <var title="">b</var> is a <span>child browsing context</span>), or
   the <code>WindowProxy</code> object of the <span>browsing
   context</span> <var title="">b</var> itself, otherwise (i.e. if it
-  is a <span>top-level browsing context</span>).</p>
+  is a <span>top-level browsing context</span> or a detached
+  <span>nested browsing context</span>).</p>
 
   <p>The <dfn title="dom-frameElement"><code>frameElement</code></dfn>
   IDL attribute on the <code>Window</code> object of a
@@ -64745,11 +64748,11 @@
   <ol>
 
    <li><p>If <var title="">d</var> is not a <code>Document</code> in a
-   <span>child browsing context</span>, return null and abort these
+   <span>nested browsing context</span>, return null and abort these
    steps.</p></li>
 
-   <li><p>If the <span>parent browsing context</span>'s <span>active
-   document</span> does not have the <span title="same
+   <li><p>If the <span>browsing context container</span>'s
+   <code>Document</code> does not have the <span title="same
    origin">same</span> <span>effective script origin</span> as the
    <span>entry script</span>, then throw a <code>SECURITY_ERR</code>
    exception.</p></li>
@@ -83801,16 +83804,25 @@
   to the lifetime of the actual user agent process itself, as the user
   agent may support resuming sessions after a restart.</p>
 
-  <p>When a new <code>HTMLDocument</code> is created, the user agent
-  must check to see if the document's <span>top-level browsing
-  context</span> has allocated a session storage area for that
-  document's <span>origin</span>. If it has not, a new storage area
-  for that document's <span>origin</span> must be created.</p>
+  <p>When a new <code>Document</code> is created in a <span>browsing
+  context</span> which has a <span>top-level browsing context</span>,
+  the user agent must check to see if that <span>top-level browsing
+  context</span> has a session storage area for that document's
+  <span>origin</span>. If it does, then that is the
+  <code>Document</code>'s assigned session storage area. If it does
+  not, a new storage area for that document's <span>origin</span> must
+  be created, and then <em>that</em> is the <code>Document</code>'s
+  assigned session storage area. A <code>Document</code>'s assigned
+  storage area does not change during the lifetime of a
+  <code>Document</code>, even in the case of a <span>nested browsing
+  context</span> (e.g. in an <code>iframe</code>) being moved to
+  another <span>parent browsing context</span>.</p>
 
   <p>The <code title="dom-sessionStorage">sessionStorage</code>
-  attribute must return the <code>Storage</code> object associated
-  with that session storage area. Each <code>Document</code> object
-  must have a separate object for its <code>Window</code>'s <code
+  attribute must return a <code>Storage</code> object associated with
+  the <code>Document</code>'s assigned session storage area, if any,
+  or null if there isn't one. Each <code>Document</code> object must
+  have a separate object for its <code>Window</code>'s <code
   title="dom-sessionStorage">sessionStorage</code> attribute.</p>
 
   <p>When a new <span>top-level browsing context</span> is created by
@@ -83823,10 +83835,10 @@
   a <span title="concept-script">script</span> in an existing
   <span>browsing context</span>, or by the user following a link in an
   existing browsing context, or in some other way related to a
-  specific <code>HTMLDocument</code>, then the session storage area of
-  the <span>origin</span> of that <code>HTMLDocument</code> must be
-  copied into the new browsing context when it is created. From that
-  point on, however, the two session storage areas must be considered
+  specific <code>Document</code>, then the session storage area of the
+  <span>origin</span> of that <code>Document</code> must be copied
+  into the new browsing context when it is created. From that point
+  on, however, the two session storage areas must be considered
   separate, not affecting each other in any way.</p>
 
   <p id="sessionStorageEvent">When the <code
@@ -83835,7 +83847,7 @@
   title="dom-Storage-clear">clear()</code> methods are called on a
   <code>Storage</code> object <var title="">x</var> that is associated
   with a session storage area, if the methods did something, then in
-  every <code>HTMLDocument</code> object whose <code>Window</code>
+  every <code>Document</code> object whose <code>Window</code>
   object's <code title="dom-sessionStorage">sessionStorage</code>
   attribute's <code>Storage</code> object is associated with the same
   storage area, other than <var title="">x</var>, a <code
@@ -83896,7 +83908,7 @@
   title="dom-Storage-clear">clear()</code> methods are called on a
   <code>Storage</code> object <var title="">x</var> that is associated
   with a local storage area, if the methods did something, then in
-  every <code>HTMLDocument</code> object whose <code>Window</code>
+  every <code>Document</code> object whose <code>Window</code>
   object's <code title="dom-localStorage">localStorage</code>
   attribute's <code>Storage</code> object is associated with the same
   storage area, other than <var title="">x</var>, a <code




More information about the Commit-Watchers mailing list