[html5] r2662 - [e] (0) Simplify IDL by using [Optional].

whatwg at whatwg.org whatwg at whatwg.org
Wed Jan 14 00:46:43 PST 2009


Author: ianh
Date: 2009-01-14 00:46:42 -0800 (Wed, 14 Jan 2009)
New Revision: 2662

Modified:
   index
   source
Log:
[e] (0) Simplify IDL by using [Optional].

Modified: index
===================================================================
--- index	2009-01-14 03:33:53 UTC (rev 2661)
+++ index	2009-01-14 08:46:42 UTC (rev 2662)
@@ -5945,11 +5945,8 @@
 
   // <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
            attribute DOMString <a href=#dom-innerhtml title=dom-innerHTML>innerHTML</a>;
-  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>();
-  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString type);
-  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString type, in DOMString replace);
-  <a href=#window>Window</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features);
-  <a href=#window>Window</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, in boolean replace);
+  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>([Optional] in DOMString type, in DOMString replace);
+  <a href=#window>Window</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
   void <a href=#dom-document-close title=dom-document-close>close</a>();
   void <a href=#dom-document-write title=dom-document-write>write</a>([Variadic] in DOMString text);
   void <a href=#dom-document-writeln title=dom-document-writeln>writeln</a>([Variadic] in DOMString text);
@@ -16705,7 +16702,7 @@
            attribute DOMString <a href=#dom-object-usemap title=dom-object-useMap>useMap</a>;
   readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-fae-form title=dom-fae-form>form</a>;
            attribute DOMString <a href=#dom-dim-width title=dom-dim-width>width</a>;
-           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;<!--
+           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;<!-- XXX
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
   readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
 };</pre>
@@ -19337,8 +19334,7 @@
            attribute unsigned long <a href=#dom-canvas-width title=dom-canvas-width>width</a>;
            attribute unsigned long <a href=#dom-canvas-height title=dom-canvas-height>height</a>;
 
-  DOMString <a href=#dom-canvas-todataurl title=dom-canvas-toDataURL>toDataURL</a>();
-  DOMString <a href=#dom-canvas-todataurl-type title=dom-canvas-toDataURL-type>toDataURL</a>(in DOMString type, [Variadic] in any args);
+  DOMString <a href=#dom-canvas-todataurl title=dom-canvas-toDataURL>toDataURL</a>([Optional] in DOMString type, [Variadic] in any args);
 
   any <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId);
 };</pre>
@@ -19455,7 +19451,7 @@
   define a <code>3d</code> context (probably based on the OpenGL ES
   API).</p>
 
-  <p>The <dfn id=dom-canvas-todataurl title=dom-canvas-toDataURL><code>toDataURL()</code></dfn> method
+  <hr><p>The <dfn id=dom-canvas-todataurl title=dom-canvas-toDataURL><code>toDataURL()</code></dfn> method
   must, when called with no arguments, return a <code title="">data:</code> URL containing a representation of the image
   as a PNG file. <a href=#refsPNG>[PNG]</a>.</p>
 
@@ -19463,8 +19459,8 @@
   or its vertical dimension is zero) then the method must return the
   string "<code title="">data:,</code>". (This is the shortest <code title="">data:</code> URL; it represents the empty string in a <code title="">text/plain</code> resource.)</p>
 
-  <p>The <dfn id=dom-canvas-todataurl-type title=dom-canvas-toDataURL-type><code>toDataURL(<var title="">type</var>)</code></dfn> method (when called with one
-  <em>or more</em> arguments) must return a <code title="">data:</code> URL containing a representation of the image
+  <p>When the <code title=dom-canvas-toDataURL><a href=#dom-canvas-todataurl>toDataURL(<var title="">type</var>)</a></code> method, when called with one
+  <em>or more</em> arguments, must return a <code title="">data:</code> URL containing a representation of the image
   in the format given by <var title="">type</var>. The possible values
   are MIME types with no parameters, for example
   <code>image/png</code>, <code>image/jpeg</code>, or even maybe
@@ -19481,9 +19477,9 @@
   may support other types. If the user agent does not support the
   requested type, it must return the image using the PNG format.</p>
 
-  <p>User agents must convert the provided type to lower case before
-  establishing if they support that type and before creating the <code title="">data:</code> URL.</p> <!-- XXX define "convert to lower
-  case" -->
+  <p>User agents must <a href=#converted-to-lowercase title="converted to lowercase">convert the
+  provided type to lower case</a> before establishing if they
+  support that type and before creating the <code title="">data:</code> URL.</p>
 
   <p class=note>When trying to use types other than
   <code>image/png</code>, authors can check if the image was really
