- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 11 Jun 2008 09:49:49 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv21394 Modified Files: Overview.html Log Message: Specify ImageData.data as a CanvasPixelArray. (whatwg r1740) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.928 retrieving revision 1.929 diff -u -d -r1.928 -r1.929 --- Overview.html 10 Jun 2008 22:28:43 -0000 1.928 +++ Overview.html 11 Jun 2008 09:49:47 -0000 1.929 @@ -44,9 +44,9 @@ table.matrix, table.matrix td { border: none; text-align: right; } table.matrix { margin-left: 2em; } </style> - <link href="http://www.w3.org/StyleSheets/TR/%57%33%43-WD" rel=stylesheet + <link href="http://www.w3.org/StyleSheets/TR/%57%33%43-ED" rel=stylesheet type="text/css"> - <!-- ZZZ --> + <!-- ZZZ ED vs WD --> <body> <div class=head> @@ -58,16 +58,13 @@ <h2 class="no-num no-toc" id=a-vocabulary>A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id=w3c-working>W3C Working Draft - <!--ZZZ 10 June 2008-->9 June 2008</h2> - - <dl><!-- ZZZ: replace '20080609' with '[CDATA]' --> - - <dt>This Version: + <h2 class="no-num no-toc" id=editors0><!-- "W3C Working Draft" --> + Editor's Draft <!--ZZZ-->11 June 2008</h2> - <dd><a - href="http://www.w3.org/TR/2008/WD-html5-20080609/">http://www.w3.org/TR/2008/WD-html5-20080609/</a></dd> - <!-- :ZZZ --> + <dl><!-- ZZZ: update the month/day + <dt>This Version:</dt> + <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080609/">http://www.w3.org/TR/2008/WD-html5-20080609/</a></dd> + :ZZZ --> <dt>Latest Published Version: @@ -77,11 +74,15 @@ <dd><a href="http://www.w3.org/html/wg/html5/">http://www.w3.org/html/wg/html5/</a></dd> - <!-- ZZZ: --> + <!-- ZZZ: add the new version after it has shipped --> <dt>Previous Versions: <dd><a + href="http://www.w3.org/TR/2008/WD-html5-20080609/">http://www.w3.org/TR/2008/WD-html5-20080609/</a> + + + <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080122/">http://www.w3.org/TR/2008/WD-html5-20080122/</a> <!-- :ZZZ --> @@ -198,8 +199,8 @@ <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is the W3C working group responsible for this specification's progress along - the W3C Recommendation track. <!--ZZZ:--> This specification is the - <!-- ZZZ 10 June 2008 --> 9 June 2008 Working Draft. <!--:ZZZ--></p> + the W3C Recommendation track. <!--ZZZ:--> This specification is the 11 + June 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--></p> <!-- relationship to other work (required) --> <p>This specification is also being produced by the <a @@ -18340,7 +18341,13 @@ interface <dfn id=imagedata>ImageData</dfn> { readonly attribute long int <a href="#width3" title=dom-imagedata-width>width</a>; readonly attribute long int <a href="#height2" title=dom-imagedata-height>height</a>; - readonly attribute int[] <a href="#data1" title=dom-imagedata-data>data</a>; + readonly attribute <a href="#canvaspixelarray">CanvasPixelArray</a> <a href="#data1" title=dom-imagedata-data>data</a>; +}; + +interface <dfn id=canvaspixelarray>CanvasPixelArray</dfn> { + readonly attribute unsigned long <a href="#length5" title=dom-canvaspixelarray-length>length</a>; + [IndexGetter] <span>float</span> <span title=dom-XXX5>XXX5</span>(in unsigned long index); <!-- XXX DOMB --> + [IndexSetter] void <span title=dom-XXX6>XXX6</span>(in unsigned long index, in float value); <!-- XXX DOMB --> };</pre> <p>The <dfn id=canvas0 @@ -20132,29 +20139,44 @@ <var title="">w</var>, the number of physical device pixels per row in the image data, their <dfn id=height2 title=dom-imagedata-height><code>height</code></dfn> attribute is set to - <var title="">h</var>, the number of rows in the image data, and the <dfn - id=data1 title=dom-imagedata-data><code>data</code></dfn> attribute is - initialized to an array of <var title="">h</var>×<var - title="">w</var>×4 integers. The pixels must be represented in this - array in left-to-right order, row by row, starting at the top left, with - each pixel's red, green, blue, and alpha components being given in that - order. Each component of each device pixel represented in this array must + <var title="">h</var>, the number of rows in the image data, and their + <dfn id=data1 title=dom-imagedata-data><code>data</code></dfn> attribute + is initialized to a <code><a + href="#canvaspixelarray">CanvasPixelArray</a></code> object holding the + image data. At least one pixel's worth of image data must be returned. + + <p>The <code><a href="#canvaspixelarray">CanvasPixelArray</a></code> object + provides ordered, indexed access to the color components of each pixel of + the image data. The data must be represented in left-to-right order, row + by row top to bottom, starting with the top left, with each pixel's red, + green, blue, and alpha components being given in that order for each + pixel. Each component of each device pixel represented in this array must be in the range 0..255, representing the 8 bit value for that component. - At least one pixel must be returned. + The components must be assigned consecutive indices starting with 0 for + the top left pixel's red component. - <p>The values of the <code title=dom-imagedata-data><a - href="#data1">data</a></code> array may be changed (the length of the - array, and the other attributes in <code><a - href="#imagedata">ImageData</a></code> objects, are all read-only). On - setting, JS <code>undefined</code> values must be converted to zero. Other - values must first be converted to numbers using JavaScript's ToNumber - algorithm, and if the result is a NaN value, a - <code>TYPE_MISMATCH_ERR</code> exception must be raised. If the result is - less than 0, it must be clamped to zero. If the result is more than 255, - it must be clamped to 255. If the number is not an integer, it must be - rounded to the nearest integer using the IEEE 754r <i>roundTiesToEven</i> - rounding mode. <a href="#references">[ECMA262]</a> <a - href="#references">[IEEE754R]</a> + <p>The <code><a href="#canvaspixelarray">CanvasPixelArray</a></code> object + thus represents <var title="">h</var>×<var title="">w</var>×4 + integers. The <dfn id=length5 + title=dom-canvaspixelarray-length><code>length</code></dfn> attribute of a + <code><a href="#canvaspixelarray">CanvasPixelArray</a></code> object must + return this number. + + <p>The <dfn id=xxx5index title=dom-canvaspixelarray-XXX5><code>XXX5(<var + title="">index</var>)</code></dfn> method must return the value of the + <var title="">index</var>th component in the array. + + <p>The <dfn id=xxx6index title=dom-canvaspixelarray-XXX6><code>XXX6(<var + title="">index</var>, <var title="">value</var>)</code></dfn> method must + set the value of the <var title="">index</var>th component in the array to + <var title="">value</var>. JS <code>undefined</code> values must be + converted to zero. Other values must first be converted to numbers using + JavaScript's ToNumber algorithm, and if the result is a NaN value, then + the value be must converted to zero. If the result is less than 0, it must + be clamped to zero. If the result is more than 255, it must be clamped to + 255. If the number is not an integer, it must be rounded to the nearest + integer using the IEEE 754r <i>roundTiesToEven</i> rounding mode. <a + href="#references">[ECMA262]</a> <a href="#references">[IEEE754R]</a> <p class=note>The width and height (<var title="">w</var> and <var title="">h</var>) might be different from the <var title="">sw</var> and @@ -25940,7 +25962,7 @@ depth, which would then require the selection to be infinite if every row, including every hidden row, was selected. - <p>The <dfn id=length5 + <p>The <dfn id=length6 title=dom-DataGridSelection-length><code>length</code></dfn> attribute must return the number of rows currently present in the selection. The <dfn id=itemindex3 title=dom-DataGridSelection-item><code>item(<var @@ -25971,7 +25993,7 @@ method must mark all the rows in the data grid as selected. After a call to <code title=dom-DataGridSelection-selectAll><a href="#selectall">selectAll()</a></code>, the <code - title=dom-DataGridSelection-length><a href="#length5">length</a></code> + title=dom-DataGridSelection-length><a href="#length6">length</a></code> attribute will return the number of rows in the data grid, not counting children of closed rows. @@ -25985,7 +26007,7 @@ mark all the rows in the data grid to be marked as not selected. After a call to <code title=dom-DataGridSelection-clear><a href="#clear">clear()</a></code>, the <code - title=dom-DataGridSelection-length><a href="#length5">length</a></code> + title=dom-DataGridSelection-length><a href="#length6">length</a></code> attribute will return zero. <p>If the <code><a href="#datagrid0">datagrid</a></code> element has a <dfn @@ -28512,7 +28534,7 @@ // other browsing contexts readonly attribute <a href="#window">Window</a> <a href="#frames" title=dom-frames>frames</a>; - readonly attribute unsigned long <a href="#length6" title=dom-length>length</a>; + readonly attribute unsigned long <a href="#length7" title=dom-length>length</a>; [IndexGetter] <a href="#window">Window</a> <a href="#xxx4index" title=dom-XXX4>XXX4</a>(in unsigned long index); <!-- XXX DOMB --> readonly attribute <a href="#window">Window</a> <a href="#opener0" title=dom-opener>opener</a>; <a href="#window">Window</a> <a href="#open2" title=dom-open>open</a>(); @@ -28758,7 +28780,7 @@ <h4 id=accessing><span class=secno>4.2.4 </span>Accessing other browsing contexts</h4> - <p>The <dfn id=length6 title=dom-length><code>length</code></dfn> DOM + <p>The <dfn id=length7 title=dom-length><code>length</code></dfn> DOM attribute on the <code><a href="#window">Window</a></code> interface must return the number of <a href="#child" title="child browsing context">child browsing contexts</a> of the <a href="#active" title="active @@ -31706,7 +31728,7 @@ void <a href="#swapcache" title=dom-appcache-swapCache>swapCache</a>(); // dynamic entries - readonly attribute unsigned long <a href="#length7" title=dom-appcache-length>length</a>; + readonly attribute unsigned long <a href="#length8" title=dom-appcache-length>length</a>; DOMString <a href="#itemindex4" title=dom-appcache-item>item</a>(in unsigned long index); void <a href="#adduri" title=dom-appcache-add>add</a>(in DOMString uri); void <a href="#remove1" title=dom-appcache-remove>remove</a>(in DOMString uri); @@ -31808,7 +31830,7 @@ title=concept-appcache-manifest>manifest</a>. </dl> - <p>The <dfn id=length7 title=dom-appcache-length><code>length</code></dfn> + <p>The <dfn id=length8 title=dom-appcache-length><code>length</code></dfn> attribute must return the number of <a href="#dynamic3" title=concept-appcache-dynamic>dynamic entries</a> in the <a href="#application0">application cache</a> with which the <code><a @@ -31822,7 +31844,7 @@ title=dom-appcache-add><a href="#adduri">add()</a></code> method, with the oldest entry being the zeroth entry, and the most recently added entry having the index <span><code title=dom-appcache-length><a - href="#length7">length</a></code>-1</span>. + href="#length8">length</a></code>-1</span>. <p>The <dfn id=itemindex4 title=dom-appcache-item><code>item(<var title="">index</var>)</code></dfn> method must return the absolute URI of @@ -31833,7 +31855,7 @@ the object is not associated with any application cache, or if the <var title="">index</var> argument is lower than zero or greater than <span><code title=dom-appcache-length><a - href="#length7">length</a></code>-1</span>, the method must instead raise + href="#length8">length</a></code>-1</span>, the method must instead raise an <code>INDEX_SIZE_ERR</code> exception. <p>The <dfn id=adduri title=dom-appcache-add><code>add(<var @@ -32182,7 +32204,7 @@ href="#history2">History</a></code> interface</h4> <pre class=idl>interface <dfn id=history2>History</dfn> { - readonly attribute long <a href="#length8" title=dom-history-length>length</a>; + readonly attribute long <a href="#length9" title=dom-history-length>length</a>; void <a href="#godelta" title=dom-history-go>go</a>(in long delta); void <a href="#go" title=dom-history-go-0>go</a>(); void <a href="#back" title=dom-history-back>back</a>(); @@ -32192,7 +32214,7 @@ void <a href="#clearstate" title=dom-history-clearState>clearState</a>(); };</pre> - <p>The <dfn id=length8 title=dom-history-length><code>length</code></dfn> + <p>The <dfn id=length9 title=dom-history-length><code>length</code></dfn> attribute of the <code><a href="#history2">History</a></code> interface must return the number of entries in this <a href="#session">session history</a>. @@ -32205,7 +32227,7 @@ <p>If the index of the <a href="#current1">current entry</a> plus <var title="">delta</var> is less than zero or greater than or equal to the <a - href="#length8" title=dom-history-length>number of items in the session + href="#length9" title=dom-history-length>number of items in the session history</a>, then the user agent must do nothing. <p>If the <var title="">delta</var> is zero, then the user agent must act @@ -34221,7 +34243,7 @@ something? --> <pre class=idl>interface <dfn id=storage0>Storage</dfn> { - readonly attribute unsigned long <a href="#length9" title=dom-Storage-length>length</a>; + readonly attribute unsigned long <a href="#length10" title=dom-Storage-length>length</a>; [IndexGetter] DOMString <a href="#keyn" title=dom-Storage-key>key</a>(in unsigned long index); [NameGetter] DOMString <a href="#getitem" title=dom-Storage-getItem>getItem</a>(in DOMString key); [NameSetter] void <a href="#setitem" title=dom-Storage-setItem>setItem</a>(in DOMString key, in DOMString data); @@ -34254,7 +34276,7 @@ href="#storage0">Storage</a></code> interface can all be associated with the same list of key/value pairs simultaneously. - <p>The <dfn id=length9 title=dom-Storage-length><code>length</code></dfn> + <p>The <dfn id=length10 title=dom-Storage-length><code>length</code></dfn> attribute must return the number of key/value pairs currently present in the list associated with the object. @@ -34540,7 +34562,7 @@ detect any concurrent script execution. <p>This is required to guarantee that the <code title=dom-Storage-length><a - href="#length9">length</a></code> attribute of a <code><a + href="#length10">length</a></code> attribute of a <code><a href="#storage0">Storage</a></code> object never changes while a script is executing, other than in a way that is predictable by the script itself. @@ -34859,17 +34881,17 @@ href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> representing the rows returned, in the order returned by the database. If no rows were returned, then the object will be empty (its <code - title=dom-SQLResultSetRowList-length><a href="#length10">length</a></code> + title=dom-SQLResultSetRowList-length><a href="#length11">length</a></code> will be zero). <pre class=idl>interface <dfn id=sqlresultsetrowlist>SQLResultSetRowList</dfn> { - readonly attribute unsigned long <a href="#length10" title=dom-SQLResultSetRowList-length>length</a>; + readonly attribute unsigned long <a href="#length11" title=dom-SQLResultSetRowList-length>length</a>; [IndexGetter] <span>DOMObject</span> <a href="#itemindex5" title=dom-SQLResultSetRowList-item>item</a>(in unsigned long index); };</pre> <p><code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> - objects have a <dfn id=length10 + objects have a <dfn id=length11 title=dom-SQLResultSetRowList-length><code>length</code></dfn> attribute that must return the number of rows it represents (the number of rows returned by the database). @@ -39128,7 +39150,7 @@ void <a href="#clearundo" title=dom-UndoManager-clearUndo>clearUndo</a>(); void <a href="#clearredo" title=dom-UndoManager-clearRedo>clearRedo</a>(); [IndexGetter] DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index); - readonly attribute unsigned long <a href="#length11" title=dom-UndoManager-length>length</a>; + readonly attribute unsigned long <a href="#length12" title=dom-UndoManager-length>length</a>; readonly attribute unsigned long <a href="#position0" title=dom-UndoManager-position>position</a>; };</pre> @@ -39146,7 +39168,7 @@ entries are absent from the <a href="#undo-transaction">undo transaction history</a>. - <p>The <dfn id=length11 + <p>The <dfn id=length12 title=dom-UndoManager-length><code>length</code></dfn> attribute must return the number of <a href="#undo-object">undo object</a> entries in the <a href="#undo-transaction">undo transaction history</a>. @@ -39170,7 +39192,7 @@ nearest to the <a href="#current4">undo position</a>, on the "redo" side. If there are no <a href="#undo-object">undo object</a> entries on the "redo" side, then the attribute must return the same as the <code - title=dom-UndoManager-length><a href="#length11">length</a></code> + title=dom-UndoManager-length><a href="#length12">length</a></code> attribute. If there are no <a href="#undo-object">undo object</a> entries on the "undo" side of the <a href="#current4">undo position</a>, the <code title=dom-UndoManager-position><a href="#position0">position</a></code> @@ -39217,7 +39239,7 @@ href="#undo-object">undo object</a> entry with the specified <var title="">index</var>. If the index is less than zero or greater than or equal to <code title=dom-UndoManager-length><a - href="#length11">length</a></code> then the method must raise an + href="#length12">length</a></code> then the method must raise an <code>INDEX_SIZE_ERR</code> exception. <a href="#dom-changes">DOM changes</a> entries are unaffected by this method.
Received on Wednesday, 11 June 2008 09:50:24 UTC