[html5] r1590 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon May 12 02:29:58 PDT 2008


Author: ianh
Date: 2008-05-12 02:29:57 -0700 (Mon, 12 May 2008)
New Revision: 1590

Modified:
   index
   source
Log:
[] (0) Big cleanup of the 'reflect' definitions.

Modified: index
===================================================================
--- index	2008-05-12 09:06:21 UTC (rev 1589)
+++ index	2008-05-12 09:29:57 UTC (rev 1590)
@@ -2986,10 +2986,10 @@
    getting, the DOM attribute must <span title="split the string on
    spaces">split the content attribute on spaces</span> and return the
    concatenation of each token URI, resolved to an absolute URI, with a
-   single U+0020 SPACE character between each URI; and on setting, must set
-   the content attribute to the specified literal value. If the content
-   attribute is absent, the DOM attribute must return the default value, if
-   the content attribute has one, or else the empty string.
+   single U+0020 SPACE character between each URI; if the content attribute
+   is absent, the DOM attribute must return the default value, if the content
+   attribute has one, or else the empty string. On setting, the DOM attribute
+   must set the content attribute to the specified literal value.
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> whose content
    attribute is an <a href="#enumerated">enumerated attribute</a>, and the
@@ -3008,32 +3008,35 @@
    fall into any of the above categories, then the getting and setting must
    be done in a transparent, case-preserving manner.
 
-  <p>If a reflecting DOM attribute is a boolean attribute, then the DOM
-   attribute must return true if the attribute is set, and false if it is
-   absent. On setting, the content attribute must be removed if the DOM
+  <p>If a reflecting DOM attribute is a boolean attribute, then on getting
+   the DOM attribute must return true if the attribute is set, and false if
+   it is absent. On setting, the content attribute must be removed if the DOM
    attribute is set to false, and must be set to have the same value as its
    name if the DOM attribute is set to true. (This corresponds to the rules
    for <a href="#boolean0" title="boolean attribute">boolean content
    attributes</a>.)
 
   <p>If a reflecting DOM attribute is a signed integer type
-   (<code>long</code>) then the content attribute must be parsed according to
-   <a href="#rules0" title="rules for parsing integers">the rules for parsing
-   signed integers</a> first. If that fails, or if the attribute is absent,
-   the default value must be returned instead, or 0 if there is no default
-   value. On setting, the given value must be converted to a string
-   representing the number as a <a href="#valid0">valid integer</a> in base
-   ten and then that string must be used as the new content attribute value.
+   (<code>long</code>) then, on getting, the content attribute must be parsed
+   according to <a href="#rules0" title="rules for parsing integers">the
+   rules for parsing signed integers</a>, and if that is successful, the
+   resulting value must be returned. If, on the other hand, it fails, or if
+   the attribute is absent, then the default value must be returned instead,
+   or 0 if there is no default value. On setting, the given value must be
+   converted to the shortest possible string representing the number as a <a
+   href="#valid0">valid integer</a> in base ten and then that string must be
+   used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is an <em>unsigned</em> integer type
-   (<code>unsigned long</code>) then the content attribute must be parsed
-   according to <a href="#rules" title="rules for parsing non-negative
-   integers">the rules for parsing unsigned integers</a> first. If that
-   fails, or if the attribute is absent, the default value must be returned
-   instead, or 0 if there is no default value. On setting, the given value
-   must be converted to a string representing the number as a <a
-   href="#valid">valid non-negative integer</a> in base ten and then that
-   string must be used as the new content attribute value.
+   (<code>unsigned long</code>) then, on getting, the content attribute must
+   be parsed according to <a href="#rules" title="rules for parsing
+   non-negative integers">the rules for parsing unsigned integers</a>, and if
+   that is successful, the resulting value must be returned. If, on the other
+   hand, it fails, or if the attribute is absent, the default value must be
+   returned instead, or 0 if there is no default value. On setting, the given
+   value must be converted to the shortest possible string representing the
+   number as a <a href="#valid">valid non-negative integer</a> in base ten
+   and then that string must be used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is an unsigned integer type
    (<code>unsigned long</code>) that is <dfn id=limited1>limited to only