@@ -19595,29 +19591,22 @@
            attribute DOMString <a href=#dom-context-2d-font title=dom-context-2d-font>font</a>; // (default 10px sans-serif)
            attribute DOMString <a href=#dom-context-2d-textalign title=dom-context-2d-textAlign>textAlign</a>; // "start", "end", "left", "right", "center" (default: "start")
            attribute DOMString <a href=#dom-context-2d-textbaseline title=dom-context-2d-textBaseline>textBaseline</a>; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
-  void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(in DOMString text, in float x, in float y);
-  void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(in DOMString text, in float x, in float y, in float maxWidth);
-  void <a href=#dom-context-2d-stroketext title=dom-context-2d-strokeText>strokeText</a>(in DOMString text, in float x, in float y);
-  void <a href=#dom-context-2d-stroketext title=dom-context-2d-strokeText>strokeText</a>(in DOMString text, in float x, in float y, in float maxWidth);<!-- XXXDVT
-  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y, in float maxHeight);
-  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y, in float maxHeight); -->
+  void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(in DOMString text, in float x, in float y, [Optional] in float maxWidth);
+  void <a href=#dom-context-2d-stroketext title=dom-context-2d-strokeText>strokeText</a>(in DOMString text, in float x, in float y, [Optional] in float maxWidth);<!-- XXXDVT
+  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y, [Optional] in float maxHeight);
+  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y, [Optional] in float maxHeight); -->
   <a href=#textmetrics>TextMetrics</a> <a href=#dom-context-2d-measuretext title=dom-context-2d-measureText>measureText</a>(in DOMString text);
 
-  // drawing images
-  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlimageelement>HTMLImageElement</a> image, in float dx, in float dy);
-  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlimageelement>HTMLImageElement</a> image, in float dx, in float dy, in float dw, in float dh);
+  // drawing images<!-- XXX add and define HTMLVideoElement variants -->
+  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlimageelement>HTMLImageElement</a> image, in float dx, in float dy, [Optional] in float dw, in float dh);
   void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlimageelement>HTMLImageElement</a> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
-  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlcanvaselement>HTMLCanvasElement</a> image, in float dx, in float dy);
-  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlcanvaselement>HTMLCanvasElement</a> image, in float dx, in float dy, in float dw, in float dh);
+  void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlcanvaselement>HTMLCanvasElement</a> image, in float dx, in float dy, [Optional] in float dw, in float dh);
   void <a href=#dom-context-2d-drawimage title=dom-context-2d-drawImage>drawImage</a>(in <a href=#htmlcanvaselement>HTMLCanvasElement</a> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
 
   // pixel manipulation
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(in float sw, in float sh);
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-getimagedata title=dom-context-2d-getImageData>getImageData</a>(in float sx, in float sy, in float sw, in float sh);
-  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(in <a href=#imagedata>ImageData</a> imagedata, in float dx, in float dy);
-  void <a href=#dom-context-2d-putimagedata-dirty title=dom-context-2d-putImageData-dirty>putImageData</a>(in <a href=#imagedata>ImageData</a> imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
+  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(in <a href=#imagedata>ImageData</a> imagedata, in float dx, in float dy, [Optional] in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
 };
 
 interface <dfn id=canvasgradient>CanvasGradient</dfn> {
@@ -21174,7 +21163,7 @@
   the canvas is backed by a high-resolution bitmap, or if the <var title="">sw</var> and <var title="">sh</var> arguments are
   negative.</p>
 
-  <p>The <dfn id=dom-context-2d-putimagedata title=dom-context-2d-putImageData><code>putImageData(<var title="">imagedata</var>, <var title="">dx</var>, <var title="">dy</var>)</code></dfn> and <dfn id=dom-context-2d-putimagedata-dirty title=dom-context-2d-putImageData-dirty><code>putImageData(<var title="">imagedata</var>, <var title="">dx</var>, <var title="">dy</var>, <var title="">dirtyX</var>, <var title="">dirtyY</var>, <var title="">dirtyWidth</var>, <var title="">dirtyHeight</var>)</code></dfn> methods write data from
+  <p>The <dfn id=dom-context-2d-putimagedata title=dom-context-2d-putImageData><code>putImageData(<var title="">imagedata</var>, <var title="">dx</var>, <var title="">dy</var>, <var title="">dirtyX</var>, <var title="">dirtyY</var>, <var title="">dirtyWidth</var>, <var title="">dirtyHeight</var>)</code></dfn> method writes data from
   <code><a href=#imagedata>ImageData</a></code> structures back to the canvas.</p>
 
   <p>If any of the arguments to the method are infinite or NaN, the
@@ -33485,11 +33474,7 @@
   [Replaceable] readonly attribute <a href=#window>Window</a> <a href=#dom-opener title=dom-opener>opener</a>;
   readonly attribute <a href=#window>Window</a> <a href=#dom-parent title=dom-parent>parent</a>;
   readonly attribute <span>Element</span> <a href=#dom-frameelement title=dom-frameElement>frameElement</a>;
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>();
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>(in DOMString url);
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>(in DOMString url, in DOMString target);
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>(in DOMString url, in DOMString target, in DOMString features);
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>(in DOMString url, in DOMString target, in DOMString features, in DOMString replace);
+  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
 
   // the user agent
   readonly attribute <a href=#navigator>Navigator</a> <a href=#dom-navigator title=dom-navigator>navigator</a>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
@@ -33500,14 +33485,10 @@
   // user prompts
   void <a href=#dom-alert title=dom-alert>alert</a>(in DOMString message);
   boolean <a href=#dom-confirm title=dom-confirm>confirm</a>(in DOMString message);
-  DOMString <a href=#dom-prompt title=dom-prompt>prompt</a>(in DOMString message);
-  DOMString <a href=#dom-prompt title=dom-prompt>prompt</a>(in DOMString message, in DOMString default);
+  DOMString <a href=#dom-prompt title=dom-prompt>prompt</a>(in DOMString message, [Optional] in DOMString default);
   void <a href=#dom-print title=dom-print>print</a>();
-  any <a href=#dom-showmodaldialog title=dom-showModalDialog>showModalDialog</a>(in DOMString url);
-  any <a href=#dom-showmodaldialog title=dom-showModalDialog>showModalDialog</a>(in DOMString url, in any arguments);<!--
-  any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, in any arguments, in DOMString features);--><!-- XXX-NOTIFY
-  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description);
-  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description, in VoidCallback onclick);-->
+  any <a href=#dom-showmodaldialog title=dom-showModalDialog>showModalDialog</a>(in DOMString url, [Optional] in any arguments<!--, [Optional] in DOMString features-->);<!-- XXX-NOTIFY
+  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description, [Optional] in VoidCallback onclick);-->
 
   // <a href=#crossDocumentMessages>cross-document messaging</a>
   void <a href=#dom-window-postmessage-2 title=dom-window-postMessage-2>postMessage</a>(in any message, in DOMString targetOrigin);
