[html5] r1527 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon May 5 23:07:48 PDT 2008


Author: ianh
Date: 2008-05-05 23:07:48 -0700 (Mon, 05 May 2008)
New Revision: 1527

Modified:
   index
   source
Log:
[] (0) Handle errors when handling <object> data better; sniff for the real image type if appropriate.

Modified: index
===================================================================
--- index	2008-05-06 05:37:44 UTC (rev 1526)
+++ index	2008-05-06 06:07:48 UTC (rev 1527)
@@ -14219,8 +14219,8 @@
      attribute, then that handler <a href="#object-plugin">should be
      used</a>, and the value of the <code title=attr-object-data><a
      href="#data">data</a></code> attribute, if any, should be passed to the
-     handler. If no suitable handler can be found, jump to the last step in
-     the overall set of steps (fallback).</p>
+     handler. If no suitable handler can be found, or if the handler reports
+     an error, jump to the last step in the overall set of steps (fallback).</p>
     <!--
      if it starts with "java:", then use the plugin for application/x-java-vm
      if it starts with "clsid:", then use the plugin for application/x-oleobject
@@ -14242,24 +14242,22 @@
      <li>
       <p>If the resource is not yet available (e.g. because the resource was
        not available in the cache, so that loading the resource required
-       making a request over the network), then jump to step 3 in the overall
-       set of steps (fallback). When the resource becomes available, or if
-       the load fails, restart this algorithm from this step. Resources can
-       load incrementally; user agents may opt to consider a resource
+       making a request over the network), then jump to the last step in the
+       overall set of steps (fallback). When the resource becomes available,
+       or if the load fails, restart this algorithm from this step. Resources
+       can load incrementally; user agents may opt to consider a resource
        "available" whenever enough data has been obtained to begin processing
        the resource.
 
      <li>
-      <p>If the load failed (e.g. DNS error), <a href="#firing5">fire an
-       <code title=event-error>error</code> event</a> at the element, then
-       jump to step 3 in the overall set of steps (fallback).
+      <p>If the load failed (e.g. an HTTP 404 error, a DNS error), <a
+       href="#firing5">fire an <code title=event-error>error</code> event</a>
+       at the element, then jump to the last step in the overall set of steps
+       (fallback).
 
      <li>
       <p>Determine the <em>resource type</em>, as follows:</p>
 
-      <p class=big-issue>This says to trust the type. Should we instead use
-       the same mechanism as for browsing contexts?</p>
-
       <dl class=switch>
        <dt>If the resource has <a href="#content-type8"
         title=Content-Type>associated Content-Type metadata</a>
@@ -14291,8 +14289,9 @@
          resource, based on the <em>resource type</em> found in the previous
          step, then the user agent <a href="#object-plugin">should use that
          handler</a> and pass the content of the resource to that handler. If
-         no appropriate handler can be found, then jump to the last step in
-         the overall set of steps (fallback).</p>
+         no appropriate handler can be found, or if the handler reports an
+         error, then jump to the last step in the overall set of steps
+         (fallback).</p>
 
        <dt>If the type of the resource is an <span>XML MIME
         type</span><!-- XXX xref -->
@@ -14323,22 +14322,28 @@
         <p class=big-issue>navigation might end up treating it as something
          else, because it can do sniffing. how should we handle that?</p>
 
-       <dt>If the resource is a supported image format, and support for
-        images has not been disabled
+        <p class=big-issue>What if it's an XML resource and the file is
+         malformed? Shouldn't we fail to fallback content?</p>
 
+       <dt>If the type of the resource starts with "<code>image/</code>", and
+        support for images has not been disabled
+
        <dd>
+        <p>Apply the <a href="#content-type6" title="content-type sniffing:
+         image">image sniffing</a> rules to determine the type of the image.</p>
+
         <p>The <code><a href="#object">object</a></code> element represents
          the specified image. The image is not a nested <a
          href="#browsing0">browsing context</a>.</p>
 
-        <p class=big-issue>shouldn't we use the image-sniffing stuff here?</p>
+        <p>If the image cannot be rendered, e.g. because it is malformed or
+         in an unsupported format, jump to the last step in the overall set
+         of steps (fallback).</p>
 
        <dt>Otherwise
 
        <dd>
-        <p>The <code><a href="#object">object</a></code> element represents
-         the specified image, but the image cannot be shown. Jump to step 3
-         below in the overall set of steps (fallback).</p>
+        <p>Jump to the last step in the overall set of steps (fallback).</p>
       </dl>
 
      <li>
@@ -14360,7 +14365,8 @@
      agent can find a handler suitable according to the value of the <code
      title=attr-object-type><a href="#type6">type</a></code> attribute, then
      that handler <a href="#object-plugin">should be used</a>. If no suitable
-     handler can be found, jump to the next step (fallback).
+     handler can be found, or if the handler reports an error, jump to the
+     next step (fallback).
 
    <li>
     <p>(Fallback.) The <code><a href="#object">object</a></code> element
@@ -31787,9 +31793,9 @@
      for this resource, then jump to the last step in this set of steps.
 
    <li>