@@ -3041,40 +3044,55 @@
    previous case, but zero is not allowed. On getting, the content attribute
    must first be parsed according to <a href="#rules" title="rules for
    parsing non-negative integers">the rules for parsing unsigned
-   integers</a>, and if that fails, or if the attribute is absent, the
-   default value must be returned instead, or 1 if there is no default value.
-   On setting, if the value is zero, the user agent must fire an
+   integers</a>, and if that is successful, the resulting value must be
+   returned. If, on the other hand, it fails, or if the attribute is absent,
+   the default value must be returned instead, or 1 if there is no default
+   value. On setting, if the value is zero, the user agent must fire an
    <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given value must be
-   converted to a string representing the number as a <a href="#valid">valid
-   non-negative integer</a> in base ten and then that string must be used as
-   the new content attribute value.
+   converted to the shortest possible string representing the number as a <a
+   href="#valid">valid non-negative integer</a> in base ten and then that
+   string must be used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is a floating point number type
    (<code>float</code>) and the content attribute is defined to contain a
-   time offset, then the content attribute must be parsed according to <a
-   href="#rules4" title="rules for parsing time offsets">the rules for
-   parsing time ofsets</a> first. If that fails, or if the attribute is
-   absent, the default value must be returned, or the not-a-number value
-   (NaN) if there is no default value. Otherwise, the parsed value in
-   milliseconds must be returned. On setting, the given value, interpreted as
-   a time offset in milliseconds, must be converted to a string using the <a
-   href="#time-offset">time offset serialisation rules</a>, and that string
-   must be used as the new content attribute value.
+   time offset, then, on getting, the content attribute must be parsed
+   according to <a href="#rules4" title="rules for parsing time offsets">the
+   rules for parsing time ofsets</a>, and if that is successful, the
+   resulting value, in seconds, must be returned. If that fails, or if the
+   attribute is absent, the default value must be returned, or the
+   not-a-number value (NaN) if there is no default value. On setting, the
+   given value, interpreted as a time offset in seconds, must be converted to
+   a string using the <a href="#time-offset">time offset serialisation
+   rules</a>, and that string must be used as the new content attribute
+   value.
 
+  <p>If a reflecting DOM attribute is a floating point number type
+   (<code>float</code>) and it doesn't fall into one of the earlier
+   categories, then, on getting, the content attribute must be parsed
+   according to <a href="#rules1" title="rules for parsing floating point
+   number values">the rules for parsing floating point number values</a>, and
+   if that is successful, the resulting value must be returned. If, on the
+   other hand, it fails, or if the attribute is absent, the default value
+   must be returned instead, or 0.0 if there is no default value. On setting,
+   the given value must be converted to the shortest possible string
+   representing the number as a <a href="#valid1">valid floating point
+   number</a> in base ten and then that string must be used as the new
+   content attribute value.
+
   <p>If a reflecting DOM attribute is of the type <code><a
    href="#domtokenlist0">DOMTokenList</a></code>, then on getting it must
    return a <code><a href="#domtokenlist0">DOMTokenList</a></code> object
    whose underlying string is the element's corresponding content attribute.
    When the <code><a href="#domtokenlist0">DOMTokenList</a></code> object
-   mutates its underlying string, the attribute must itself be immediately
-   mutated. When the attribute is absent, then the string represented by the
-   <code><a href="#domtokenlist0">DOMTokenList</a></code> object is the empty
-   string; when the object mutates this empty string, the user agent must
-   first add the corresponding content attribute, and then mutate that
-   attribute instead. <code><a href="#domtokenlist0">DOMTokenList</a></code>
-   attributes are always read-only. The same <code><a
-   href="#domtokenlist0">DOMTokenList</a></code> object must be returned
-   every time for each attribute.
+   mutates its underlying string, the content attribute must itself be
+   immediately mutated. When the attribute is absent, then the string
+   represented by the <code><a href="#domtokenlist0">DOMTokenList</a></code>
+   object is the empty string; when the object mutates this empty string, the
+   user agent must first add the corresponding content attribute, and then
+   mutate that attribute instead. <code><a
+   href="#domtokenlist0">DOMTokenList</a></code> attributes are always
+   read-only. The same <code><a href="#domtokenlist0">DOMTokenList</a></code>
+   object must be returned every time for each attribute.
 
   <p>If a reflecting DOM attribute has the type <code><a
    href="#htmlelement">HTMLElement</a></code>, or an interface that descends