@@ -35473,7 +35454,8 @@
    <li>
 
     <p>Let the <a href=#dialog-arguments>dialog arguments</a> of the new browsing
-    context be set to the value of <var title="">arguments</var>.</p>
+    context be set to the value of <var title="">arguments</var>, or
+    the 'undefined' value if the argument was omitted.</p>
 
    </li>
 
@@ -37784,12 +37766,10 @@
 
   <pre class=idl>interface <dfn id=history-1>History</dfn> {
   readonly attribute long <a href=#dom-history-length title=dom-history-length>length</a>;
-  void <a href=#dom-history-go title=dom-history-go>go</a>(in long delta);
-  void <a href=#dom-history-go-0 title=dom-history-go-0>go</a>();
+  void <a href=#dom-history-go title=dom-history-go>go</a>([Optional] in long delta);
   void <a href=#dom-history-back title=dom-history-back>back</a>();
   void <a href=#dom-history-forward title=dom-history-forward>forward</a>();
-  void <a href=#dom-history-pushstate title=dom-history-pushState>pushState</a>(in any data, in DOMString title);
-  void <a href=#dom-history-pushstate title=dom-history-pushState>pushState</a>(in any data, in DOMString title, in DOMString url);
+  void <a href=#dom-history-pushstate title=dom-history-pushState>pushState</a>(in any data, in DOMString title, [Optional] in DOMString url);
   void <a href=#dom-history-clearstate title=dom-history-clearState>clearState</a>();
 };</pre>
 
@@ -37799,18 +37779,18 @@
 
   <p>The actual entries are not accessible from script.</p>
 
-  <p>The <dfn id=dom-history-go title=dom-history-go><code>go(<var title="">delta</var>)</code></dfn>
-  method causes the UA to move the number of steps specified by
-  <var title="">delta</var> in the session history.</p>
+  <p>The <dfn id=dom-history-go title=dom-history-go><code>go(<var title="">delta</var>)</code></dfn> method causes the UA to move the
+  number of steps specified by <var title="">delta</var> in the
+  session history.</p>
 
-  <p>If the index of the <a href=#current-entry>current entry</a> plus
-  <var title="">delta</var> is less than zero or greater than or equal to the
-  <a href=#dom-history-length title=dom-history-length>number of items in the session
-  history</a>, then the user agent must do nothing.</p>
+  <p>If the <var title="">delta</var> is zero, or if the argument is
+  omitted, then the user agent must act as if the <code title=dom-location-reload>location.reload()</code> method was
+  called instead.</p>
 
