- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 16 Dec 2008 22:52:34 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv12859
Modified Files:
Overview.html
Log Message:
WebIDL: Put in the anonymous [IndexGetter], [NameCreator], etc, operations. (whatwg r2536)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1706
retrieving revision 1.1707
diff -u -d -r1.1706 -r1.1707
--- Overview.html 16 Dec 2008 19:46:53 -0000 1.1706
+++ Overview.html 16 Dec 2008 22:52:31 -0000 1.1707
@@ -4743,21 +4743,18 @@
</dl><h4 id=domstringmap><span class=secno>2.8.5 </span>DOMStringMap</h4><p>The <code><a href=#domstringmap-0>DOMStringMap</a></code> interface represents a set of
name-value pairs. When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is
instanced, it is associated with three algorithms, one for getting
- values from names, one for setting names to certain values, and one
- for deleting names.<p class=XXX>The names of the methods on this interface are
- temporary and will be fixed when the Web IDL / "Language Bindings
- for DOM Specifications" spec is ready to handle this case.<pre class=idl>interface <dfn id=domstringmap-0>DOMStringMap</dfn> {
- [NameGetter] DOMString <a href=#dom-stringmap-xxx1 title=dom-stringmap-XXX1>XXX1</a>(in DOMString name); <!-- XXX DOMB -->
- [NameSetter] void <a href=#dom-stringmap-xxx2 title=dom-stringmap-XXX2>XXX2</a>(in DOMString name, in DOMString value); <!-- XXX DOMB -->
- [XXX] boolean <a href=#dom-stringmap-xxx3 title=dom-stringmap-XXX3>XXX3</a>(in DOMString name); <!-- XXX DOMB -->
-};</pre><p>The <dfn id=dom-stringmap-xxx1 title=dom-stringmap-XXX1><code>XXX1(<var title="">name</var>)</code></dfn> method must call the algorithm for
- getting values from names, passing <var title="">name</var> as the
- name, and must return the corresponding value, or null if <var title="">name</var> has no corresponding value.<p>The <dfn id=dom-stringmap-xxx2 title=dom-stringmap-XXX2><code>XXX2(<var title="">name</var>, <var title="">value</var>)</code></dfn> method
- must call the algorithm for setting names to certain values, passing
- <var title="">name</var> as the name and <var title="">value</var>
- as the value.<p>The <dfn id=dom-stringmap-xxx3 title=dom-stringmap-XXX3><code>XXX3(<var title="">name</var>)</code></dfn> method must call the algorithm for
- deleting names, passing <var title="">name</var> as the name, and
- must return true.<h4 id=dom-feature-strings><span class=secno>2.8.6 </span>DOM feature strings</h4><p>DOM3 Core defines mechanisms for checking for interface support,
+ getting the list of name-value pairs, one for setting names to
+ certain values, and one for deleting names.<pre class=idl>[NameCreator, NameDeleter, NameGetter, NameSetter]
+interface <dfn id=domstringmap-0>DOMStringMap</dfn> {};</pre><p>The <span>names of the supported named properties</span> at any
+ instant are the names obtained from the algorithm for getting the
+ list of name-value pairs at that instant.<p>The value of a property with a name <var title="">name</var> at
+ any instant is the value of the name-value pair with name <var title="">name</var> in the list returned from the algorithm for
+ getting the list of name-value pairs at that instant.<p>The behavior for creating a named property and the behavior for
+ setting a named property are both to invoke the algorithm for
+ setting names to certain values, passing <var title="">name</var> as
+ the name and <var title="">value</var> as the value.<p>The behavior for deleting a named property is to invoke the
+ algorithm for deleting names, passing <var title="">name</var> as
+ the name.<h4 id=dom-feature-strings><span class=secno>2.8.6 </span>DOM feature strings</h4><p>DOM3 Core defines mechanisms for checking for interface support,
and for obtaining implementations of interfaces, using <a href=http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures>feature
strings</a>. <a href=#references>[DOM3CORE]</a><p>A DOM application can use the <dfn id=hasfeature title=hasFeature><code>hasFeature(<var title="">feature</var>,
<var title="">version</var>)</code></dfn> method of the
@@ -5590,19 +5587,19 @@
attribute provides convenient accessors for all the <code title=attr-data-*><a href=#attr-data>data-*</a></code> attributes on an element. On
getting, the <code title=dom-dataset><a href=#dom-dataset>dataset</a></code> DOM attribute
must return a <code><a href=#domstringmap-0>DOMStringMap</a></code> object, associated with the
- following three algorithms, which expose these attributes on their
- element:<dl><dt>The algorithm for getting values from names</dt>
+ following algorithms, which expose these attributes on their
+ element:<dl><dt>The algorithm for getting the list of name-value pairs</dt>
<dd>
- <ol><li>Let <var title="">name</var> be the concatenation of the
- string <code title="">data-</code> and the name passed to the
- algorithm, <a href=#converted-to-lowercase>converted to lowercase</a>.</li>
+ <ol><li>Let <var title="">list</var> be an empty list of name-value pairs.</li>
- <li>If the element does not have an attribute with the name <var title="">name</var>, then the name has no corresponding value,
- abort.</li>
+ <li>For each content attribute on the element whose first five
+ characters are the string "<code title="">data-</code>", add a
+ name-value pair to <var title="">list</var> whose name is the
+ attribute's name with the first five character removed and whose
+ value is the attribute's value.</li>
- <li>Otherwise, return the value of the attribute with the name
- <var title="">name</var>.</li>
+ <li>Return <var title="">list</var>.</li>
</ol></dd>
@@ -5611,7 +5608,7 @@
<dd>
<ol><li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
- algorithm, <a href=#converted-to-lowercase>converted to lowercase</a>.</li>
+ algorithm.</li>
<li>Let <var title="">value</var> be the value passed to the
algorithm.</li>
@@ -5629,7 +5626,7 @@
<dd>
<ol><li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
- algorithm, <a href=#converted-to-lowercase>converted to lowercase</a>.</li>
+ algorithm.</li>
<li>Remove the attribute with the name <var title="">name</var>,
if such an attribute exists. Do nothing otherwise.</li>
@@ -15673,10 +15670,9 @@
readonly attribute <a href=#canvaspixelarray>CanvasPixelArray</a> <a href=#dom-imagedata-data title=dom-imagedata-data>data</a>;
};
+[IndexGetter, IndexSetter]
interface <dfn id=canvaspixelarray>CanvasPixelArray</dfn> {
readonly attribute unsigned long <a href=#dom-canvaspixelarray-length title=dom-canvaspixelarray-length>length</a>;
- [IndexGetter] <span>octet</span> <a href=#dom-canvaspixelarray-xxx5 title=dom-canvaspixelarray-XXX5>XXX5</a>(in unsigned long index); <!-- XXX DOMB -->
- [IndexSetter] void <a href=#dom-canvaspixelarray-xxx6 title=dom-canvaspixelarray-XXX6>XXX6</a>(in unsigned long index, in octet value); <!-- XXX DOMB -->
};</pre><p>The <dfn id=dom-context-2d-canvas title=dom-context-2d-canvas><code>canvas</code></dfn>
attribute must return the <code><a href=#the-canvas-element>canvas</a></code> element that the
context paints on.<p>Unless otherwise stated, for the 2D context interface, any method
@@ -16798,20 +16794,19 @@
starting with 0 for the top left pixel's red component.<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=dom-canvaspixelarray-length 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=dom-canvaspixelarray-xxx5 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=dom-canvaspixelarray-xxx6 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 should be rounded to the nearest
- integer using the IEEE 754r <i>convertToIntegerTiesToEven</i>
- rounding mode. <a href=#references>[ECMA262]</a> <a href=#references>[IEEE754R]</a><p class=XXX>The above is not intended to cause these
- methods to get any unusual behaviour, it's just supposed to be the
- normal behaviour for passing values to a method expecting an <code title="">octet</code> type.<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>
+ number.<p>The object's <span>indices of the supported indexed
+ properties</span> are the numbers in the range 0 .. <span><var title="">h</var>×<var title="">w</var>×4-1</span>.<p>The value of the <span>corresponding indexed property</span> <var title="">index</var> whenever an indexed property is retrieved is
+ the value of the <var title="">index</var>th component in the
+ array.<p>The behavior for setting an indexed property <var title="">index</var> to a value <var title="">value</var> is to 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 should be rounded to the nearest integer using the IEEE
+ 754r <i>convertToIntegerTiesToEven</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 <var title="">sh</var> arguments to the above methods, e.g. if
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>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
@@ -18962,7 +18957,8 @@
<dd><code title=attr-fs-target><a href=#attr-fs-target>target</a></code></dd>
<dt>DOM interface:</dt>
<dd>
-<pre class=idl>interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
+<pre class=idl>[NameGetter, IndexGetter]
+interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
attribute DOMString <a href=#dom-form-accept-charset title=dom-form-accept-charset>accept-charset</a>;
attribute DOMString <a href=#dom-fs-action title=dom-fs-action>action</a>;
attribute DOMString <a href=#dom-fs-enctype title=dom-fs-enctype>enctype</a>;
@@ -18973,8 +18969,6 @@
readonly attribute <a href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a> <a href=#dom-form-elements title=dom-form-elements>elements</a>;
readonly attribute long <a href=#dom-form-length title=dom-form-length>length</a>;
- [IndexGetter] <a href=#htmlelement>HTMLElement</a> <a href=#dom-form-xxx7 title=dom-form-XXX7>XXX7</a>(in unsigned long index);
- [NameGetter] Object <a href=#dom-form-xxx8 title=dom-form-XXX8>XXX8</a>(in DOMString name);
void <a href=#dom-form-submit title=dom-form-submit>submit</a>();
void <a href=#dom-form-reset title=dom-form-reset>reset</a>();
@@ -19004,17 +18998,22 @@
owner</a> is the <code><a href=#the-form-element>form</a></code> element, with the exception of
<code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#image-button-state title=attr-input-type-image>Image Button</a> state, which must,
for historical reasons, be excluded from this particular
- collection.<p>The <dfn id=dom-form-length title=dom-form-length><code>length</code></dfn> DOM
- attribute must return the number of nodes <a href=#represented-by-the-collection title="represented
- by the collection">represented</a> by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection.</p><!-- XXX7 and XXX8: in IE these are called item and namedItem, but
- they have deep magic involved to resolve name clashes with form
- controls of those names. In other browsers, they are anonymous. --><p>The <dfn id=dom-form-xxx7 title=dom-form-XXX7><code>XXX7()</code></dfn> method
- must return the value that would be returned by the <code title=dom-HTMLFormControlsCollection-item><a href=#dom-htmlformcontrolscollection-item>item()</a></code> method of
- the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection if it
- was invoked with the same arguments.<p>The <dfn id=dom-form-xxx8 title=dom-form-XXX8><code>XXX8()</code></dfn> method
- must return the value that would be returned by the <code title=dom-HTMLFormControlsCollection-namedItem><a href=#dom-htmlformcontrolscollection-nameditem>namedItem()</a></code>
- method of the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code>
- collection if it was invoked with the same arguments.<p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
+ collection.<p>The <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection is
+ also mirrored on the <code><a href=#htmlformelement>HTMLFormElement</a></code> object. The <dfn id=dom-form-length title=dom-form-length><code>length</code></dfn> DOM attribute must
+ return the number of nodes <a href=#represented-by-the-collection title="represented by the
+ collection">represented</a> by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection. The
+ <span>indices of the supported indexed properties</span> at any
+ instant are the indicies supported by the object returned by the
+ <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at that
+ instant. The value of the <span>corresponding indexed
+ property</span> whenever an indexed property is retrieved is the
+ value of the <span>corresponding indexed property</span> on the
+ object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute. The <span>names
+ of the supported named properties</span> at any instant are the
+ names supported by the object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at that
+ instant. The value of a property with a name <var title="">name</var> at any instant is the property with the same
+ name on the object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at the same
+ instant.<p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
method, when invoked, must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <code><a href=#the-form-element>form</a></code>
element from the <code><a href=#the-form-element>form</a></code> element itself.<p>The <dfn id=dom-form-reset title=dom-form-reset><code>reset()</code></dfn>
method, when invoked, must <a href=#concept-form-reset title=concept-form-reset>reset</a> the <code><a href=#the-form-element>form</a></code>
@@ -22357,7 +22356,8 @@
<dd><code title=attr-select-size><a href=#attr-select-size>size</a></code></dd>
<dt>DOM interface:</dt>
<dd>
-<pre class=idl>interface <dfn id=htmlselectelement>HTMLSelectElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
+<pre class=idl>[IndexGetter]
+interface <dfn id=htmlselectelement>HTMLSelectElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
attribute boolean <a href=#dom-fe-autofocus title=dom-fe-autofocus>autofocus</a>;
attribute boolean <a href=#dom-fe-disabled title=dom-fe-disabled>disabled</a>;
readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-fae-form title=dom-fae-form>form</a>;
@@ -22369,7 +22369,6 @@
readonly attribute <a href=#htmloptionscollection-0>HTMLOptionsCollection</a> <a href=#dom-select-options title=dom-select-options>options</a>;
attribute unsigned long <a href=#dom-select-length title=dom-select-length>length</a>;
- [IndexGetter] <a href=#htmlelement>HTMLElement</a> <span title=dom-select-XXX9>XXX9</span>(in unsigned long index);
void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in <a href=#htmlelement>HTMLElement</a> before);
void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in long before);
void <a href=#dom-select-remove title=dom-select-remove>remove</a>(in long index);
@@ -22490,7 +22489,13 @@
the <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object returned by the <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute. Similarly, the
<dfn id=dom-select-add title=dom-select-add><code>add()</code></dfn> and <dfn id=dom-select-remove title=dom-select-remove><code>remove()</code></dfn> methods must
act like their namesake methods on that same
- <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object.</p><!-- XXX9 is blocked on WebIDL --><p>The <dfn id=dom-select-selectedoptions title=dom-select-selectedOptions><code>selectedOptions</code></dfn>
+ <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object.<p>The <span>indices of the supported indexed properties</span> at
+ any instant are the indicies supported by the object returned by the
+ <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute at that
+ instant. The value of the <span>corresponding indexed
+ property</span> whenever an indexed property is retrieved is the
+ value of the <span>corresponding indexed property</span> on the
+ object returned by the <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute.<p>The <dfn id=dom-select-selectedoptions title=dom-select-selectedOptions><code>selectedOptions</code></dfn>
DOM attribute must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at
the <code><a href=#the-select-element>select</a></code> node, whose filter matches the elements in
the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>
@@ -26553,7 +26558,8 @@
</ol><h3 id=the-default-view><span class=secno>5.2 </span>The default view</h3><p>The <code>AbstractView</code> object of <a href=#default-view title="default
view">default views</a> must also implement the
- <code><a href=#window>Window</a></code> and <code>EventTarget</code> interfaces.<pre class=idl>[NoInterfaceObject] interface <dfn id=window>Window</dfn> {
+ <code><a href=#window>Window</a></code> and <code>EventTarget</code> interfaces.<pre class=idl>[NoInterfaceObject, IndexGetter]
+interface <dfn id=window>Window</dfn> {
// the current browsing context
readonly attribute <a href=#window>Window</a> <a href=#dom-window title=dom-window>window</a>;
readonly attribute <a href=#window>Window</a> <a href=#dom-self title=dom-self>self</a>;
@@ -26566,7 +26572,6 @@
// other browsing contexts
readonly attribute <a href=#window>Window</a> <a href=#dom-frames title=dom-frames>frames</a>;
readonly attribute unsigned long <a href=#dom-length title=dom-length>length</a>;
- [IndexGetter] <a href=#window>Window</a> <a href=#dom-xxx4 title=dom-XXX4>XXX4</a>(in unsigned long index); <!-- XXX DOMB -->
readonly attribute <a href=#window>Window</a> <a href=#dom-top title=dom-top>top</a>;
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>;
@@ -26666,7 +26671,8 @@
<li>The <code title=dom-frames><a href=#dom-frames>frames</a></code> attribute
- <li>The <code title=dom-XXX4><a href=#dom-xxx4>XXX4</a></code> method
+ <li>Any <span title="corresponding indexed property">corresponding
+ indexed properties</span>
</ul><p>User agents must not allow scripts to override the <code title=dom-location><a href=#dom-location>location</a></code> object's setter.<h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.2.2 </span>APIs for creating and navigating browsing contexts by name</h4><p>The <dfn id=dom-open title=dom-open><code>open()</code></dfn> method on
<code><a href=#window>Window</a></code> objects provides a mechanism for <a href=#navigate title=navigate>navigating</a> an existing <a href=#browsing-context>browsing
@@ -26721,10 +26727,15 @@
attribute on the <code><a href=#window>Window</a></code> interface must return the
number of <a href=#child-browsing-context title="child browsing context">child browsing
contexts</a> of the <a href=#active-document title="active document">active</a>
- <code>Document</code>.<p>The <dfn id=dom-xxx4 title=dom-XXX4><code>XXX4(<var title="">index</var>)</code></dfn> method must return the <var title="">index</var>th <a href=#child-browsing-context>child browsing context</a> of the
+ <code>Document</code>.<p>The <span>indices of the supported indexed properties</span> on the <code><a href=#window>Window</a></code> object at
+ any instant are the numbers in the range 0 .. <var title="">n</var>, where <var title="">n</var> is the
+ number of <a href=#child-browsing-context title="child browsing context">child browsing
+ contexts</a> of the <a href=#active-document title="active document">active</a>
+ <code>Document</code>.<p>The value of a <span>corresponding indexed property</span> <var title="">index</var> whenever an indexed property on a
+ <code><a href=#window>Window</a></code> object is retrieved is the <var title="">index</var>th <a href=#child-browsing-context>child browsing context</a> of the
<a href=#active-document title="active document">active</a> <code>Document</code>,
sorted in document order of the elements nesting those browsing
- contexts.</p><!-- XXX DOMB --><h4 id=garbage-collection-and-browsing-contexts><span class=secno>5.2.4 </span>Garbage collection and browsing contexts</h4><p>A <a href=#browsing-context>browsing context</a> has a strong reference to each of
+ contexts.<h4 id=garbage-collection-and-browsing-contexts><span class=secno>5.2.4 </span>Garbage collection and browsing contexts</h4><p>A <a href=#browsing-context>browsing context</a> has a strong reference to each of
its <code>Document</code>s and <a href=#view title=view>views</a>, and
the user agent itself has a strong reference to its <a href=#top-level-browsing-context title="top-level browsing context">top-level browsing
contexts</a>.<p>When a <a href=#browsing-context>browsing context</a> is to <dfn id=discard-a-document>discard a
@@ -35615,11 +35626,11 @@
<li>
- <li><p>Let <var title="">message clone</var> be the result of
+ <p>Let <var title="">message clone</var> be the result of
obtaining a <a href=#structured-clone>structured clone</a> of the <var title="">message</var> argument. If this throws an exception, then
- throw that exception and abort these steps.</li>
+ throw that exception and abort these steps.</p>
-
+ </li>
<li>
Received on Tuesday, 16 December 2008 22:52:46 UTC