Skip to content

Commit

Permalink
[giow] (2) Make navigating to change a fragid while the page is parsi…
Browse files Browse the repository at this point in the history
…ng work.

git-svn-id: http://svn.whatwg.org/webapps@3826 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 13, 2009
1 parent e71a115 commit 0e297f3
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 49 deletions.
4 changes: 2 additions & 2 deletions entities-unicode.inc
Expand Up @@ -96,6 +96,7 @@
<tr> <td> <code title="">Atilde;</code> </td> <td> U+000C3 </td> </tr>
<tr> <td> <code title="">Auml;</code> </td> <td> U+000C4 </td> </tr>
<tr> <td> <code title="">Aring;</code> </td> <td> U+000C5 </td> </tr>
<tr> <td> <code title="">angst;</code> </td> <td> U+000C5 </td> </tr>
<tr> <td> <code title="">AElig;</code> </td> <td> U+000C6 </td> </tr>
<tr> <td> <code title="">Ccedil;</code> </td> <td> U+000C7 </td> </tr>
<tr> <td> <code title="">Egrave;</code> </td> <td> U+000C8 </td> </tr>
Expand Down Expand Up @@ -319,6 +320,7 @@
<tr> <td> <code title="">Chi;</code> </td> <td> U+003A7 </td> </tr>
<tr> <td> <code title="">Psi;</code> </td> <td> U+003A8 </td> </tr>
<tr> <td> <code title="">Omega;</code> </td> <td> U+003A9 </td> </tr>
<tr> <td> <code title="">ohm;</code> </td> <td> U+003A9 </td> </tr>
<tr> <td> <code title="">alpha;</code> </td> <td> U+003B1 </td> </tr>
<tr> <td> <code title="">beta;</code> </td> <td> U+003B2 </td> </tr>
<tr> <td> <code title="">gamma;</code> </td> <td> U+003B3 </td> </tr>
Expand Down Expand Up @@ -586,12 +588,10 @@
<tr> <td> <code title="">TRADE;</code> </td> <td> U+02122 </td> </tr>
<tr> <td> <code title="">integers;</code> </td> <td> U+02124 </td> </tr>
<tr> <td> <code title="">Zopf;</code> </td> <td> U+02124 </td> </tr>
<tr> <td> <code title="">ohm;</code> </td> <td> U+02126 </td> </tr>
<tr> <td> <code title="">mho;</code> </td> <td> U+02127 </td> </tr>
<tr> <td> <code title="">Zfr;</code> </td> <td> U+02128 </td> </tr>
<tr> <td> <code title="">zeetrf;</code> </td> <td> U+02128 </td> </tr>
<tr> <td> <code title="">iiota;</code> </td> <td> U+02129 </td> </tr>
<tr> <td> <code title="">angst;</code> </td> <td> U+0212B </td> </tr>
<tr> <td> <code title="">bernou;</code> </td> <td> U+0212C </td> </tr>
<tr> <td> <code title="">Bernoullis;</code> </td> <td> U+0212C </td> </tr>
<tr> <td> <code title="">Bscr;</code> </td> <td> U+0212C </td> </tr>
Expand Down
60 changes: 37 additions & 23 deletions index
Expand Up @@ -53760,8 +53760,16 @@ style/default.css</pre>
that was going to be <a href=#navigate title=navigate>navigated</a>
instead.</li>

<li><p>Cancel any preexisting attempt to navigate the
<a href=#browsing-context>browsing context</a>.</li>
<li><p>If there is a preexisting attempt to navigate the
<a href=#browsing-context>browsing context</a>, and either that attempt has not yet
<a href=#concept-navigate-mature title=concept-navigate-mature>matured</a> (i.e. it has
not passed the point of making its <code>Document</code> the
<a href=#active-document>active document</a>), or that navigation's resource is not
to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, or its
resource's <a href=#absolute-url>absolute URL</a> differs from this attempt's by
more than the presence, absence, or value of the <a href=#url-fragment title=url-fragment>&lt;fragment&gt;</a> component, then cancel
that preexisting attempt to navigate the <a href=#browsing-context>browsing
context</a>.</li>

<li id=navigate-fragid-step><p><i>Fragment identifiers</i>: If
the <a href=#absolute-url>absolute URL</a> of the new resource is the same as
Expand All @@ -53775,6 +53783,9 @@ style/default.css</pre>
component (even if it is empty), then <a href=#scroll-to-fragid title=navigate-fragid>navigate to that fragment identifier</a>
and abort these steps.</li>

