Skip to content

Commit

Permalink
[giow] (0) Fix cloning of ImageData, and make it clearer how TypedArr…
Browse files Browse the repository at this point in the history
…ay links into the structured clone algorithm.

Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@7049 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 9, 2012
1 parent 9d840f7 commit 7347857
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
15 changes: 14 additions & 1 deletion complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 April 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 April 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -9634,6 +9634,15 @@ <h4 id=safe-passing-of-structured-data><span class=secno>2.8.6 </span>Safe passi

<dd><p>Let <var title="">output</var> be a newly constructed <code><a href=#filelist>FileList</a></code> object containing a list of newly constructed <code><a href=#file>File</a></code> objects corresponding to the same underlying data as those in <var title="">input</var>, maintaining their relative order.</dd>

<dt>If <var title="">input</var> is an <code><a href=#imagedata>ImageData</a></code> object</dt>

<dd><p>Let <var title="">output</var> be a newly constructed
<code><a href=#imagedata>ImageData</a></code> object whose <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code> and <code title=dom-imagedata-height><a href=#dom-imagedata-height>height</a></code> attributes have values
equal to the corresponding attributes on <var title="">input</var>, and whose <code title=dom-imagedata-data><a href=#dom-imagedata-data>data</a></code> attribute has the value
obtained from invoking the <a href=#internal-structured-cloning-algorithm>internal structured cloning
algorithm</a> recursively with the value of the <code title=dom-imagedata-data><a href=#dom-imagedata-data>data</a></code> attribute on <var title="">input</var> as the new "<var title="">input</var>"
argument and <var title="">memory</var> as the new "<var title="">memory</var>" argument.</dd>

<!--(when we add this, make sure to throw DataCloneError if these objects are already closed)
<dt>If <var title="">input</var> is an <code>ArrayBuffer</code> object</dt>

Expand Down Expand Up @@ -9661,6 +9670,10 @@ <h4 id=safe-passing-of-structured-data><span class=secno>2.8.6 </span>Safe passi

<dd><p>Let <var title="">output</var> be a newly constructed empty <code title="">Object</code> object.</dd>

<dt>If <var title="">input</var> is an object that another specification defines how to clone</dt>

<dd><p>Let <var title="">output</var> be a clone of the object as defined by the other specification.</dd>

<dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>, <code><a href=#function>Function</a></code>)</dt>
<dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>

Expand Down
1 change: 1 addition & 0 deletions images/content-venn.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 April 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 April 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -9634,6 +9634,15 @@ interface <dfn id=transferable>Transferable</dfn> { };</pre>

<dd><p>Let <var title="">output</var> be a newly constructed <code><a href=#filelist>FileList</a></code> object containing a list of newly constructed <code><a href=#file>File</a></code> objects corresponding to the same underlying data as those in <var title="">input</var>, maintaining their relative order.</dd>

<dt>If <var title="">input</var> is an <code><a href=#imagedata>ImageData</a></code> object</dt>

<dd><p>Let <var title="">output</var> be a newly constructed
<code><a href=#imagedata>ImageData</a></code> object whose <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code> and <code title=dom-imagedata-height><a href=#dom-imagedata-height>height</a></code> attributes have values
equal to the corresponding attributes on <var title="">input</var>, and whose <code title=dom-imagedata-data><a href=#dom-imagedata-data>data</a></code> attribute has the value
obtained from invoking the <a href=#internal-structured-cloning-algorithm>internal structured cloning
algorithm</a> recursively with the value of the <code title=dom-imagedata-data><a href=#dom-imagedata-data>data</a></code> attribute on <var title="">input</var> as the new "<var title="">input</var>"
argument and <var title="">memory</var> as the new "<var title="">memory</var>" argument.</dd>

<!--(when we add this, make sure to throw DataCloneError if these objects are already closed)
<dt>If <var title="">input</var> is an <code>ArrayBuffer</code> object</dt>

Expand Down Expand Up @@ -9661,6 +9670,10 @@ interface <dfn id=transferable>Transferable</dfn> { };</pre>

<dd><p>Let <var title="">output</var> be a newly constructed empty <code title="">Object</code> object.</dd>

<dt>If <var title="">input</var> is an object that another specification defines how to clone</dt>

<dd><p>Let <var title="">output</var> be a clone of the object as defined by the other specification.</dd>

<dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>, <code><a href=#function>Function</a></code>)</dt>
<dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>

Expand Down
20 changes: 20 additions & 0 deletions source
Expand Up @@ -9795,6 +9795,22 @@ interface <dfn>Transferable</dfn> { };</pre>

<dd><p>Let <var title="">output</var> be a newly constructed <code>FileList</code> object containing a list of newly constructed <code>File</code> objects corresponding to the same underlying data as those in <var title="">input</var>, maintaining their relative order.</p></dd>

<dt>If <var title="">input</var> is an <code>ImageData</code> object</dt>

<dd><p>Let <var title="">output</var> be a newly constructed
<code>ImageData</code> object whose <code
title="dom-imagedata-width">width</code> and <code
title="dom-imagedata-height">height</code> attributes have values
equal to the corresponding attributes on <var
title="">input</var>, and whose <code
title="dom-imagedata-data">data</code> attribute has the value
obtained from invoking the <span>internal structured cloning
algorithm</span> recursively with the value of the <code
title="dom-imagedata-data">data</code> attribute on <var
title="">input</var> as the new "<var title="">input</var>"
argument and <var title="">memory</var> as the new "<var
title="">memory</var>" argument.</p></dd>

<!--(when we add this, make sure to throw DataCloneError if these objects are already closed)
<dt>If <var title="">input</var> is an <code>ArrayBuffer</code> object</dt>

Expand Down Expand Up @@ -9823,6 +9839,10 @@ interface <dfn>Transferable</dfn> { };</pre>

<dd><p>Let <var title="">output</var> be a newly constructed empty <code title="">Object</code> object.</p></dd>

<dt>If <var title="">input</var> is an object that another specification defines how to clone</dt>

<dd><p>Let <var title="">output</var> be a clone of the object as defined by the other specification.</p></dd>

<dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>, <code>Function</code>)</dt>
<dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>

Expand Down

0 comments on commit 7347857

Please sign in to comment.