-  <p>If the <var title="">delta</var> is zero, then the user agent must act as
-  if the <code title=dom-location-reload>location.reload()</code>
-  method was called instead.</p>
+  <p>Otherwise, if the index of the <a href=#current-entry>current entry</a> plus
+  <var title="">delta</var> is less than zero or greater than or equal
+  to the <a href=#dom-history-length title=dom-history-length>number of items in the
+  session history</a>, then the user agent must do nothing.</p>
 
   <p>Otherwise, the user agent must cause the current <a href=#browsing-context>browsing
   context</a> to <a href=#traverse-the-history>traverse the history</a> to the specified
@@ -37828,8 +37808,6 @@
 
   <table><tr><th>Member</th>
     <th>Definition</th>
-   <tr><td><dfn id=dom-history-go-0 title=dom-history-go-0><code>go()</code></dfn></td>
-    <td>Must do the same as <code title=dom-history-go><a href=#dom-history-go>go(0)</a></code></td>
    <tr><td><dfn id=dom-history-back title=dom-history-back><code>back()</code></dfn></td>
     <td>Must do the same as <code title=dom-history-go><a href=#dom-history-go>go(-1)</a></code></td>
    <tr><td><dfn id=dom-history-forward title=dom-history-forward><code>forward()</code></dfn></td>
@@ -39528,10 +39506,7 @@
   <pre class=idl>typedef sequence<any> <dfn id=objectarray>ObjectArray</dfn>;
 
 interface <dfn id=sqltransaction>SQLTransaction</dfn> {
-  void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement);
-  void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement, in <a href=#objectarray>ObjectArray</a> arguments);
-  void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement, in <a href=#objectarray>ObjectArray</a> arguments, in <a href=#sqlstatementcallback>SQLStatementCallback</a> callback);
-  void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement, in <a href=#objectarray>ObjectArray</a> arguments, in <a href=#sqlstatementcallback>SQLStatementCallback</a> callback, in <a href=#sqlstatementerrorcallback>SQLStatementErrorCallback</a> errorCallback);
+  void <a href=#dom-sqltransaction-executesql title=dom-sqltransaction-executeSql>executeSql</a>(in DOMString sqlStatement, [Optional] in <a href=#objectarray>ObjectArray</a> arguments, [Optional] in <a href=#sqlstatementcallback>SQLStatementCallback</a> callback, [Optional] in <a href=#sqlstatementerrorcallback>SQLStatementErrorCallback</a> errorCallback);
 };
 
 [Callback=FunctionOnly, NoInterfaceObject]
@@ -39546,9 +39521,9 @@
 
   <p>When the <dfn id=dom-sqltransaction-executesql title=dom-sqltransaction-executeSql><code>executeSql(<var title="">sqlStatement</var>, <var title="">arguments</var>, <var title="">callback</var>, <var title="">errorCallback</var>)</code></dfn> method is invoked, the
   user agent must run the following algorithm. (This algorithm is
-  relatively simple and doesn't actually execute any SQL — the
-  bulk of the work is actually done as part of the <a href=#transaction-steps>transaction
-  steps</a>.)</p>
+  relatively simple in that it doesn't actually execute any SQL
+  — the bulk of the work is actually done as part of the
+  <a href=#transaction-steps>transaction steps</a>.)</p>
 
   <ol><li><p>If the method was not invoked during the execution of a
    <code><a href=#sqltransactioncallback>SQLTransactionCallback</a></code>,
@@ -42364,8 +42339,7 @@
            attribute DOMString <a href=#dom-datatransfer-dropeffect title=dom-DataTransfer-dropEffect>dropEffect</a>;
            attribute DOMString <a href=#dom-datatransfer-effectallowed title=dom-DataTransfer-effectAllowed>effectAllowed</a>;
   readonly attribute DOMStringList <a href=#dom-datatransfer-types title=dom-DataTransfer-types>types</a>;
-  void <a href=#dom-datatransfer-cleardata title=dom-DataTransfer-clearData>clearData</a>();
-  void <a href=#dom-datatransfer-cleardata-format title=dom-DataTransfer-clearData-format>clearData</a>(in DOMString format);
+  void <a href=#dom-datatransfer-cleardata title=dom-DataTransfer-clearData>clearData</a>([Optional] in DOMString format);
   void <a href=#dom-datatransfer-setdata title=dom-DataTransfer-setData>setData</a>(in DOMString format, in DOMString data);
   DOMString <a href=#dom-datatransfer-getdata title=dom-DataTransfer-getData>getData</a>(in DOMString format);
   void <a href=#dom-datatransfer-setdragimage title=dom-DataTransfer-setDragImage>setDragImage</a>(in Element image, in long x, in long y);
@@ -42414,10 +42388,10 @@
   valid format string.</p>
 
   <p>The <dfn id=dom-datatransfer-cleardata title=dom-DataTransfer-clearData><code>clearData()</code></dfn>
-  method, with no arguments, must clear the <code><a href=#datatransfer>DataTransfer</a></code>
-  object of al data (for all formats).</p>
+  method, when called with no arguments, must clear the
+  <code><a href=#datatransfer>DataTransfer</a></code> object of al data (for all formats).</p>
 
