Skip to content

Commit

Permalink
[] (0) Fix the navigation and history traversal algorithms so that th…
Browse files Browse the repository at this point in the history
…e back button doesn't lock up the browser if the Document was evicted

git-svn-id: http://svn.whatwg.org/webapps@756 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 19, 2007
1 parent f794551 commit 08d58b5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 45 deletions.
44 changes: 24 additions & 20 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<h1 id=web-applications>Web Applications 1.0</h1>

<h2 class="no-num no-toc" id=working>Working Draft &mdash; 18 April 2007</h2>
<h2 class="no-num no-toc" id=working>Working Draft &mdash; 19 April 2007</h2>

<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
Expand Down Expand Up @@ -22904,7 +22904,7 @@ XXX selection ranges -->
<a href="#browsing0">browsing context</a> to the URI given in <var
title="">url</var>. If the <var title="">replace</var> is true, then <a
href="#replacement" title="replacement enabled">replacement must be
enabled</a>.
enabled</a>; otherwise, it must not be enabled.

<h4 id=accessing><span class=secno>4.2.3. </span>Accessing other browsing
contexts</h4>
Expand Down Expand Up @@ -23050,6 +23050,14 @@ XXX selection ranges -->
act as follows:

<ol>
<li>If there is no longer a <code>Document</code> object for the entry in
question, the user agent must <a href="#navigate">navigate</a> the
browsing context to the location for that entry to preform an <a
href="#entry">entry update</a> of that entry, and abort these steps. The
"<a href="#navigate">navigate</a>" algorithm reinvokes this "traverse"
algorithm to complete the traversal, at which point there <em>is</em> a
<code>Document</code> object and so this step gets skipped.

<li>
<p>If appropriate, update the <a href="#current0">current entry</a> in
the <a href="#browsing0">browsing context</a>'s <code>Document</code>
Expand Down Expand Up @@ -23083,11 +23091,7 @@ XXX selection ranges -->

<li>The user agent must make the specified entry's <code>Document</code>
object the <a href="#active">active document</a> of the <a
href="#browsing0">browsing context</a>. If there is no
<code>Document</code> object for the entry in question, the user agent
must <a href="#navigate">navigate</a> the browsing context to the
location for that entry, with <a href="#replacement">replacement
enabled</a>.
href="#browsing0">browsing context</a>.

<li>The user agent must move any properties that have been added to the
<a href="#active">active document</a>'s <code>Document<code>'s <a
Expand Down Expand Up @@ -24716,20 +24720,19 @@ at the first element with the given ID must be treated as if it was cloned and r
occur atomically.

<dl>
<dt>If the navigation was initiated with <dfn id=replacement>replacement
enabled</dfn>
<dt>If the navigation was initiated for <dfn id=entry>entry update</dfn>
of an entry

<dd>
<ol>
<li>
<p>Remove any entries preceding or following the <a
href="#current0">current entry</a> in the <a href="#session">session
history</a> that share the same <code>Document</code>.
<p>Replace the entry being updated with a new entry representing the
new resource and its <code>Document</code> object and related state.
The user agent may propagate state from the old entry to the new entry
(e.g. scroll position).

<li>
<p>Replace the <a href="#current0">current entry</a> in the <a
href="#session">session history</a> with a new entry representing the
new resource and its <code>Document</code> object and related state.
<p><a href="#traverse">Traverse the history</a> to the new entry.
</ol>

<dt>Otherwise
Expand All @@ -24743,8 +24746,7 @@ at the first element with the given ID must be treated as if it was cloned and r
href="#history1">History</a></code> object.</p>

<p class=note>This <a href="#history-notes">doesn't necessarily have to
affect</a><!--XXX
change to auto-xref?--> the user agent's user
affect</a><!--XXX change to auto-xref?--> the user agent's user
interface.</p>

<li>
Expand All @@ -24754,12 +24756,14 @@ at the first element with the given ID must be treated as if it was cloned and r

<li>
<p><a href="#traverse">Traverse the history</a> to the new entry.

<li>
<p>If the navigation was initiated with <dfn id=replacement>replacement
enabled</dfn>, remove the entry immediately before the new <a
href="#current0">current entry</a> in the session history.
</ol>
</dl>

