spec/Overview.html 1.989 1799 Make the 'navigate' step resolve URLs. Ma

Make the 'navigate' step resolve URLs. Make the 'navigate' algorithm
more precise and correct and consistent, in particular regarding
fragment identifiers. Fix some xrefs in the 'navigate' algorithm. More
URLing. Add a placeholder for defining the term 'fetching'. (whatwg
r1799) (changed by: Ian Hickson)

Diff: http://people.w3.org/mike/diffs/html5/spec/Overview.1.989.html
Cumulative diff: http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.988&r2=1.989&f=h
http://dev.w3.org/html5/spec/Overview.html

http://html5.org/tools/web-apps-tracker?from=1798&to=1799

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.988
retrieving revision 1.989
diff -u -d -r1.988 -r1.989
--- Overview.html	25 Jun 2008 05:37:34 -0000	1.988
+++ Overview.html	25 Jun 2008 07:38:11 -0000	1.989
@@ -413,25 +413,28 @@
         strings</a>
       </ul>
 
-     <li><a href="#content-type-sniffing"><span class=secno>2.6
+     <li><a href="#fetching"><span class=secno>2.6 </span>Fetching
+      resources</a>
+
+     <li><a href="#content-type-sniffing"><span class=secno>2.7
       </span>Determining the type of a resource</a>
       <ul class=toc>
-       <li><a href="#content-type"><span class=secno>2.6.1
+       <li><a href="#content-type"><span class=secno>2.7.1
         </span>Content-Type metadata</a>
 
-       <li><a href="#content-type0"><span class=secno>2.6.2
+       <li><a href="#content-type0"><span class=secno>2.7.2
         </span>Content-Type sniffing: Web pages</a>
 
-       <li><a href="#content-type1"><span class=secno>2.6.3
+       <li><a href="#content-type1"><span class=secno>2.7.3
         </span>Content-Type sniffing: text or binary</a>
 
-       <li><a href="#content-type2"><span class=secno>2.6.4
+       <li><a href="#content-type2"><span class=secno>2.7.4
         </span>Content-Type sniffing: unknown type</a>
 
-       <li><a href="#content-type3"><span class=secno>2.6.5
+       <li><a href="#content-type3"><span class=secno>2.7.5
         </span>Content-Type sniffing: image</a>
 
-       <li><a href="#content-type4"><span class=secno>2.6.6
+       <li><a href="#content-type4"><span class=secno>2.7.6
         </span>Content-Type sniffing: feed or HTML</a>
       </ul>
     </ul>
@@ -5663,7 +5666,19 @@
    "<code>5.0</code>" also supports "<code title="">HTML</code>"
    "<code>2.0</code>".
 
-  <h3 id=content-type-sniffing><span class=secno>2.6 </span>Determining the
+  <h3 id=fetching><span class=secno>2.6 </span>Fetching resources</h3>
+
+  <p class=big-issue>replace all instances of the word 'fetch' or 'download'
+   with a reference to this section, and put something here that talks about
+   caching, that redirects to the offline storage stuff when appropriate,
+   that defines that before fetching a URL you have to resolve the URL, so
+   that every case of fetching doesn't have to independently say to resolve
+   the URL, etc; "once fetched, a resource might have to have its type
+   determined", pointing to the next section but also explicitly saying that
+   it's up to the part of the spec doing the fetching to determine how the
+   type is established
+
+  <h3 id=content-type-sniffing><span class=secno>2.7 </span>Determining the
    type of a resource</h3>
 
   <p class=warning>It is imperative that the rules in this section be
@@ -5675,7 +5690,7 @@
    the end user can be exposed to malicious content, making the user
    vulnerable to cookie theft attacks and other cross-site scripting attacks.
 