Modified: source
===================================================================
--- source	2008-05-12 09:06:21 UTC (rev 1589)
+++ source	2008-05-12 09:29:57 UTC (rev 1590)
@@ -1289,11 +1289,11 @@
   URIs, then on getting, the DOM attribute must <span title="split the
   string on spaces">split the content attribute on spaces</span> and
   return the concatenation of each token URI, resolved to an absolute
-  URI, with a single U+0020 SPACE character between each URI; and on
-  setting, must set the content attribute to the specified literal
-  value. If the content attribute is absent, the DOM attribute must
-  return the default value, if the content attribute has one, or else
-  the empty string.</p>
+  URI, with a single U+0020 SPACE character between each URI; if the
+  content attribute is absent, the DOM attribute must return the
+  default value, if the content attribute has one, or else the empty
+  string. On setting, the DOM attribute must set the content attribute
+  to the specified literal value.</p>
 
   <p>If a reflecting DOM attribute is a <code>DOMString</code> whose
   content attribute is an <span>enumerated attribute</span>, and the
@@ -1313,32 +1313,36 @@
   doesn't fall into any of the above categories, then the getting and
   setting must be done in a transparent, case-preserving manner.</p>
 
-  <p>If a reflecting DOM attribute is a boolean attribute, then the
-  DOM attribute must return true if the attribute is set, and false if
-  it is absent. On setting, the content attribute must be removed if
-  the DOM attribute is set to false, and must be set to have the same
-  value as its name if the DOM attribute is set to true. (This
-  corresponds to the rules for <span title="boolean attribute">boolean
-  content attributes</span>.)</p>
+  <p>If a reflecting DOM attribute is a boolean attribute, then on
+  getting the DOM attribute must return true if the attribute is set,
+  and false if it is absent. On setting, the content attribute must be
+  removed if the DOM attribute is set to false, and must be set to
+  have the same value as its name if the DOM attribute is set to
+  true. (This corresponds to the rules for <span title="boolean
+  attribute">boolean content attributes</span>.)</p>
 
   <p>If a reflecting DOM attribute is a signed integer type
-  (<code>long</code>) then the content attribute must be parsed
-  according to <span title="rules for parsing integers">the rules for
-  parsing signed integers</span> first. If that fails, or if the
-  attribute is absent, the default value must be returned instead, or
-  0 if there is no default value. On setting, the given value must be
-  converted to a string representing the number as a <span>valid
-  integer</span> in base ten and then that string must be used as the
-  new content attribute value.</p>
+  (<code>long</code>) then, on getting, the content attribute must be
+  parsed according to <span title="rules for parsing integers">the
+  rules for parsing signed integers</span>, and if that is successful,
+  the resulting value must be returned. If, on the other hand, it
+  fails, or if the attribute is absent, then the default value must be
+  returned instead, or 0 if there is no default value. On setting, the
+  given value must be converted to the shortest possible string
+  representing the number as a <span>valid integer</span> in base ten
+  and then that string must be used as the new content attribute
+  value.</p>
 
   <p>If a reflecting DOM attribute is an <em>unsigned</em> integer
-  type (<code>unsigned long</code>) then the content attribute must be
-  parsed according to <span title="rules for parsing non-negative
-  integers">the rules for parsing unsigned integers</span> first. If
-  that fails, or if the attribute is absent, the default value must be
-  returned instead, or 0 if there is no default value. On setting, the
-  given value must be converted to a string representing the number as
-  a <span>valid non-negative integer</span> in base ten and then that
+  type (<code>unsigned long</code>) then, on getting, the content
+  attribute must be parsed according to <span title="rules for parsing
+  non-negative integers">the rules for parsing unsigned
+  integers</span>, and if that is successful, the resulting value must
+  be returned. If, on the other hand, it fails, or if the attribute is
+  absent, the default value must be returned instead, or 0 if there is
+  no default value. On setting, the given value must be converted to
+  the shortest possible string representing the number as a
+  <span>valid non-negative integer</span> in base ten and then that
   string must be used as the new content attribute value.</p>
 
   <p>If a reflecting DOM attribute is an unsigned integer type
@@ -1347,36 +1351,52 @@
   case, but zero is not allowed. On getting, the content attribute
   must first be parsed according to <span title="rules for parsing
   non-negative integers">the rules for parsing unsigned
-  integers</span>, and if that fails, or if the attribute is absent,
-  the default value must be returned instead, or 1 if there is no
-  default value. On setting, if the value is zero, the user agent must
-  fire an <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given
-  value must be converted to a string representing the number as a
-  <span>valid non-negative integer</span> in base ten and then that
-  string must be used as the new content attribute value.</p>
+  integers</span>, and if that is successful, the resulting value must
+  be returned. If, on the other hand, it fails, or if the attribute is
+  absent, the default value must be returned instead, or 1 if there is
+  no default value. On setting, if the value is zero, the user agent
+  must fire an <code>INDEX_SIZE_ERR</code> exception. Otherwise, the
+  given value must be converted to the shortest possible string
+  representing the number as a <span>valid non-negative integer</span>
+  in base ten and then that string must be used as the new content
+  attribute value.</p>
 
   <p>If a reflecting DOM attribute is a floating point number type
   (<code>float</code>) and the content attribute is defined to contain
-  a time offset, then the content attribute must be parsed according
-  to <span title="rules for parsing time offsets">the rules for
-  parsing time ofsets</span> first. If that fails, or if the attribute
-  is absent, the default value must be returned, or the not-a-number
-  value (NaN) if there is no default value. Otherwise, the parsed
-  value in milliseconds must be returned. On setting, the given value,
-  interpreted as a time offset in milliseconds, must be converted to a
-  string using the <span>time offset serialisation rules</span>, and
-  that string must be used as the new content attribute value.</p>
+  a time offset, then, on getting, the content attribute must be
+  parsed according to <span title="rules for parsing time offsets">the
+  rules for parsing time ofsets</span>, and if that is successful, the
+  resulting value, in seconds, must be returned. If that fails, or if
+  the attribute is absent, the default value must be returned, or the
+  not-a-number value (NaN) if there is no default value. On setting,
+  the given value, interpreted as a time offset in seconds, must be
+  converted to a string using the <span>time offset serialisation
+  rules</span>, and that string must be used as the new content
+  attribute value.</p>
 
+  <p>If a reflecting DOM attribute is a floating point number type
+  (<code>float</code>) and it doesn't fall into one of the earlier
+  categories, then, on getting, the content attribute must be parsed
+  according to <span title="rules for parsing floating point number
+  values">the rules for parsing floating point number values</span>,
+  and if that is successful, the resulting value must be returned. If,
+  on the other hand, it fails, or if the attribute is absent, the
+  default value must be returned instead, or 0.0 if there is no
+  default value. On setting, the given value must be converted to the
+  shortest possible string representing the number as a <span>valid
+  floating point number</span> in base ten and then that string must
+  be used as the new content attribute value.</p>
+
   <p>If a reflecting DOM attribute is of the type
   <code>DOMTokenList</code>, then on getting it must return a
   <code>DOMTokenList</code> object whose underlying string is the
   element's corresponding content attribute. When the
   <code>DOMTokenList</code> object mutates its underlying string, the
-  attribute must itself be immediately mutated. When the attribute is
-  absent, then the string represented by the <code>DOMTokenList</code>
-  object is the empty string; when the object mutates this empty
-  string, the user agent must first add the corresponding content
-  attribute, and then mutate that attribute
+  content attribute must itself be immediately mutated. When the
+  attribute is absent, then the string represented by the
+  <code>DOMTokenList</code> object is the empty string; when the
+  object mutates this empty string, the user agent must first add the
+  corresponding content attribute, and then mutate that attribute
   instead. <code>DOMTokenList</code> attributes are always
   read-only. The same <code>DOMTokenList</code> object must be
   returned every time for each attribute.</p>




More information about the Commit-Watchers mailing list