<p class=note>Navigation is initiated with replacement disabled unless it
is stated otherwise.

<h4 id=read-html><span class=secno>4.5.1. </span><dfn id=page-load
title=navigate-html>Page load processing model for HTML files</dfn></h4>

Expand Down
57 changes: 32 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -20528,7 +20528,7 @@ XXX selection ranges -->
<span>browsing context</span> to the URI given in <var
title="">url</var>. If the <var title="">replace</var> is true, then
<span title="replacement enabled">replacement must be
enabled</span>.</p>
enabled</span>; otherwise, it must not be enabled.</p>



Expand Down Expand Up @@ -20679,6 +20679,15 @@ XXX selection ranges -->

<ol>

<li>If there is no longer a <code>Document</code> object for the
entry in question, the user agent must <span>navigate</span> the
browsing context to the location for that entry to preform an
<span>entry update</span> of that entry, and abort these steps. The
"<span>navigate</span>" algorithm reinvokes this "traverse"
algorithm to complete the traversal, at which point there
<em>is</em> a <code>Document</code> object and so this step gets
skipped.</p></li>

<li><p>If appropriate, update the <span>current entry</span> in the
<span>browsing context</span>'s <code>Document</code> object's
<code>History</code> object to reflect any state that the user
Expand Down Expand Up @@ -20710,11 +20719,7 @@ XXX selection ranges -->

<li>The user agent must make the specified entry's
<code>Document</code> object the <span>active document</span> of
the <span>browsing context</span>. If there is no
<code>Document</code> object for the entry in question, the user
agent must <span>navigate</span> the browsing context to the
location for that entry, with <span>replacement
enabled</span>.</p></li>
the <span>browsing context</span>.</p></li>

<li>The user agent must move any properties that have been added
to the <span>active document</span>'s <code>Document<code>'s
Expand Down Expand Up @@ -22256,53 +22261,55 @@ at the first element with the given ID must be treated as if it was cloned and r

<dl>

<dt>If the navigation was initiated with <dfn>replacement
enabled</dfn></dt>
<dt>If the navigation was initiated for <dfn>entry update</dfn> of
an entry</dt>

<dd>

<ol>

<li><p>Remove any entries preceding or following the
<span>current entry</span> in the <span>session history</span>
that share the same <code>Document</code>.</p></li>
<li><p>Replace the entry being updated with a new entry
representing the new resource and its <code>Document</code>
object and related state. The user agent may propagate state from
the old entry to the new entry (e.g. scroll position).</p></li>

<li><p>Replace the <span>current entry</span> in the
<span>session history</span> with a new entry representing the
new resource and its <code>Document</code> object and related
state.</p></li>
<li><p><span>Traverse the history</span> to the new
entry.</p></li>

</ol>

</dd>


<dt>Otherwise</dt>

<dd>

<ol>

<li><p>Remove all the entries after the <span>current entry</span>
in the <span>browsing context</span>'s <code>Document</code>
object's <code>History</code> object.</p> <p class="note">This <a
href="#history-notes">doesn't necessarily have to affect</a><!--XXX
change to auto-xref?--> the user agent's user interface.</p> </li>
<li><p>Remove all the entries after the <span>current
entry</span> in the <span>browsing context</span>'s
<code>Document</code> object's <code>History</code> object.</p>
<p class="note">This <a href="#history-notes">doesn't necessarily
have to affect</a><!--XXX change to auto-xref?--> the user
agent's user interface.</p> </li>

<li><p>Append a new entry at the end of the <code>History</code>
object representing the new resource and its <code>Document</code>
object and related state.</p></li>
object representing the new resource and its
<code>Document</code> object and related state.</p></li>

<li><p><span>Traverse the history</span> to the new entry.</p></li>

<li><p>If the navigation was initiated with <dfn>replacement
enabled</dfn>, remove the entry immediately before the new
<span>current entry</span> in the session history.</p></li>

</ol>

</dd>

</dl>

<p class="note">Navigation is initiated with replacement disabled
unless it is stated otherwise.</p>


<h4 id="read-html"><dfn title="navigate-html">Page load processing model for HTML files</dfn></h4>

Expand Down

0 comments on commit 08d58b5

Please sign in to comment.