<li><p>Cancel <em>any</em> preexisting attempt to navigate the
<a href=#browsing-context>browsing context</a>.</li>

<li>

<p>If the new resource is to be handled by displaying some sort of
Expand Down Expand Up @@ -54082,27 +54093,25 @@ style/default.css</pre>

</dl></li>

<li><p>If <a href="#the-document's-address">the document's address</a> has a fragment
identifier, then run these substeps:</p>
<li><p>The <a href=#navigate title=navigate>navigation algorithm</a> has
now <dfn id=concept-navigate-mature title=concept-navigate-mature>matured</dfn>.</li>

<ol><li><p>Wait for a user-agent-defined amount of time, as desired
by the user agent implementor. (This is intended to allow the
user agent to optimize the user experience in the face of
performance concerns.)</li>
<li><p><i>Fragment identifier loop</i>: Wait for a
user-agent-defined amount of time, as desired by the user agent
implementor. (This is intended to allow the user agent to optimize
the user experience in the face of performance concerns.)</li>

<li><p>If the <code>Document</code> object has no parser, or its
parser has <a href=#stop-parsing title="stop parsing">stopped parsing</a>, or
the user agent has reason to believe the user is no longer
interested in scrolling to the fragment identifier, then abort
these substeps.</li>

<li><p><a href=#scroll-to-the-fragment-identifier>Scroll to the fragment identifier</a> given in
<a href="#the-document's-current-address">the document's current address</a>. If this fails to
find <a href=#the-indicated-part-of-the-document title="the indicated part of the document">an
indicated part of the document</a>, then return to the first
step of these substeps.</li>
<li><p>If the <code>Document</code> object has no parser, or its
parser has <a href=#stop-parsing title="stop parsing">stopped parsing</a>, or
the user agent has reason to believe the user is no longer
interested in scrolling to the fragment identifier, then abort
these steps.</li>

</ol></li>
<li><p><a href=#scroll-to-the-fragment-identifier>Scroll to the fragment identifier</a> given in
<a href="#the-document's-current-address">the document's current address</a>. If this fails to find
<a href=#the-indicated-part-of-the-document title="the indicated part of the document">an indicated part
of the document</a>, then return to the first step of these
substeps.</li>

</ol><p>The <a href=#task-source>task source</a> for this <a href=#concept-task title=concept-task>task</a> is the <a href=#networking-task-source>networking task
source</a>.</p>
Expand Down Expand Up @@ -54354,7 +54363,12 @@ style/default.css</pre>
will <a href=#scroll-to-the-fragment-identifier>scroll to the fragment identifier</a> given in
<a href="#the-document's-current-address">the document's current address</a>.</li>

</ol><hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment
</ol><p class=note>If the scrolling fails because the relevant ID has
not yet been parsed, then the original <a href=#navigate title=navigate>navigation</a> algorithm will take care of the
scrolling instead, as the last few steps of its <a href=#update-the-session-history-with-the-new-page>update the
session history with the new page</a> algorithm.</p>

<hr><p>When the user agent is required to <dfn id=scroll-to-the-fragment-identifier>scroll to the fragment
identifier</dfn>, it must change the scrolling position of the
document, or perform some other action, such that <a href=#the-indicated-part-of-the-document>the
indicated part of the document</a> is brought to the user's
Expand Down Expand Up @@ -68929,7 +68943,7 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<tr> <td> <code title="">angrtvb;</code> </td> <td> U+022BE </td> </tr>
<tr> <td> <code title="">angrtvbd;</code> </td> <td> U+0299D </td> </tr>
<tr> <td> <code title="">angsph;</code> </td> <td> U+02222 </td> </tr>
<tr> <td> <code title="">angst;</code> </td> <td> U+0212B </td> </tr>
<tr> <td> <code title="">angst;</code> </td> <td> U+000C5 </td> </tr>
<tr> <td> <code title="">angzarr;</code> </td> <td> U+0237C </td> </tr>
<tr> <td> <code title="">aogon;</code> </td> <td> U+00105 </td> </tr>
<tr> <td> <code title="">aopf;</code> </td> <td> U+1D552 </td> </tr>
Expand Down Expand Up @@ -69826,7 +69840,7 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<tr> <td> <code title="">ograve</code> </td> <td> U+000F2 </td> </tr> <!-- (invalid entity with missing semicolon for legacy support only) -->
<tr> <td> <code title="">ogt;</code> </td> <td> U+029C1 </td> </tr>
<tr> <td> <code title="">ohbar;</code> </td> <td> U+029B5 </td> </tr>
<tr> <td> <code title="">ohm;</code> </td> <td> U+02126 </td> </tr>
<tr> <td> <code title="">ohm;</code> </td> <td> U+003A9 </td> </tr>
<tr> <td> <code title="">oint;</code> </td> <td> U+0222E </td> </tr>
<tr> <td> <code title="">olarr;</code> </td> <td> U+021BA </td> </tr>
<tr> <td> <code title="">olcir;</code> </td> <td> U+029BE </td> </tr>
Expand Down
61 changes: 37 additions & 24 deletions source
Expand Up @@ -60844,8 +60844,18 @@ style/default.css</pre>
that was going to be <span title="navigate">navigated</span>
instead.</p></li>

