HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
4138[Gecko] [Opera] [Webkit] Drop support for anything but UTF-8 from Workers.2009-10-14 10:55
@@ -71541,109 +71541,20 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
   <h4>Origins of workers</h4>
 
   <p>Both the <span>origin</span> and <span>effective script
   origin</span> of scripts running in workers are the
   <span>origin</span> of the <span>absolute URL</span> given in that
   the worker's <code
   title="dom-WorkerGlobalScope-location">location</code> attribute
   represents.</p>
 
 
-  <h4>Decoding scripts</h4>
-
-  <p>When a user agent is to <dfn>decode a script resource</dfn> to
-  obtain its source in Unicode, it must run the following steps:</p>
-
-  <ol>
-
-   <li>
-
-    <p>Let <var title="">character encoding</var> be <i
-    title="">unknown</i>.</p>
-
-   </li>
-
-   <li>
-
-    <p>For each of the rows in the following table, starting with the
-    first one and going down, if the resource has as many or more
-    bytes available than the number of bytes in the first column, and
-    the first bytes of the resource match the bytes given in the first
-    column, then let <var title="">character encoding</var> be the
-    encoding given in the cell in the second column of that row:</p>
-
-    <!-- this table is present in several forms in this file; keep them in sync -->
-    <table>
-     <thead>
-      <tr>
-       <th>Bytes in Hexadecimal
-       <th>Encoding
-     <tbody>
-<!-- nobody uses this
-      <tr>
-       <td>00 00 FE FF
-       <td>UTF-32BE
-      <tr>
-       <td>FF FE 00 00
-       <td>UTF-32LE
--->
-      <tr>
-       <td>FE FF
-       <td>UTF-16BE
-      <tr>
-       <td>FF FE
-       <td>UTF-16LE
-      <tr>
-       <td>EF BB BF
-       <td>UTF-8
-<!-- nobody uses this
-      <tr>
-       <td>DD 73 66 73
-       <td>UTF-EBCDIC
--->
-    </table>
-
-    <p class="note">This step looks for Unicode Byte Order Marks
-    (BOMs).</p>
-
-   </li>
-
-   <li>
-
-    <p>If <var title="">character encoding</var> is still <i
-    title="">unknown</i>, apply the <span>algorithm for extracting an
-    encoding from a Content-Type</span> to the resource's <span
-    title="Content-Type">Content Type metadata</span>; if this returns
-    an encoding, and the user agent supports that encoding, then let
-    <var title="">character encoding</var> be that encoding.</p>
-
-   </li>
-
-   <li>
-
-    <p>If <var title="">character encoding</var> is still <i
-    title="">unknown</i>, then let <var title="">character
-    encoding</var> be UTF-8.</p>
-
-   </li>
-
-   <li>
-
-    <p>Convert the resource to Unicode using the character encoding
-    given by <var title="">character encoding</var>.</p>
-
-    <p>Return the text that is so obtained.</p>
-
-   </li>
-
-  </ol>
-
 
   <h4>The event loop</h4>
 
   <p>Each <code>WorkerGlobalScope</code> object has an <span>event
   loop</span> distinct from those defined for <span title="unit of
   related similar-origin browsing contexts">units of related
   similar-origin browsing contexts</span>. This <span>event
   loop</span> has no associated <span>browsing context</span>, and its
   <span title="task queue">task queues</span> only have events,
   callbacks, and networking activity as <span
@@ -71788,22 +71699,22 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
     <p>If the attempt fails, or if the attempt involves any redirects
     to URIs that do not have the <span>same origin</span> as <var
     title="">url</var> (even if the final URI is at the <span>same
     origin</span> as the original <var title="">url</var>), then for
     each <code>Worker</code> or <code>SharedWorker</code> object
     associated with <var title="">worker global scope</var>,
     <span>queue a task</span> to <span>fire a simple event</span>
     named <code title="event-error">error</code> at that
     object. Abort these steps.</p>
 
-    <p>If the attempt succeeds, then <span title="decode a script
-    resource">decode the script resource</span> to obtain its <var
+    <p>If the attempt succeeds, then convert the script resource to
+    Unicode by assuming it was encoded as UTF-8, to obtain its <var
     title="">source</var>.</p>
 
     <p>Let <var title="">language</var> be JavaScript.</p>
 
     <p class="note">As with <code>script</code> elements, the MIME
     type of the script is ignored. Unlike with <code>script</code>
     elements, there is no way to override the type. It's always
     assumed to be JavaScript.</p>
 
    </li>
@@ -72629,22 +72540,22 @@ interface <dfn>WorkerUtils</dfn> {
 
      <li>
 
       <p>Wait for the fetching attempt for the corresponding resource
       to complete.</p>
 
       <p>If the fetching attempt failed, throw a
       <code>NETWORK_ERR</code> exception and abort all these
       steps.</p>
 
-      <p>If the attempt succeeds, then <span title="decode a script
-      resource">decode the script resource</span> to obtain its <var
+      <p>If the attempt succeeds, then convert the script resource to
+      Unicode by assuming it was encoded as UTF-8, to obtain its <var
       title="">source</var>.</p>
 
       <p>Let <var title="">language</var> be JavaScript.</p>
 
       <p class="note">As with the worker's script, the script here is
       always assumed to be JavaScript, regardless of the MIME
       type.</p>
 
      </li>
 

|