-  <p>The <dfn id=dom-datatransfer-cleardata-format title=dom-DataTransfer-clearData-format><code>clearData(<var title="">format</var>)</code></dfn> method must clear the
+  <p>When called with an argument, the <code title=dom-DataTransfer-clearData><a href=#dom-datatransfer-cleardata>clearData(<var title="">format</var>)</a></code> method must clear the
   <code><a href=#datatransfer>DataTransfer</a></code> object of any data associated with the
   given <var title="">format</var>. If <var title="">format</var> is
   the value "<code title="">Text</code>", then it must be treated as
@@ -45564,8 +45538,7 @@
 
   <pre class=idl>interface <dfn id=messageport>MessagePort</dfn> {
   readonly attribute boolean <a href=#dom-messageport-active title=dom-MessagePort-active>active</a>;
-  void <a href=#dom-messageport-postmessage title=dom-MessagePort-postMessage>postMessage</a>(in any message);
-  void <a href=#dom-messageport-postmessage title=dom-MessagePort-postMessage>postMessage</a>(in any message, in <a href=#messageport>MessagePort</a> messagePort);<!--
+  void <a href=#dom-messageport-postmessage title=dom-MessagePort-postMessage>postMessage</a>(in any message, [Optional] in <a href=#messageport>MessagePort</a> messagePort);<!--
   <span>MessagePort</span> <span title="dom-MessagePort-startConversation">startConversation</span>(in DOMString message);-->
   void <a href=#dom-messageport-start title=dom-MessagePort-start>start</a>();
   void <a href=#dom-messageport-close title=dom-MessagePort-close>close</a>();
@@ -55457,7 +55430,7 @@
   also implement the <code><a href=#windowtimers>WindowTimers</a></code> interface:</p>
 
 <pre class=idl>[NoInterfaceObject, ImplementedOn=<a href=#window>Window</a>] interface <dfn id=windowtimers>WindowTimers</dfn> {
-  // timers
+  // timers<!-- XXX use [Variadic], [Optional] from WebIDL -->
   long <a href=#dom-windowtimers-settimeout title=dom-windowtimers-setTimeout>setTimeout</a>(in <a href=#timeouthandler>TimeoutHandler</a> handler, in long timeout);
   long <a href=#dom-windowtimers-settimeout title=dom-windowtimers-setTimeout>setTimeout</a>(in <a href=#timeouthandler>TimeoutHandler</a> handler, in long timeout, <var title="">arguments...</var>);
   long <a href=#dom-windowtimers-settimeout title=dom-windowtimers-setTimeout>setTimeout</a>(in DOMString code, in long timeout);

Modified: source
===================================================================
--- source	2009-01-14 03:33:53 UTC (rev 2661)
+++ source	2009-01-14 08:46:42 UTC (rev 2662)
@@ -5927,11 +5927,8 @@
 
   // <span>dynamic markup insertion</span>
            attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
-  <span>HTMLDocument</span> <span title="dom-document-open">open</span>();
-  <span>HTMLDocument</span> <span title="dom-document-open">open</span>(in DOMString type);
-  <span>HTMLDocument</span> <span title="dom-document-open">open</span>(in DOMString type, in DOMString replace);
-  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features);
-  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, in boolean replace);
+  <span>HTMLDocument</span> <span title="dom-document-open">open</span>([Optional] in DOMString type, in DOMString replace);
+  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
   void <span title="dom-document-close">close</span>();
   void <span title="dom-document-write">write</span>([Variadic] in DOMString text);
   void <span title="dom-document-writeln">writeln</span>([Variadic] in DOMString text);
@@ -17894,7 +17891,7 @@
            attribute DOMString <span title="dom-object-useMap">useMap</span>;
   readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-dim-width">width</span>;
-           attribute DOMString <span title="dom-dim-height">height</span>;<!--
+           attribute DOMString <span title="dom-dim-height">height</span>;<!-- XXX
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
   readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
 };</pre>
@@ -20999,8 +20996,7 @@
            attribute unsigned long <span title="dom-canvas-width">width</span>;
            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, [Variadic] in any args);
+  DOMString <span title="dom-canvas-toDataURL">toDataURL</span>([Optional] in DOMString type, [Variadic] in any args);
 
   any <span title="dom-canvas-getContext">getContext</span>(in DOMString contextId);
 };</pre>
@@ -21130,6 +21126,8 @@
   define a <code>3d</code> context (probably based on the OpenGL ES
   API).</p>
 
+  <hr>
+
   <p>The <dfn
   title="dom-canvas-toDataURL"><code>toDataURL()</code></dfn> method
   must, when called with no arguments, return a <code
@@ -21142,9 +21140,9 @@
   title="">data:</code> URL; it represents the empty string in a <code
   title="">text/plain</code> resource.)</p>
 