-  <h4 id=content-type><span class=secno>2.6.1 </span>Content-Type metadata</h4>
+  <h4 id=content-type><span class=secno>2.7.1 </span>Content-Type metadata</h4>
 
   <p>What explicit <dfn id=content-type5 title=Content-Type>Content-Type
    metadata</dfn> is associated with the resource (the resource's type
@@ -5758,7 +5773,7 @@
   <p class=note>The above algorithm is a willful violation of the HTTP
    specification. <a href="#references">[RFC2616]</a>
 
-  <h4 id=content-type0><span class=secno>2.6.2 </span>Content-Type sniffing:
+  <h4 id=content-type0><span class=secno>2.7.2 </span>Content-Type sniffing:
    Web pages</h4>
 
   <p>The <dfn id=sniffed title="Content-Type sniffing">sniffed type of a
@@ -5859,7 +5874,7 @@
     <p>The sniffed type of the resource is <var title="">official type</var>.
   </ol>
 
-  <h4 id=content-type1><span class=secno>2.6.3 </span><dfn
+  <h4 id=content-type1><span class=secno>2.7.3 </span><dfn
    id=content-type6>Content-Type sniffing: text or binary</dfn></h4>
 
   <ol>
@@ -5950,7 +5965,7 @@
     <p>Otherwise, the sniffed type of the resource is "text/plain".
   </ol>
 
-  <h4 id=content-type2><span class=secno>2.6.4 </span><dfn
+  <h4 id=content-type2><span class=secno>2.7.4 </span><dfn
    id=content-type7>Content-Type sniffing: unknown type</dfn></h4>
 
   <ol>
@@ -6212,7 +6227,7 @@
    determine that content is not HTML and thus safe from XSS attacks, but
    then a user agent detects it as HTML anyway and allows script to execute).
 
-  <h4 id=content-type3><span class=secno>2.6.5 </span><dfn
+  <h4 id=content-type3><span class=secno>2.7.5 </span><dfn
    id=content-type8>Content-Type sniffing: image</dfn></h4>
 
   <p>If the first bytes of the file match one of the byte sequences in the
@@ -6284,7 +6299,7 @@
   <p>Otherwise, the sniffed type of the resource is the same as its <var
    title="">official type</var>.
 
-  <h4 id=content-type4><span class=secno>2.6.6 </span><dfn
+  <h4 id=content-type4><span class=secno>2.7.6 </span><dfn
    id=content-type9>Content-Type sniffing: feed or HTML</dfn></h4>
   <!-- mostly based on:
    http://blogs.msdn.com/rssteam/articles/PublishersGuide.aspx
@@ -15474,15 +15489,12 @@
   <p>If the <code title=attr-img-src><a href="#src">src</a></code> attribute
    is omitted, the image represents whatever string is given by the element's
    <code title=attr-img-alt><a href="#alt">alt</a></code> attribute, if any,
-   or nothing, if that attribute is empty or absent.</p>
-  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
+   or nothing, if that attribute is empty or absent.
 
   <p>The <code title=attr-img-src><a href="#src">src</a></code> attribute, on
    setting, must cause the user agent to immediately begin to download the
-   specified resource<!-- XXX xref what fetching means, XXXURL how to
-  resolve URLs in attributes (including those not in the DOM) -->,
-   unless the user agent cannot support images, or its support for images has
-   been disabled.
+   specified resource<!-- XXX xref what fetching means -->, unless the user
+   agent cannot support images, or its support for images has been disabled.
 
   <p>The download of the image must <a href="#delays">delay the <code
    title=event-load>load</code> event</a>.
@@ -15705,13 +15717,13 @@
   <p>The <code><a href="#iframe">iframe</a></code> element introduces a new
    nested <a href="#browsing1">browsing context</a>.
 
-  <p>The <dfn id=src1 title=attr-iframe-src><code>src</code></dfn> attribute,
-   if present, must be a <a href="#valid">valid URL</a> of a page that the
-   nested <a href="#browsing1">browsing context</a> is to contain. When the
-   browsing context is created, if the attribute is present, the user agent
-   must <a href="#navigate">navigate</a> this browsing context to the given
-   URI<!-- XXXURL resolve relative URLs -->, with <a
-   href="#replacement">replacement enabled</a>, and with the <code><a
+  <p>The <dfn id=src1 title=attr-iframe-src><code>src</code></dfn> attribute
+   gives the address of a page that the nested <a href="#browsing1">browsing
+   context</a> is to contain. The attribute, if present, must be a <a
+   href="#valid">valid URL</a>. When the browsing context is created, if the
+   attribute is present, the user agent must <a href="#navigate">navigate</a>
+   the element's browsing context to the given <a href="#url">URL</a>, with
+   <a href="#replacement">replacement enabled</a>, and with the <code><a
    href="#iframe">iframe</a></code> element's document's <a
    href="#browsing1">browsing context</a> as the <a href="#source0">source
    browsing context</a>. If the user <a href="#navigate"
