[html5] r5009 - [e] (0) define 'display size' for <select> so that we don't have to keep parsing [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Apr 12 17:26:58 PDT 2010


Author: ianh
Date: 2010-04-12 17:26:57 -0700 (Mon, 12 Apr 2010)
New Revision: 5009

Modified:
   complete.html
   index
   source
Log:
[e] (0) define 'display size' for <select> so that we don't have to keep parsing size='' each time we need it.

Modified: complete.html
===================================================================
--- complete.html	2010-04-13 00:08:25 UTC (rev 5008)
+++ complete.html	2010-04-13 00:26:57 UTC (rev 5009)
@@ -39041,6 +39041,15 @@
 
   <div class=impl>
 
+  <p>The <dfn id=concept-select-size title=concept-select-size>display size</dfn> of a
+  <code><a href=#the-select-element>select</a></code> element is the result of applying the
+  <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a> to the value of
+  element's <code title=attr-input-size><a href=#attr-input-size>size</a></code> attribute, if it
+  has one and parsing it is successful. If applying those rules to the
+  attribute's value is not successful, or if the <code title=attr-input-size><a href=#attr-input-size>size</a></code> attribute is absent, the
+  element's <a href=#concept-select-size title=concept-select-size>display size</a> is
+  the default value of the attribute.</p>
+
   <p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
   attribute is absent, and the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, then the user agent
   should allow the user to pick an <code><a href=#the-option-element>option</a></code> element in its
@@ -83871,27 +83880,23 @@
 
   <p>When the <i title="">select</i> binding applies to a
   <code><a href=#the-select-element>select</a></code> element whose <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent,
-  and the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code>
-  attribute <a href=#rules-for-parsing-non-negative-integers title="rules for parsing non-negative
-  integers">specifies</a> a value greater than 1, the element is
-  expected to render as a single-select list box.</p>
+  and the element's <a href=#concept-select-size title=concept-select-size>display
+  size</a> is greater than 1, the element is expected to render as
+  a single-select list box.</p>
 
   <p>When the element renders as a list box, it is expected to render
   as an 'inline-block' box whose 'height' is the height necessary to
-  contain as many rows for items as <a href=#rules-for-parsing-non-negative-integers title="rules for parsing
-  non-negative integers">specified</a> by the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code> attribute, or four rows if the
+  contain as many rows for items as given by the element's <a href=#concept-select-size title=concept-select-size>display size</a>, or four rows if the
   attribute is absent, and whose 'width' is the <a href="#width-of-the-select's-labels">width of the
   <code>select</code>'s labels</a> plus the width of a
   scrollbar.</p>
 
   <p>When the <i title="">select</i> binding applies to a
   <code><a href=#the-select-element>select</a></code> element whose <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent,
-  and the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code>
-  attribute is either absent or <a href=#rules-for-parsing-non-negative-integers title="rules for parsing
-  non-negative integers">specifies</a> either no value (an error),
-  or a value less than or equal to 1, the element is expected to
-  render as a one-line drop down box whose width is the <a href="#width-of-the-select's-labels">width of
-  the <code>select</code>'s labels</a>.</p>
+  and the element's <a href=#concept-select-size title=concept-select-size>display
+  size</a> is 1, the element is expected to render as a one-line
+  drop down box whose width is the <a href="#width-of-the-select's-labels">width of the
+  <code>select</code>'s labels</a>.</p>
 
   <p>In either case (list box or drop-down box), the element's items
   are expected to be the element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, with the

Modified: index
===================================================================
--- index	2010-04-13 00:08:25 UTC (rev 5008)
+++ index	2010-04-13 00:26:57 UTC (rev 5009)
@@ -38942,6 +38942,15 @@
 
   <div class=impl>
 
+  <p>The <dfn id=concept-select-size title=concept-select-size>display size</dfn> of a
+  <code><a href=#the-select-element>select</a></code> element is the result of applying the
+  <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a> to the value of
+  element's <code title=attr-input-size><a href=#attr-input-size>size</a></code> attribute, if it
+  has one and parsing it is successful. If applying those rules to the
+  attribute's value is not successful, or if the <code title=attr-input-size><a href=#attr-input-size>size</a></code> attribute is absent, the
+  element's <a href=#concept-select-size title=concept-select-size>display size</a> is
+  the default value of the attribute.</p>
+
   <p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
   attribute is absent, and the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, then the user agent
   should allow the user to pick an <code><a href=#the-option-element>option</a></code> element in its
@@ -77137,27 +77146,23 @@
 
   <p>When the <i title="">select</i> binding applies to a
   <code><a href=#the-select-element>select</a></code> element whose <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent,