<li><p>Cancel any preexisting attempt to navigate the
<span>browsing context</span>.</p></li>
<li><p>If there is a preexisting attempt to navigate the
<span>browsing context</span>, and either that attempt has not yet
<span title="concept-navigate-mature">matured</span> (i.e. it has
not passed the point of making its <code>Document</code> the
<span>active document</span>), or that navigation's resource is not
to be fetched using HTTP GET <span
title="concept-http-equivalent-get">or equivalent</span>, or its
resource's <span>absolute URL</span> differs from this attempt's by
more than the presence, absence, or value of the <span
title="url-fragment">&lt;fragment&gt;</span> component, then cancel
that preexisting attempt to navigate the <span>browsing
context</span>.</p></li>

<li id="navigate-fragid-step"><p><i>Fragment identifiers</i>: If
the <span>absolute URL</span> of the new resource is the same as
Expand All @@ -60861,6 +60871,9 @@ style/default.css</pre>
title="navigate-fragid">navigate to that fragment identifier</span>
and abort these steps.</p></li>

<li><p>Cancel <em>any</em> preexisting attempt to navigate the
<span>browsing context</span>.</p></li>

<li>

<p>If the new resource is to be handled by displaying some sort of
Expand Down Expand Up @@ -61220,31 +61233,25 @@ style/default.css</pre>

</li>

<li><p>If <span>the document's address</span> has a fragment
identifier, then run these substeps:</p>

<ol>

<li><p>Wait for a user-agent-defined amount of time, as desired
by the user agent implementor. (This is intended to allow the
user agent to optimize the user experience in the face of
performance concerns.)</p></li>
<li><p>The <span title="navigate">navigation algorithm</span> has
now <dfn title="concept-navigate-mature">matured</dfn>.</p></li>

<li><p>If the <code>Document</code> object has no parser, or its
parser has <span title="stop parsing">stopped parsing</span>, or
the user agent has reason to believe the user is no longer
interested in scrolling to the fragment identifier, then abort
these substeps.</p></li>

<li><p><span>Scroll to the fragment identifier</span> given in
<span>the document's current address</span>. If this fails to
find <span title="the indicated part of the document">an
indicated part of the document</span>, then return to the first
step of these substeps.</p></li>
<li><p><i>Fragment identifier loop</i>: Wait for a
user-agent-defined amount of time, as desired by the user agent
implementor. (This is intended to allow the user agent to optimize
the user experience in the face of performance concerns.)</p></li>

</ol>
<li><p>If the <code>Document</code> object has no parser, or its
parser has <span title="stop parsing">stopped parsing</span>, or
the user agent has reason to believe the user is no longer
interested in scrolling to the fragment identifier, then abort
these steps.</p></li>

</li>
<li><p><span>Scroll to the fragment identifier</span> given in
<span>the document's current address</span>. If this fails to find
<span title="the indicated part of the document">an indicated part
of the document</span>, then return to the first step of these
substeps.</p></li>

</ol>

Expand Down Expand Up @@ -61526,6 +61533,12 @@ style/default.css</pre>

</ol>

<p class="note">If the scrolling fails because the relevant ID has
not yet been parsed, then the original <span
title="navigate">navigation</span> algorithm will take care of the
scrolling instead, as the last few steps of its <span>update the
session history with the new page</span> algorithm.</p>

<hr>

<p>When the user agent is required to <dfn>scroll to the fragment
Expand Down

0 comments on commit 0e297f3

Please sign in to comment.