@@ -15723,12 +15735,10 @@
 
   <p>Whenever the <code title=attr-iframe-src><a href="#src1">src</a></code>
    attribute is set, the nested <a href="#browsing1">browsing context</a>
-   must be <a href="#navigate" title=navigate>navigated</a> to the given
-   URI<!-- XXXURL
-  resolve relative URLs -->, with the <code><a
-   href="#iframe">iframe</a></code> element's document's <a
-   href="#browsing1">browsing context</a> as the <a href="#source0">source
-   browsing context</a>.
+   must be <a href="#navigate" title=navigate>navigated</a> to the given <a
+   href="#url">URL</a>, with the <code><a href="#iframe">iframe</a></code>
+   element's document's <a href="#browsing1">browsing context</a> as the <a
+   href="#source0">source browsing context</a>.
 
   <p>If the <code title=attr-iframe-src><a href="#src1">src</a></code>
    attribute is not set when the element is created, the browsing context
@@ -16282,7 +16292,8 @@
 
   <p>The <dfn id=data title=attr-object-data><code>data</code></dfn>
    attribute, if present, specifies the address of the resource. If present,
-   the attribute must be a <a href="#valid">valid URL</a>.
+   the attribute must be a <a href="#valid">valid URL</a>.</p>
+  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
 
   <p>The <dfn id=type6 title=attr-object-type><code>type</code></dfn>
    attribute, if present, specifies the type of the resource. If present, the
@@ -34363,9 +34374,9 @@
    documents</h4>
 
   <p>Certain actions cause the <a href="#browsing1">browsing context</a> to
-   <dfn id=navigate>navigate</dfn>. Navigation always involves a <dfn
-   id=source0>source browsing context</dfn>, which is the browsing context
-   which was responsible for starting the navigation.
+   <dfn id=navigate>navigate</dfn> to a new resource. Navigation always
+   involves <dfn id=source0>source browsing context</dfn>, which is the
+   browsing context which was responsible for starting the navigation.
 
   <p class=example>For example, <a href="#following0" title="following
    hyperlinks">following a hyperlink</a>, <span title="">form
@@ -34374,11 +34385,12 @@
    title=dom-location-assign><a href="#assign">location.assign()</a></code>
    methods can all cause a browsing context to navigate.
 
-  <p>A user agent may also provide various ways for the user to explicitly
-   cause a browsing context to navigate.
+  <p>A user agent may provide various ways for the user to explicitly cause a
+   browsing context to navigate, in addition to those defined in this
+   specification.
 
-  <p>When a browsing context is navigated, the user agent must run the
-   following steps:
+  <p>When a browsing context is navigated to a new resource, the user agent
+   must run the following steps:
 
   <ol>
    <li id=sandboxLinks>
@@ -34389,14 +34401,13 @@
      contexts</a> of the <a href="#browsing1">browsing context</a> being
      navigated, and the <a href="#source0">source browsing context</a> has
      its <a href="#sandboxed">sandboxed navigation browsing context flag</a>
-     set, then abort these steps. The user agent may offer to open the
-     specified resource in a new <a href="#top-level">top-level browsing
-     context</a> or in the <a href="#top-level">top-level browsing
-     context</a> of the <a href="#source0">source browsing context</a>, at
-     the user's option, in which case the user agent must <a
-     href="#navigate">navigate</a> that designated <a
-     href="#top-level">top-level browsing context</a> to the specified
-     resource as if the user had requested it independently.
+     set, then abort these steps. The user agent may offer to open the new
+     resource in a new <a href="#top-level">top-level browsing context</a> or
+     in the <a href="#top-level">top-level browsing context</a> of the <a
+     href="#source0">source browsing context</a>, at the user's option, in
+     which case the user agent must <a href="#navigate">navigate</a> that
+     designated <a href="#top-level">top-level browsing context</a> to the
+     new resource as if the user had requested it independently.
 
    <li id=seamlessLinks>
     <p>If the <a href="#source0">source browsing context</a> is the same as