-  <p>The <dfn title="dom-canvas-toDataURL-type"><code>toDataURL(<var
-  title="">type</var>)</code></dfn> method (when called with one
-  <em>or more</em> arguments) must return a <code
+  <p>When the <code title="dom-canvas-toDataURL">toDataURL(<var
+  title="">type</var>)</code> method, when called with one
+  <em>or more</em> arguments, must return a <code
   title="">data:</code> URL containing a representation of the image
   in the format given by <var title="">type</var>. The possible values
   are MIME types with no parameters, for example
@@ -21162,10 +21160,10 @@
   may support other types. If the user agent does not support the
   requested type, it must return the image using the PNG format.</p>
 
-  <p>User agents must convert the provided type to lower case before
-  establishing if they support that type and before creating the <code
-  title="">data:</code> URL.</p> <!-- XXX define "convert to lower
-  case" -->
+  <p>User agents must <span title="converted to lowercase">convert the
+  provided type to lower case</span> before establishing if they
+  support that type and before creating the <code
+  title="">data:</code> URL.</p>
 
   <p class="note">When trying to use types other than
   <code>image/png</code>, authors can check if the image was really
@@ -21289,29 +21287,22 @@
            attribute DOMString <span title="dom-context-2d-font">font</span>; // (default 10px sans-serif)
            attribute DOMString <span title="dom-context-2d-textAlign">textAlign</span>; // "start", "end", "left", "right", "center" (default: "start")
            attribute DOMString <span title="dom-context-2d-textBaseline">textBaseline</span>; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
-  void <span title="dom-context-2d-fillText">fillText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-fillText">fillText</span>(in DOMString text, in float x, in float y, in float maxWidth);
-  void <span title="dom-context-2d-strokeText">strokeText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-strokeText">strokeText</span>(in DOMString text, in float x, in float y, in float maxWidth);<!-- XXXDVT
-  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y, in float maxHeight);
-  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y);
-  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y, in float maxHeight); -->
+  void <span title="dom-context-2d-fillText">fillText</span>(in DOMString text, in float x, in float y, [Optional] in float maxWidth);
+  void <span title="dom-context-2d-strokeText">strokeText</span>(in DOMString text, in float x, in float y, [Optional] in float maxWidth);<!-- XXXDVT
+  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y, [Optional] in float maxHeight);
+  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y, [Optional] in float maxHeight); -->
   <span>TextMetrics</span> <span title="dom-context-2d-measureText">measureText</span>(in DOMString text);
 
-  // drawing images
-  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLImageElement</span> image, in float dx, in float dy);
-  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLImageElement</span> image, in float dx, in float dy, in float dw, in float dh);
+  // drawing images<!-- XXX add and define HTMLVideoElement variants -->
+  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLImageElement</span> image, in float dx, in float dy, [Optional] in float dw, in float dh);
   void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLImageElement</span> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
-  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLCanvasElement</span> image, in float dx, in float dy);
-  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLCanvasElement</span> image, in float dx, in float dy, in float dw, in float dh);
+  void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLCanvasElement</span> image, in float dx, in float dy, [Optional] in float dw, in float dh);
   void <span title="dom-context-2d-drawImage">drawImage</span>(in <span>HTMLCanvasElement</span> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
 
   // pixel manipulation
   <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(in float sw, in float sh);
   <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(in float sx, in float sy, in float sw, in float sh);
-  void <span title="dom-context-2d-putImageData">putImageData</span>(in <span>ImageData</span> imagedata, in float dx, in float dy);
-  void <span title="dom-context-2d-putImageData-dirty">putImageData</span>(in <span>ImageData</span> imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
+  void <span title="dom-context-2d-putImageData">putImageData</span>(in <span>ImageData</span> imagedata, in float dx, in float dy, [Optional] in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
 };
 
 interface <dfn>CanvasGradient</dfn> {
@@ -23243,12 +23234,9 @@
   <p>The <dfn
   title="dom-context-2d-putImageData"><code>putImageData(<var
   title="">imagedata</var>, <var title="">dx</var>, <var
-  title="">dy</var>)</code></dfn> and <dfn
-  title="dom-context-2d-putImageData-dirty"><code>putImageData(<var
-  title="">imagedata</var>, <var title="">dx</var>, <var
   title="">dy</var>, <var title="">dirtyX</var>, <var
   title="">dirtyY</var>, <var title="">dirtyWidth</var>, <var
-  title="">dirtyHeight</var>)</code></dfn> methods write data from
+  title="">dirtyHeight</var>)</code></dfn> method writes data from
   <code>ImageData</code> structures back to the canvas.</p>
 
   <p>If any of the arguments to the method are infinite or NaN, the
@@ -38039,11 +38027,7 @@
   [Replaceable] readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
   readonly attribute <span>Window</span> <span title="dom-parent">parent</span>;
   readonly attribute <span>Element</span> <span title="dom-frameElement">frameElement</span>;
-  <span>Window</span> <span title="dom-open">open</span>();
-  <span>Window</span> <span title="dom-open">open</span>(in DOMString url);
-  <span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target);
-  <span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target, in DOMString features);
-  <span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target, in DOMString features, in DOMString replace);
+  <span>Window</span> <span title="dom-open">open</span>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
 
   // the user agent
   readonly attribute <span>Navigator</span> <span title="dom-navigator">navigator</span>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