-    <p>If the resource was fetched over an HTTP protocolm and there is an
-     HTTP Content-Type header and the value of the first such header has
-     bytes that exactly match one of the following lines:</p>
+    <p>If the resource was fetched over an HTTP protocol and there is an HTTP
+     Content-Type header and the value of the first such header has bytes
+     that exactly match one of the following lines:</p>
 
     <table>
      <thead>

Modified: source
===================================================================
--- source	2008-05-06 05:37:44 UTC (rev 1526)
+++ source	2008-05-06 06:07:48 UTC (rev 1527)
@@ -12217,8 +12217,8 @@
     handler <a href="#object-plugin">should be used</a>, and the value
     of the <code title="attr-object-data">data</code> attribute, if
     any, should be passed to the handler. If no suitable handler can
-    be found, jump to the last step in the overall set of steps
-    (fallback).</p>
+    be found, or if the handler reports an error, jump to the last
+    step in the overall set of steps (fallback).</p>
 
     <!--
      if it starts with "java:", then use the plugin for application/x-java-vm
@@ -12245,22 +12245,19 @@
      <li><p>If the resource is not yet available (e.g. because the
      resource was not available in the cache, so that loading the
      resource required making a request over the network), then jump
-     to step 3 in the overall set of steps (fallback). When the
+     to the last step in the overall set of steps (fallback). When the
      resource becomes available, or if the load fails, restart this
      algorithm from this step. Resources can load incrementally; user
      agents may opt to consider a resource "available" whenever enough
      data has been obtained to begin processing the resource.</p></li>
 
-     <li><p>If the load failed (e.g. DNS error), <span>fire an <code
-     title="event-error">error</code> event</span> at the element,
-     then jump to step 3 in the overall set of steps
-     (fallback).</p></li>
+     <li><p>If the load failed (e.g. an HTTP 404 error, a DNS error),
+     <span>fire an <code title="event-error">error</code> event</span>
+     at the element, then jump to the last step in the overall set of
+     steps (fallback).</p></li>
 
      <li><p>Determine the <em>resource type</em>, as follows:</p>
 
-      <p class="big-issue">This says to trust the type. Should we
-      instead use the same mechanism as for browsing contexts?</p>
-
       <dl class="switch">
 
        <dt>If the resource has <span title="Content-Type">associated
@@ -12301,8 +12298,9 @@
         in the previous step, then the user agent <a
         href="#object-plugin">should use that handler</a> and pass the
         content of the resource to that handler. If no appropriate
-        handler can be found, then jump to the last step in the
-        overall set of steps (fallback).</p>
+        handler can be found, or if the handler reports an error, then
+        jump to the last step in the overall set of steps
+        (fallback).</p>
 
        </dd>
 
@@ -12334,20 +12332,28 @@
         something else, because it can do sniffing. how should we
         handle that?</p>
 
+        <p class="big-issue">What if it's an XML resource and the file
+        is malformed? Shouldn't we fail to fallback content?</p>
+
        </dd>
 
 
-       <dt>If the resource is a supported image format, and support
-       for images has not been disabled</dt>
+       <dt>If the type of the resource starts with
+       "<code>image/</code>", and support for images has not been
+       disabled</dt>
 
        <dd>
 
+        <p>Apply the <span title="content-type sniffing: image">image
+        sniffing</span> rules to determine the type of the image.</p>
+
         <p>The <code>object</code> element represents the specified
         image. The image is not a nested <span>browsing
         context</span>.</p>
 
-        <p class="big-issue">shouldn't we use the image-sniffing stuff
-        here?</p>
+        <p>If the image cannot be rendered, e.g. because it is
+        malformed or in an unsupported format, jump to the last step
+        in the overall set of steps (fallback).</p>
 
        </dd>
 
@@ -12356,9 +12362,8 @@
 
        <dd>
 
-        <p>The <code>object</code> element represents the specified
-        image, but the image cannot be shown. Jump to step 3 below in
-        the overall set of steps (fallback).</p>
+        <p>Jump to the last step in the overall set of steps
+        (fallback).</p>
 
        </dd>
 
@@ -12384,7 +12389,8 @@
    suitable according to the value of the <code
    title="attr-object-type">type</code> attribute, then that handler
    <a href="#object-plugin">should be used</a>. If no suitable handler
-   can be found, jump to the next step (fallback).</p></li>
+   can be found, or if the handler reports an error, jump to the next
+   step (fallback).</p></li>
 
    <li><p>(Fallback.) The <code>object</code> element represents what
    the element's contents represent, ignoring any leading
@@ -29645,7 +29651,7 @@
    Content-Type headers for this resource, then jump to the last step
    in this set of steps.</p></li>
 
-   <li><p>If the resource was fetched over an HTTP protocolm and there
+   <li><p>If the resource was fetched over an HTTP protocol and there
    is an HTTP Content-Type header and the value of the first such
    header has bytes that exactly match one of the following lines:</p>
 




More information about the Commit-Watchers mailing list