@@ -34410,13 +34421,24 @@
      title=navigate>navigated</a> instead.
 
    <li>
-    <p>Cancel any preexisting attempt to navigate the browsing context.
+    <p>Cancel any preexisting attempt to navigate the <a
+     href="#browsing1">browsing context</a>.
 
-   <li>
-    <p>If the new resource is the same as the current resource, but a
-     fragment identifier has been specified, changed, or removed, then <a
-     href="#navigating0" title=navigate-fragid>navigate to that fragment
-     identifier</a> and abort these steps.
+   <li><a href="#resolve" title="resolve a url">Resolve</a> the <a
+    href="#url">URL</a> of the new resource. If that fails, abort these
+    steps.
+
+   <li id=navigate-fragid-step>
+    <p><i>Fragment identifiers</i>: If the <a href="#absolute">absolute
+     URL</a> of the new resource is the same as the <span title="the
+     document's address">address</span><!--XXXDOCURL--> of the <a
+     href="#active">active document</a> of the <a href="#browsing1">browsing
+     context</a> being navigated, ignoring any <a href="#ltfragmentgt"
+     title=url-fragment>&lt;fragment&gt;</a> components of those <a
+     href="#url" title=URL>URLs</a>, and the new resource is to be fetched
+     using HTTP GET or equivalent, then <a href="#navigating0"
+     title=navigate-fragid>navigate to that fragment identifier</a> and abort
+     these steps.
 
    <li>
     <p>If the new resource is to be handled by displaying some sort of inline
@@ -34449,12 +34471,13 @@
      title=concept-appcache-selection>most appropriate application cache</a>
      of those that match.</p>
     <!-- XXXURL JSURI issue -->
-    <p>Otherwise, start fetching the specified resource in the appropriate
-     manner (e.g. performing an HTTP GET or POST operation, or reading the
-     file from disk, or executing script in the case of a <a
+    <p>Otherwise, start fetching<!-- XXX xref --> the new resource in the
+     appropriate manner (e.g. performing an HTTP GET or POST operation, or
+     reading the file from disk, or executing script in the case of a <a
      href="#the-javascript" title="javascript protocol"><code
      title="">javascript:</code> URI</a>). If this results in a redirect,
-     return to step 2 with the new resource.</p>
+     return to <a href=navigate-fragid-step>the step labeled "fragment
+     identifiers"</a> with the new resource.</p>
 
     <p class=example>For example, imagine an HTML page with an associated
      application cache displaying an image and a form, where the image is
@@ -34588,11 +34611,11 @@
     </dl>
 
    <li id=navigate-non-Document>
-    <p>If, given <var title="">type</var>, the new resource is to be handled
-     by displaying some sort of inline content, e.g. a native rendering of
-     the content, an error message because the specified type is not
-     supported, or an inline prompt to allow the user to select <a
-     href="#registercontenthandler"
+    <p><i>Non-document content</i>: If, given <var title="">type</var>, the
+     new resource is to be handled by displaying some sort of inline content,
+     e.g. a native rendering of the content, an error message because the
+     specified type is not supported, or an inline prompt to allow the user
+     to select <a href="#registercontenthandler"
      title=dom-navigator-registerContentHandler>a registered handler</a> for
      the given type, then <a href="#page-load4"
      title=navigate-ua-inline>display the inline content</a> and abort these
@@ -34757,8 +34780,9 @@
    dispatch to alternative processing tools, e.g. determining that the
    content is actually a syndication feed and passing it to a feed handler.
    If such processing is to take place, abort the steps in this section, and
-   jump to <a href="#navigate-non-Document">step 10</a> in the <a
-   href="#navigate">navigate</a> steps above.
+   jump to <a href="#navigate-non-Document">the next step</a> (labeled
+   "non-document content") in the <a href="#navigate">navigate</a> steps
+   above.
 
   <p>Otherwise, then, with the newly created <code>Document</code>, the user
    agents must <a href="#update2">update the session history with the new

Received on Wednesday, 25 June 2008 07:40:56 UTC