- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 04 Sep 2008 11:10:29 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv24775 Modified Files: Overview.html Log Message: WF2: <optgroup> element summary. (whatwg r2151) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1323 retrieving revision 1.1324 diff -u -d -r1.1323 -r1.1324 --- Overview.html 4 Sep 2008 11:03:53 -0000 1.1323 +++ Overview.html 4 Sep 2008 11:10:26 -0000 1.1324 @@ -6809,9 +6809,10 @@ numbers (old value minus new value). <p class=note>Setting <code title=dom-HTMLOptionsCollection-length><a - href="#length1">length</a></code> never removes or adds any - <code>optgroup</code> elements, and never adds new children to existing - <code>optgroup</code> elements (though it can remove children from them). + href="#length1">length</a></code> never removes or adds any <code><a + href="#optgroup">optgroup</a></code> elements, and never adds new children + to existing <code><a href="#optgroup">optgroup</a></code> elements (though + it can remove children from them). <p>The <dfn id=itemindex1 title=dom-HTMLOptionsCollection-item><code>item(<var @@ -26855,7 +26856,8 @@ <dt>Content model: - <dd>Zero or more <code>option</code> or <code>optgroup</code> elements. + <dd>Zero or more <code>option</code> or <code><a + href="#optgroup">optgroup</a></code> elements. <dt>Element-specific attributes: @@ -26935,15 +26937,46 @@ <dd> <pre - class=idl>interface <dfn id=htmlselectelement0>HTMLSelectElement</dfn> : <a href="#htmlelement">HTMLElement</a> { + class=idl>interface <dfn id=htmldatalistelement>HTMLDataListElement</dfn> : <a href="#htmlelement">HTMLElement</a> { readonly attribute <a href="#htmloptionscollection0">HTMLOptionsCollection</a> <span title=dom-select-options>options</span>; };</pre> </dl> <p class=big-issue>... - <h4 id=the-optgroup><span class=secno>4.9.8 </span>The - <code>optgroup</code> element</h4> + <h4 id=the-optgroup><span class=secno>4.9.8 </span>The <dfn + id=optgroup><code>optgroup</code></dfn> element</h4> + + <dl class=element> + <dt>Categories + + <dd>None. + + <dt>Contexts in which this element may be used: + + <dd>As a child of a <code><a href="#select">select</a></code> element. + + <dt>Content model: + + <dd>Zero or more <code>option</code> elements. + + <dt>Element-specific attributes: + + <dd><code title=attr-optgroup-disabled>disabled</code> + + <dd><code title=attr-optgroup-label>label</code> + + <dt>DOM interface: + + <dd> + <pre + class=idl>interface <dfn id=htmloptgroupelement>HTMLOptGroupElement</dfn> : <a href="#htmlelement">HTMLElement</a> { + attribute boolean <span title=dom-select-disabled>disabled</span>; + attribute DOMString <span title=dom-select-label>label</span>; +};</pre> + </dl> + + <p class=big-issue>... <h4 id=the-option><span class=secno>4.9.9 </span>The <code>option</code> element</h4> @@ -28837,8 +28870,9 @@ href="#datagrid0">datagrid</a></code> element (the <code><a href="#select">select</a></code> or <code><a href="#datalist">datalist</a></code> element), that skips all nodes - other than <code>optgroup</code> and <code>option</code> elements, as - well as any descendents of any <code>option</code> elements.</p> + other than <code><a href="#optgroup">optgroup</a></code> and + <code>option</code> elements, as well as any descendents of any + <code>option</code> elements.</p> <p>Given a path <var title="">row</var>, the corresponding element is the one obtained by drilling into the view, taking the child given by the @@ -28905,8 +28939,8 @@ <ul> <li>If the <var title="">row</var>'s corresponding element is an - <code>optgroup</code> element: <code title=datagrid-row-class-header><a - href="#header0">header</a></code> + <code><a href="#optgroup">optgroup</a></code> element: <code + title=datagrid-row-class-header><a href="#header0">header</a></code> <li>If the <var title="">row</var>'s corresponding element contains other elements that are also in the view, and the element's <code @@ -28927,9 +28961,10 @@ href="#getcelldata">getCellData(<var title="">row</var>, <var title="">cell</var>)</a></code> method must return the value of the <code title=attr-optgroup-label>label</code> attribute if the <var - title="">row</var>'s corresponding element is an <code>optgroup</code> - element, otherwise, if the <var title="">row</var>'s corresponding - element is an <code>option</code>element, its <code + title="">row</var>'s corresponding element is an <code><a + href="#optgroup">optgroup</a></code> element, otherwise, if the <var + title="">row</var>'s corresponding element is an + <code>option</code>element, its <code title=attr-option-label>label</code> attribute if it has one, otherwise the value of its <code><a href="#textcontent">textContent</a></code> DOM attribute.</p> @@ -29141,8 +29176,8 @@ <code><a href="#textcontent">textContent</a></code> of the current <code>option</code> element (the <code title=attr-option-label>label</code> attribute is <a href="#ignored" - title=ignore>ignored</a> in this context as the <code>optgroup</code>s - are not displayed).</p> + title=ignore>ignored</a> in this context as the <code><a + href="#optgroup">optgroup</a></code>s are not displayed).</p> <p>The <code title=dom-provider-getCellClasses><a href="#getcellclasses">getCellClasses()</a></code> method must add the @@ -30687,7 +30722,7 @@ <dt>A <code><a href="#menu">menu</a></code> element with a <code title=attr-menu-label><a href="#label2">label</a></code> attribute - <dt>An <code>optgroup</code> element + <dt>An <code><a href="#optgroup">optgroup</a></code> element <dd>Append a submenu to the menu, using the value of the element's <code title="">label</code> attribute as the label of the menu. The submenu @@ -30703,11 +30738,12 @@ the algorithm above -- just iterate through the contents like with <code><a href="#li">li</a></code>, to support <code><a href="#input0">input</a></code> elements in <code><a - href="#label">label</a></code> elements. Also, <code>optgroup</code> - elements without labels should be ignored (maybe? or at least should say - they have no label so that they are dropped below), and <code><a - href="#select">select</a></code> elements inside <code><a - href="#label">label</a></code> elements may need special processing. + href="#label">label</a></code> elements. Also, <code><a + href="#optgroup">optgroup</a></code> elements without labels should be + ignored (maybe? or at least should say they have no label so that they are + dropped below), and <code><a href="#select">select</a></code> elements + inside <code><a href="#label">label</a></code> elements may need special + processing. <p>Once all the nodes have been processed as described above, the user agent must the post-process the menu as follows: @@ -46325,11 +46361,12 @@ <select>; commented out text below can handle the non-<select> case if we ever allow it) --> - <p>An <code>optgroup</code> element's <span title=syntax-end-tag>end - tag</span> may be omitted if the <code>optgroup</code> element - <!--has an ancestor - <code>select</code> element and--> is immediately - followed by another <code>optgroup</code> element, or if + <p>An <code><a href="#optgroup">optgroup</a></code> element's <span + title=syntax-end-tag>end tag</span> may be omitted if the <code><a + href="#optgroup">optgroup</a></code> element <!--has an ancestor + <code>select</code> element and--> + is immediately followed by another <code><a + href="#optgroup">optgroup</a></code> element, or if <!--all of the elements that are ancestors of the <code>optgroup</code> element, up to and including the first ancestor element that is not an @@ -46347,8 +46384,8 @@ <p>An <code>option</code> element's <span title=syntax-end-tag>end tag</span> may be omitted if the <code>option</code> element is immediately followed by another <code>option</code> element, or if it is - immediately followed by an <code>optgroup</code> element, or if there is - no more content in the parent element.</p> + immediately followed by an <code><a href="#optgroup">optgroup</a></code> + element, or if there is no more content in the parent element.</p> <!-- <colgroup> --> <p>A <code><a href="#colgroup">colgroup</a></code> element's <span @@ -46428,15 +46465,17 @@ <p>For historical reasons, certain elements have extra restrictions beyond even the restrictions given by their content model. - <p>An <code>optgroup</code> element <!--that is a descendant of a - <code>select</code> element--> - must not contain <code>optgroup</code> elements, even though these - elements are technically allowed to be nested according to the content - models described in this specification. (If an <code>optgroup</code> - element is put inside another <!--<code>optgroup</code> element + <p>An <code><a href="#optgroup">optgroup</a></code> element + <!--that is a descendant of a + <code>select</code> element--> must not + contain <code><a href="#optgroup">optgroup</a></code> elements, even + though these elements are technically allowed to be nested according to + the content models described in this specification. (If an <code><a + href="#optgroup">optgroup</a></code> element is put inside another + <!--<code>optgroup</code> element inside a <code>select</code> element--> - in the markup, it will in fact imply an <code>optgroup</code> end tag - before it.) + in the markup, it will in fact imply an <code><a + href="#optgroup">optgroup</a></code> end tag before it.) <p>A <code><a href="#table">table</a></code> element must not contain <code><a href="#tr">tr</a></code> elements, even though these elements are @@ -50064,11 +50103,12 @@ end tags</dfn>, then, while the <a href="#current5">current node</a> is a <code><a href="#dd">dd</a></code> element, a <code><a href="#dt">dt</a></code> element, an <code><a href="#li">li</a></code> - element, an <code>option</code> element, an <code>optgroup</code> element, - a <code><a href="#p">p</a></code> element, an <code><a - href="#rp">rp</a></code> element, or an <code><a href="#rt">rt</a></code> - element, the UA must pop the <a href="#current5">current node</a> off the - <a href="#stack">stack of open elements</a>. + element, an <code>option</code> element, an <code><a + href="#optgroup">optgroup</a></code> element, a <code><a + href="#p">p</a></code> element, an <code><a href="#rp">rp</a></code> + element, or an <code><a href="#rt">rt</a></code> element, the UA must pop + the <a href="#current5">current node</a> off the <a href="#stack">stack of + open elements</a>. <p>If a step requires the UA to generate implied end tags but lists an element to exclude from the process, then the UA must perform the above @@ -52883,9 +52923,9 @@ <p>If the <a href="#current5">current node</a> is an <code>option</code> element, act as if an end tag with the tag name "option" had been seen.</p> - <p>If the <a href="#current5">current node</a> is an - <code>optgroup</code> element, act as if an end tag with the tag name - "optgroup" had been seen.</p> + <p>If the <a href="#current5">current node</a> is an <code><a + href="#optgroup">optgroup</a></code> element, act as if an end tag with + the tag name "optgroup" had been seen.</p> <p><a href="#insert0">Insert an HTML element</a> for the token.</p> @@ -52894,13 +52934,13 @@ <dd> <p>First, if the <a href="#current5">current node</a> is an <code>option</code> element, and the node immediately before it in the - <a href="#stack">stack of open elements</a> is an <code>optgroup</code> - element, then act as if an end tag with the tag name "option" had been - seen.</p> + <a href="#stack">stack of open elements</a> is an <code><a + href="#optgroup">optgroup</a></code> element, then act as if an end tag + with the tag name "option" had been seen.</p> - <p>If the <a href="#current5">current node</a> is an - <code>optgroup</code> element, then pop that node from the <a - href="#stack">stack of open elements</a>. Otherwise, this is a <a + <p>If the <a href="#current5">current node</a> is an <code><a + href="#optgroup">optgroup</a></code> element, then pop that node from + the <a href="#stack">stack of open elements</a>. Otherwise, this is a <a href="#parse2">parse error</a>; ignore the token.</p> <dt>An end tag whose tag name is "option"
Received on Thursday, 4 September 2008 11:11:04 UTC