-  and the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code>
-  attribute <a href=#rules-for-parsing-non-negative-integers title="rules for parsing non-negative
-  integers">specifies</a> a value greater than 1, the element is
-  expected to render as a single-select list box.</p>
+  and the element's <a href=#concept-select-size title=concept-select-size>display
+  size</a> is greater than 1, the element is expected to render as
+  a single-select list box.</p>
 
   <p>When the element renders as a list box, it is expected to render
   as an 'inline-block' box whose 'height' is the height necessary to
-  contain as many rows for items as <a href=#rules-for-parsing-non-negative-integers title="rules for parsing
-  non-negative integers">specified</a> by the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code> attribute, or four rows if the
+  contain as many rows for items as given by the element's <a href=#concept-select-size title=concept-select-size>display size</a>, or four rows if the
   attribute is absent, and whose 'width' is the <a href="#width-of-the-select's-labels">width of the
   <code>select</code>'s labels</a> plus the width of a
   scrollbar.</p>
 
   <p>When the <i title="">select</i> binding applies to a
   <code><a href=#the-select-element>select</a></code> element whose <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute is absent,
-  and the element's <code title=attr-select-size><a href=#attr-select-size>size</a></code>
-  attribute is either absent or <a href=#rules-for-parsing-non-negative-integers title="rules for parsing
-  non-negative integers">specifies</a> either no value (an error),
-  or a value less than or equal to 1, the element is expected to
-  render as a one-line drop down box whose width is the <a href="#width-of-the-select's-labels">width of
-  the <code>select</code>'s labels</a>.</p>
+  and the element's <a href=#concept-select-size title=concept-select-size>display
+  size</a> is 1, the element is expected to render as a one-line
+  drop down box whose width is the <a href="#width-of-the-select's-labels">width of the
+  <code>select</code>'s labels</a>.</p>
 
   <p>In either case (list box or drop-down box), the element's items
   are expected to be the element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, with the

Modified: source
===================================================================
--- source	2010-04-13 00:08:25 UTC (rev 5008)
+++ source	2010-04-13 00:26:57 UTC (rev 5009)
@@ -43342,6 +43342,16 @@
 
   <div class="impl">
 
+  <p>The <dfn title="concept-select-size">display size</dfn> of a
+  <code>select</code> element is the result of applying the
+  <span>rules for parsing non-negative integers</span> to the value of
+  element's <code title="attr-input-size">size</code> attribute, if it
+  has one and parsing it is successful. If applying those rules to the
+  attribute's value is not successful, or if the <code
+  title="attr-input-size">size</code> attribute is absent, the
+  element's <span title="concept-select-size">display size</span> is
+  the default value of the attribute.</p>
+
   <p>If the <code title="attr-select-multiple">multiple</code>
   attribute is absent, and the element is not <span
   title="concept-fe-disabled">disabled</span>, then the user agent
@@ -95476,16 +95486,14 @@
   <p>When the <i title="">select</i> binding applies to a
   <code>select</code> element whose <code
   title="attr-select-multiple">multiple</code> attribute is absent,
-  and the element's <code title="attr-select-size">size</code>
-  attribute <span title="rules for parsing non-negative
-  integers">specifies</span> a value greater than 1, the element is
-  expected to render as a single-select list box.</p>
+  and the element's <span title="concept-select-size">display
+  size</span> is greater than 1, the element is expected to render as
+  a single-select list box.</p>
 
   <p>When the element renders as a list box, it is expected to render
   as an 'inline-block' box whose 'height' is the height necessary to
-  contain as many rows for items as <span title="rules for parsing
-  non-negative integers">specified</span> by the element's <code
-  title="attr-select-size">size</code> attribute, or four rows if the
+  contain as many rows for items as given by the element's <span
+  title="concept-select-size">display size</span>, or four rows if the
   attribute is absent, and whose 'width' is the <span>width of the
   <code>select</code>'s labels</span> plus the width of a
   scrollbar.</p>
@@ -95493,12 +95501,10 @@
   <p>When the <i title="">select</i> binding applies to a
   <code>select</code> element whose <code
   title="attr-select-multiple">multiple</code> attribute is absent,
-  and the element's <code title="attr-select-size">size</code>
-  attribute is either absent or <span title="rules for parsing
-  non-negative integers">specifies</span> either no value (an error),
-  or a value less than or equal to 1, the element is expected to
-  render as a one-line drop down box whose width is the <span>width of
-  the <code>select</code>'s labels</span>.</p>
+  and the element's <span title="concept-select-size">display
+  size</span> is 1, the element is expected to render as a one-line
+  drop down box whose width is the <span>width of the
+  <code>select</code>'s labels</span>.</p>
 
   <p>In either case (list box or drop-down box), the element's items
   are expected to be the element's <span




More information about the Commit-Watchers mailing list