@@ -38054,14 +38038,10 @@
   // user prompts
   void <span title="dom-alert">alert</span>(in DOMString message);
   boolean <span title="dom-confirm">confirm</span>(in DOMString message);
-  DOMString <span title="dom-prompt">prompt</span>(in DOMString message);
-  DOMString <span title="dom-prompt">prompt</span>(in DOMString message, in DOMString default);
+  DOMString <span title="dom-prompt">prompt</span>(in DOMString message, [Optional] in DOMString default);
   void <span title="dom-print">print</span>();
-  any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url);
-  any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, in any arguments);<!--
-  any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, in any arguments, in DOMString features);--><!-- XXX-NOTIFY
-  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description);
-  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description, in VoidCallback onclick);-->
+  any <span title="dom-showModalDialog">showModalDialog</span>(in DOMString url, [Optional] in any arguments<!--, [Optional] in DOMString features-->);<!-- XXX-NOTIFY
+  void <span title="dom-showNotification">showNotification</span>(in DOMString title, in DOMString subtitle, in DOMString description, [Optional] in VoidCallback onclick);-->
 
   // <span>cross-document messaging</span>
   void <span title="dom-window-postMessage-2">postMessage</span>(in any message, in DOMString targetOrigin);
@@ -40364,7 +40344,8 @@
    <li>
 
     <p>Let the <span>dialog arguments</span> of the new browsing
-    context be set to the value of <var title="">arguments</var>.</p>
+    context be set to the value of <var title="">arguments</var>, or
+    the 'undefined' value if the argument was omitted.</p>
 
    </li>
 
@@ -42995,12 +42976,10 @@
 
   <pre class="idl">interface <dfn>History</dfn> {
   readonly attribute long <span title="dom-history-length">length</span>;
-  void <span title="dom-history-go">go</span>(in long delta);
-  void <span title="dom-history-go-0">go</span>();
+  void <span title="dom-history-go">go</span>([Optional] in long delta);
   void <span title="dom-history-back">back</span>();
   void <span title="dom-history-forward">forward</span>();
-  void <span title="dom-history-pushState">pushState</span>(in any data, in DOMString title);
-  void <span title="dom-history-pushState">pushState</span>(in any data, in DOMString title, in DOMString url);
+  void <span title="dom-history-pushState">pushState</span>(in any data, in DOMString title, [Optional] in DOMString url);
   void <span title="dom-history-clearState">clearState</span>();
 };</pre>
 
@@ -43010,19 +42989,20 @@
 
   <p>The actual entries are not accessible from script.</p>
 
-  <p>The <dfn
-  title="dom-history-go"><code>go(<var title="">delta</var>)</code></dfn>
-  method causes the UA to move the number of steps specified by
-  <var title="">delta</var> in the session history.</p>
+  <p>The <dfn title="dom-history-go"><code>go(<var
+  title="">delta</var>)</code></dfn> method causes the UA to move the
+  number of steps specified by <var title="">delta</var> in the
+  session history.</p>
 
-  <p>If the index of the <span>current entry</span> plus
-  <var title="">delta</var> is less than zero or greater than or equal to the
-  <span title="dom-history-length">number of items in the session
-  history</span>, then the user agent must do nothing.</p>
+  <p>If the <var title="">delta</var> is zero, or if the argument is
+  omitted, then the user agent must act as if the <code
+  title="dom-location-reload">location.reload()</code> method was
+  called instead.</p>
 
-  <p>If the <var title="">delta</var> is zero, then the user agent must act as
-  if the <code title="dom-location-reload">location.reload()</code>
-  method was called instead.</p>
+  <p>Otherwise, if the index of the <span>current entry</span> plus
+  <var title="">delta</var> is less than zero or greater than or equal
+  to the <span title="dom-history-length">number of items in the
+  session history</span>, then the user agent must do nothing.</p>
 
   <p>Otherwise, the user agent must cause the current <span>browsing
   context</span> to <span>traverse the history</span> to the specified
@@ -43047,10 +43027,6 @@
     <th>Definition</th>
    </tr>
    <tr>
