[html5] r822 - /
whatwg at whatwg.org
whatwg at whatwg.org
Wed May 16 17:37:08 PDT 2007
Author: ianh
Date: 2007-05-16 17:37:06 -0700 (Wed, 16 May 2007)
New Revision: 822
Modified:
index
source
Log:
[g] (2) Change the way we allow custom ImageData objects to be created
Modified: index
===================================================================
--- index 2007-05-16 23:59:29 UTC (rev 821)
+++ index 2007-05-17 00:37:06 UTC (rev 822)
@@ -22,7 +22,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=working>Working Draft — 16 May 2007</h2>
+ <h2 class="no-num no-toc" id=working>Working Draft — 17 May 2007</h2>
<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -144,7 +144,7 @@
requirements</a>
<ul class=toc>
<li><a href="#common"><span class=secno>1.3.1. </span>Common
- conformance requirements for APIs</a>
+ conformance requirements for APIs exposed to JavaScript</a>
<li><a href="#dependencies"><span class=secno>1.3.2.
</span>Dependencies</a>
@@ -1973,7 +1973,7 @@
<!-- XXX unexpandable entities? -->
<h4 id=common><span class=secno>1.3.1. </span>Common conformance
- requirements for APIs</h4>
+ requirements for APIs exposed to JavaScript</h4>
<p class=big-issue>A lot of arrays/lists/<span>collection</span>s in this
spec assume zero-based indexes but use the term "<var
@@ -2002,6 +2002,17 @@
defined for that method in its IDL definition, the excess arguments must
be ignored.
+ <p>Unless other specified, if a method is expecting, as one of its
+ arguments, as defined by its IDL definition, an object implementing a
+ particular interface <var title="">X</var>, and the argument passed is an
+ object whose [[Class]] property is neither that interface <var
+ title="">X</var>, nor the name of an interface <var title="">Y</var> where
+ this specification requires that all objects implementing interface <var
+ title="">Y</var> also implement interface <var title="">X</var>, nor the
+ name of an interface that inherits from the expected interface <var
+ title="">X</var>, then a <code title="">TYPE_MISMATCH_ERR</code> exception
+ must be raised.
+
<p class=big-issue>Anything else? Passing the wrong type of object, maybe?
Implied conversions to int/float?
@@ -16742,35 +16753,38 @@
canvas coordinate space, mapping each pixel represented by the <code><a
href="#imagedata">ImageData</a></code> structure into one device pixel.
- <p>If any of the following conditions are true, the method must raise a
- <code>TYPE_MISMATCH_ERR</code> exception:
+ <p>If the first argument to the method is not an object whose [[Class]]
+ property is <code><a href="#imagedata">ImageData</a></code>, but all of
+ the following conditions are true, then the method must treat the first
+ argument as if it was an <code><a href="#imagedata">ImageData</a></code>
+ object (and thus not raise the <code>TYPE_MISMATCH_ERR</code> exception):
<ul>
- <li>The method's first argument is not an object with <code
+ <li>The method's first argument is an object with <code
title=dom-imagedata-width><a href="#width5">width</a></code> and <code
title=dom-imagedata-height><a href="#height5">height</a></code>
attributes with integer values and a <code title=dom-imagedata-data><a
href="#data1">data</a></code> attribute whose value is an integer array.
<li>The <code><a href="#imagedata">ImageData</a></code> object's <code
- title=dom-imagedata-width><a href="#width5">width</a></code> is not
- greater than zero.
+ title=dom-imagedata-width><a href="#width5">width</a></code> is greater
+ than zero.
<li>The <code><a href="#imagedata">ImageData</a></code> object's <code
- title=dom-imagedata-height><a href="#height5">height</a></code> is not
+ title=dom-imagedata-height><a href="#height5">height</a></code> is
greater than zero.
<li>The <code><a href="#imagedata">ImageData</a></code> object's <code
title=dom-imagedata-width><a href="#width5">width</a></code> multiplied
by its <code title=dom-imagedata-height><a
- href="#height5">height</a></code> multiplied by 4 is not equal to the
- number of entries in the the <code><a
- href="#imagedata">ImageData</a></code> object's <code
- title=dom-imagedata-data><a href="#data1">data</a></code> array.
+ href="#height5">height</a></code> multiplied by 4 is equal to the number
+ of entries in the <code><a href="#imagedata">ImageData</a></code>
+ object's <code title=dom-imagedata-data><a href="#data1">data</a></code>
+ array.
<li>The <code><a href="#imagedata">ImageData</a></code> object's <code
- title=dom-imagedata-data><a href="#data1">data</a></code> array contains
- entries that are not in the range 0 to 255 inclusive.
+ title=dom-imagedata-data><a href="#data1">data</a></code> array only
+ contains entries that are in the range 0 to 255 inclusive.
</ul>
<p>The handling of pixel rounding when the specified coordinates do not
Modified: source
===================================================================
--- source 2007-05-16 23:59:29 UTC (rev 821)
+++ source 2007-05-17 00:37:06 UTC (rev 822)
@@ -448,7 +448,8 @@
well.</p> <!-- XXX unexpandable entities? -->
- <h4>Common conformance requirements for APIs</h4>
+ <h4>Common conformance requirements for APIs exposed to
+ JavaScript</h4>
<p class="big-issue">A lot of arrays/lists/<span>collection</span>s
in this spec assume zero-based indexes but use the term "<var
@@ -477,10 +478,22 @@
a <code title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
raised.</p>
- <p>Unless other 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>
+ <p>Unless other 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>
+ <p>Unless other specified, if a method is expecting, as one of its
+ arguments, as defined by its IDL definition, an object implementing
+ a particular interface <var title="">X</var>, and the argument
+ passed is an object whose [[Class]] property is neither that
+ interface <var title="">X</var>, nor the name of an interface <var
+ title="">Y</var> where this specification requires that all objects
+ implementing interface <var title="">Y</var> also implement
+ interface <var title="">X</var>, nor the name of an interface that
+ inherits from the expected interface <var title="">X</var>, then a
+ <code title="">TYPE_MISMATCH_ERR</code> exception must be
+ raised.</p>
+
<p class="big-issue">Anything else? Passing the wrong type of
object, maybe? Implied conversions to int/float?</p>
@@ -14362,34 +14375,37 @@
coordinate space, mapping each pixel represented by the
<code>ImageData</code> structure into one device pixel.</p>
- <p>If any of the following conditions are true, the method must
- raise a <code>TYPE_MISMATCH_ERR</code> exception:</p>
+ <p>If the first argument to the method is not an object whose
+ [[Class]] property is <code>ImageData</code>, but all of the
+ following conditions are true, then the method must treat the first
+ argument as if it was an <code>ImageData</code> object (and thus not
+ raise the <code>TYPE_MISMATCH_ERR</code> exception):</p>
<ul>
- <li>The method's first argument is not an object with <code
+ <li>The method's first argument is an object with <code
title="dom-imagedata-width">width</code> and <code
title="dom-imagedata-height">height</code> attributes with integer
values and a <code title="dom-imagedata-data">data</code> attribute
whose value is an integer array.</li>
<li>The <code>ImageData</code> object's <code
- title="dom-imagedata-width">width</code> is not greater than
+ title="dom-imagedata-width">width</code> is greater than
zero.</li>
<li>The <code>ImageData</code> object's <code
- title="dom-imagedata-height">height</code> is not greater than
+ title="dom-imagedata-height">height</code> is greater than
zero.</li>
<li>The <code>ImageData</code> object's <code
title="dom-imagedata-width">width</code> multiplied by its <code
- title="dom-imagedata-height">height</code> multiplied by 4 is not
- equal to the number of entries in the the <code>ImageData</code>
- object's <code title="dom-imagedata-data">data</code> array.</li>
+ title="dom-imagedata-height">height</code> multiplied by 4 is equal
+ to the number of entries in the <code>ImageData</code> object's
+ <code title="dom-imagedata-data">data</code> array.</li>
<li>The <code>ImageData</code> object's <code
- title="dom-imagedata-data">data</code> array contains entries that
- are not in the range 0 to 255 inclusive.</li>
+ title="dom-imagedata-data">data</code> array only contains entries
+ that are in the range 0 to 255 inclusive.</li>
</ul>
More information about the Commit-Watchers
mailing list