[html5] r2002 - [o] (2) Define processing for the second argument to getDataURL() for image/jpeg.

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 5 02:21:56 PDT 2008


Author: ianh
Date: 2008-08-05 02:21:56 -0700 (Tue, 05 Aug 2008)
New Revision: 2002

Modified:
   index
   source
Log:
[o] (2) Define processing for the second argument to getDataURL() for image/jpeg.

Modified: index
===================================================================
--- index	2008-08-05 09:16:17 UTC (rev 2001)
+++ index	2008-08-05 09:21:56 UTC (rev 2002)
@@ -2967,11 +2967,7 @@
 
   <p>Unless otherwise specified, if a method is passed more arguments than is
    defined for that method in its IDL definition, the excess arguments must
-   be ignored.</p>
-  <!-- XXX When updating this spec for
-  Bindings-For-DOM-compliance, also remove or consider the equivalent
-  requirement in the canvas section for toDataURL() and
-  getContext(). -->
+   be ignored.
 
   <h3 id=case-sensitivity><span class=secno>2.3 </span>Case-sensitivity</h3>
 
@@ -20650,7 +20646,7 @@
            attribute unsigned long <a href="#height1" title=dom-canvas-height>height</a>;
 
   DOMString <a href="#todataurl" title=dom-canvas-toDataURL>toDataURL</a>();
-  DOMString <a href="#todataurl0" title=dom-canvas-toDataURL-type>toDataURL</a>(in DOMString type);
+  DOMString <a href="#todataurl0" title=dom-canvas-toDataURL-type>toDataURL</a>(in DOMString type, [Variadic] in any args);
 
   DOMObject <a href="#getcontext" title=dom-canvas-getContext>getContext</a>(in DOMString contextId);
 };</pre>
@@ -20840,13 +20836,14 @@
      <td> image/jpeg
 
      <td> The second argument, if it is a number between 0.0 and 1.0, must be
-      treated as the desired quality level.
+      treated as the desired quality level. If it is no a number or is
+      outside that range, the user agent must use its default value, as if
+      the argument had been omitted.
   </table>
 
   <p>Other arguments must be ignored and must not cause the user agent to
-   raise an exception (as would normally occur if a method was called with
-   the wrong number of arguments). A future version of this specification
-   will probably allow extra parameters to be passed to <code
+   raise an exception. A future version of this specification will probably
+   define other parameters to be passed to <code
    title=dom-canvas-toDataURL><a href="#todataurl">toDataURL()</a></code> to
    allow authors to more carefully control compression settings, image
    metadata, etc.

Modified: source
===================================================================
--- source	2008-08-05 09:16:17 UTC (rev 2001)
+++ source	2008-08-05 09:21:56 UTC (rev 2002)
@@ -946,10 +946,7 @@
   <!-- XXX DOMB -->
   <p>Unless otherwise specified, if a method is passed more arguments than
   is defined for that method in its IDL definition, the excess
-  arguments must be ignored.</p> <!-- XXX When updating this spec for
-  Bindings-For-DOM-compliance, also remove or consider the equivalent
-  requirement in the canvas section for toDataURL() and
-  getContext(). -->
+  arguments must be ignored.</p>
   
 
 
@@ -17851,7 +17848,7 @@
            attribute unsigned long <span title="dom-canvas-height">height</span>;
 
   DOMString <span title="dom-canvas-toDataURL">toDataURL</span>();
-  DOMString <span title="dom-canvas-toDataURL-type">toDataURL</span>(in DOMString type);
+  DOMString <span title="dom-canvas-toDataURL-type">toDataURL</span>(in DOMString type, [Variadic] in any args);
 
   DOMObject <span title="dom-canvas-getContext">getContext</span>(in DOMString contextId);
 };</pre>
@@ -18037,16 +18034,17 @@
     <tr>
      <td> image/jpeg
      <td> The second argument, if it is a number between 0.0 and 1.0,
-     must be treated as the desired quality level.
+     must be treated as the desired quality level. If it is no a
+     number or is outside that range, the user agent must use its
+     default value, as if the argument had been omitted.
   </table>
 
   <p>Other arguments must be ignored and must not cause the user agent
-  to raise an exception (as would normally occur if a method was
-  called with the wrong number of arguments). A future version of this
-  specification will probably allow extra parameters to be passed to
-  <code title="dom-canvas-toDataURL">toDataURL()</code> to allow
-  authors to more carefully control compression settings, image
-  metadata, etc.</p>
+  to raise an exception. A future version of this specification will
+  probably define other parameters to be passed to <code
+  title="dom-canvas-toDataURL">toDataURL()</code> to allow authors to
+  more carefully control compression settings, image metadata,
+  etc.</p>
 
 
   <h5>The 2D context</h5>




More information about the Commit-Watchers mailing list