-    <td><dfn title="dom-history-go-0"><code>go()</code></dfn></td>
-    <td>Must do the same as <code title="dom-history-go">go(0)</code></td>
-   </tr>
-   <tr>
     <td><dfn title="dom-history-back"><code>back()</code></dfn></td>
     <td>Must do the same as <code title="dom-history-go">go(-1)</code></td>
    </tr>
@@ -45001,10 +44977,7 @@
   <pre class="idl">typedef sequence<any> <dfn>ObjectArray</dfn>;
 
 interface <dfn>SQLTransaction</dfn> {
-  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement);
-  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments);
-  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLStatementCallback</span> callback);
-  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLStatementCallback</span> callback, in <span>SQLStatementErrorCallback</span> errorCallback);
+  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, [Optional] in <span>ObjectArray</span> arguments, [Optional] in <span>SQLStatementCallback</span> callback, [Optional] in <span>SQLStatementErrorCallback</span> errorCallback);
 };
 
 [Callback=FunctionOnly, NoInterfaceObject]
@@ -45023,9 +44996,9 @@
   title="">callback</var>, <var
   title="">errorCallback</var>)</code></dfn> method is invoked, the
   user agent must run the following algorithm. (This algorithm is
-  relatively simple and doesn't actually execute any SQL — the
-  bulk of the work is actually done as part of the <span>transaction
-  steps</span>.)</p>
+  relatively simple in that it doesn't actually execute any SQL
+  — the bulk of the work is actually done as part of the
+  <span>transaction steps</span>.)</p>
 
   <ol>
 
@@ -48255,8 +48228,7 @@
            attribute DOMString <span title="dom-DataTransfer-dropEffect">dropEffect</span>;
            attribute DOMString <span title="dom-DataTransfer-effectAllowed">effectAllowed</span>;
   readonly attribute DOMStringList <span title="dom-DataTransfer-types">types</span>;
-  void <span title="dom-DataTransfer-clearData">clearData</span>();
-  void <span title="dom-DataTransfer-clearData-format">clearData</span>(in DOMString format);
+  void <span title="dom-DataTransfer-clearData">clearData</span>([Optional] in DOMString format);
   void <span title="dom-DataTransfer-setData">setData</span>(in DOMString format, in DOMString data);
   DOMString <span title="dom-DataTransfer-getData">getData</span>(in DOMString format);
   void <span title="dom-DataTransfer-setDragImage">setDragImage</span>(in Element image, in long x, in long y);
@@ -48321,12 +48293,12 @@
 
   <p>The <dfn
   title="dom-DataTransfer-clearData"><code>clearData()</code></dfn>
-  method, with no arguments, must clear the <code>DataTransfer</code>
-  object of al data (for all formats).</p>
+  method, when called with no arguments, must clear the
+  <code>DataTransfer</code> object of al data (for all formats).</p>
 
-  <p>The <dfn
-  title="dom-DataTransfer-clearData-format"><code>clearData(<var
-  title="">format</var>)</code></dfn> method must clear the
+  <p>When called with an argument, the <code
+  title="dom-DataTransfer-clearData">clearData(<var
+  title="">format</var>)</code> method must clear the
   <code>DataTransfer</code> object of any data associated with the
   given <var title="">format</var>. If <var title="">format</var> is
   the value "<code title="">Text</code>", then it must be treated as
@@ -52025,8 +51997,7 @@
 
   <pre class="idl">interface <dfn>MessagePort</dfn> {
   readonly attribute boolean <span title="dom-MessagePort-active">active</span>;
-  void <span title="dom-MessagePort-postMessage">postMessage</span>(in any message);
-  void <span title="dom-MessagePort-postMessage">postMessage</span>(in any message, in <span>MessagePort</span> messagePort);<!--
+  void <span title="dom-MessagePort-postMessage">postMessage</span>(in any message, [Optional] in <span>MessagePort</span> messagePort);<!--
   <span>MessagePort</span> <span title="dom-MessagePort-startConversation">startConversation</span>(in DOMString message);-->
   void <span title="dom-MessagePort-start">start</span>();
   void <span title="dom-MessagePort-close">close</span>();
@@ -60670,7 +60641,7 @@
   also implement the <code>WindowTimers</code> interface:</p>
 
 <pre class="idl">[NoInterfaceObject, ImplementedOn=<span>Window</span>] interface <dfn>WindowTimers</dfn> {
-  // timers
+  // timers<!-- XXX use [Variadic], [Optional] from WebIDL -->
   long <span title="dom-windowtimers-setTimeout">setTimeout</span>(in <span>TimeoutHandler</span> handler, in long timeout);
   long <span title="dom-windowtimers-setTimeout">setTimeout</span>(in <span>TimeoutHandler</span> handler, in long timeout, <var title="">arguments...</var>);
   long <span title="dom-windowtimers-setTimeout">setTimeout</span>(in DOMString code, in long timeout);




More information about the Commit-Watchers mailing list