HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2230

File a bug

SVNBugCommentTime (UTC)
2230WF2: Collapse down some of the <input> algorithms for simplicity. Fill in a little more type=datetime detail (not much). Minor editorial fixes.2008-09-24 11:25
Index: source
===================================================================
--- source	(revision 2229)
+++ source	(revision 2230)
@@ -1883,6 +1883,7 @@
   Gregorian calendar. <a
   href="#refsGREGORIAN">[GREGORIAN]</a></p>
 
+
   <h5>Specific moments in time</h5>
 
   <p>A string is a <dfn>valid datetime</dfn> if it has four digits
@@ -2560,8 +2561,20 @@
   </ol>
 
 
-  <h4>Time offsets</h4>
+  <h5>UTC dates and times</h5>
 
+  <p>A <dfn>UTC date and time</dfn> consists of a specific Gregorian
+  date expressed relative to the UTC timezone, consisting of a year, a
+  month, a day, an hour, a minute, a second, and a fraction of a
+  second. <a href="#refsGREGORIAN">[GREGORIAN]</a></p>
+
+  <p class="big-issue">... <dfn>valid UTC date and time</dfn></p>
+
+  <p class="big-issue">... rules to <dfn>parse a UTC date and time</dfn></p>
+
+
+  <h5>Time offsets</h5>
+
   <p class="big-issue"><dfn>valid time offset</dfn>, <dfn>rules for
   parsing time offsets</dfn>, <dfn>time offset serialization
   rules</dfn>; in the format "5d4h3m2s1ms" or "3m 9.2s" or "00:00:00.00"
@@ -26060,7 +26073,7 @@
   title="attr-input-type">type</code> attribute changes state, and
   when the element is first created, the element's rendering and
   behaviour must change to the new state's accordingly and the
-  <dfn>control initialization algorithm</dfn> defined for the <code
+  <dfn>value sanitization algorithm</dfn> defined for the <code
   title="attr-input-type">type</code> attribute's new state must be
   invoked.</p>
 
@@ -26112,17 +26125,18 @@
   content attribute gives the default <span
   title="concept-fe-value">value</span> of the <code>input</code>
   element. When the <code title="attr-input-value">value</code>
-  content attribute is added, set, or removed, and when the element is
-  first created, after invoking the <span>control initialization
-  algorithm</span>, the <dfn>default value change algorithm</dfn>
-  defined for the <code title="attr-input-type">type</code>
-  attribute's current state must be invoked.</p>
+  content attribute is added, set, or removed, if the control is not
+  <i title="concept-input-dirty">dirty</i>, the user agent must set
+  the <span title="concept-fe-value">value</span> of the element to
+  the value of the <code title="attr-input-value">value</code> content
+  attribute, if there is one, or the empty string otherwise, and run
+  the <span>value sanitization algorithm</span>.</p>
 
   <p>The <span title="concept-form-reset-control">reset
   algorithm</span> for <code>input</code> elements is to set the <span
   title="concept-input-dirty-flag">dirty flag</span> back to false
   (not <i title="concept-input-dirty">dirty</i>), and then invoke the
-  <span>default value change algorithm</span> defined for the <code
+  <span>value sanitization algorithm</span> defined for the <code
   title="attr-input-type">type</code> attribute's current state.</p>
 
   <p>The <code title="attr-fae-form">form</code> attribute is used to
@@ -26197,24 +26211,9 @@
   elements.</p>
 
   <p><strong>The <span title="attr-input-type-text">Text</span>
-  state's <span>control initialization algorithm</span> is as
-  follows:</strong> <span>Strip line breaks from the
-  value</span>.</p>
+  state's <span>value sanitization algorithm</span> is as
+  follows:</strong> <span>Strip line breaks from the value</span>.</p>
 
-  <p><strong>The <span title="attr-input-type-text">Text</span>
-  state's <span>default value change algorithm</span> is as
-  follows:</strong> If the <code>input</code> element is not <i
-  title="concept-input-dirty">dirty</i> then set the <span
-  title="concept-fe-value">value</span> of the element to the value of
-  the <code title="attr-input-value">value</code> content attribute
-  and <span>strip line breaks from the value</span>.</p>
-
-  <p><strong>The <span title="attr-input-type-text">Text</span>
-  state's <span><code title="dom-input-value">value</code> setter
-  algorithm</span> is as follows:</strong> Set the <span
-  title="concept-fe-value">value</span> of the element to the new
-  value and <span>strip line breaks from the value</span>.</p>
-
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-text">Text</span> state, the following common
@@ -26284,26 +26283,10 @@
   elements.</p>
 
   <p><strong>The <span
-  title="attr-input-type-password">Password</span> state's
-  <span>control initialization algorithm</span> is as
-  follows:</strong> <span>Strip line breaks from the value</span>.</p>
+  title="attr-input-type-password">Password</span> state's <span>value
+  sanitization algorithm</span> is as follows:</strong> <span>Strip
+  line breaks from the value</span>.</p>
 
-  <p><strong>The <span
-  title="attr-input-type-password">Password</span> state's
-  <span>default value change algorithm</span> is as follows:</strong>
-  If the <code>input</code> element is not <i
-  title="concept-input-dirty">dirty</i> then set the <span
-  title="concept-fe-value">value</span> of the element to the value of
-  the <code title="attr-input-value">value</code> content attribute
-  and <span>strip line breaks from the value</span>.</p>
-
-  <p><strong>The <span
-  title="attr-input-type-password">Password</span> state's <span><code
-  title="dom-input-value">value</code> setter algorithm</span> is as
-  follows:</strong> Set the <span
-  title="concept-fe-value">value</span> of the element to the new
-  value and <span>strip line breaks from the value</span>.</p>
-
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-password">Password</span> state, the
@@ -26375,24 +26358,9 @@
   elements.</p>
 
   <p><strong>The <span title="attr-input-type-email">E-mail</span>
-  state's <span>control initialization algorithm</span> is as
-  follows:</strong> <span>Strip line breaks from the
-  value</span>.</p>
+  state's <span>value sanitization algorithm</span> is as
+  follows:</strong> <span>Strip line breaks from the value</span>.</p>
 
-  <p><strong>The <span title="attr-input-type-email">E-mail</span>
-  state's <span>default value change algorithm</span> is as
-  follows:</strong> If the <code>input</code> element is not <i
-  title="concept-input-dirty">dirty</i> then set the <span
-  title="concept-fe-value">value</span> of the element to the value of
-  the <code title="attr-input-value">value</code> content attribute
-  and <span>strip line breaks from the value</span>.</p>
-
-  <p><strong>The <span title="attr-input-type-email">E-mail</span>
-  state's <span><code title="dom-input-value">value</code> setter
-  algorithm</span> is as follows:</strong> Set the <span
-  title="concept-fe-value">value</span> of the element to the new
-  value and <span>strip line breaks from the value</span>.</p>
-
   <p><strong>Constraint validation:</strong> While the <span
   title="concept-fe-value">value</span> of the element does not match
   the <code>addr-spec</code> token defined in RFC 2822 section 3.4.1,
@@ -26473,24 +26441,10 @@
   elements.</p>
 
   <p><strong>The <span title="attr-input-type-url">URL</span>
-  state's <span>control initialization algorithm</span> is as
+  state's <span>value sanitization algorithm</span> is as
   follows:</strong> <span>Strip line breaks from the
   value</span>.</p>
 
-  <p><strong>The <span title="attr-input-type-url">URL</span>
-  state's <span>default value change algorithm</span> is as
-  follows:</strong> If the <code>input</code> element is not <i
-  title="concept-input-dirty">dirty</i> then set the <span
-  title="concept-fe-value">value</span> of the element to the value of
-  the <code title="attr-input-value">value</code> content attribute
-  and <span>strip line breaks from the value</span>.</p>
-
-  <p><strong>The <span title="attr-input-type-url">URL</span>
-  state's <span><code title="dom-input-value">value</code> setter
-  algorithm</span> is as follows:</strong> Set the <span
-  title="concept-fe-value">value</span> of the element to the new
-  value and <span>strip line breaks from the value</span>.</p>
-
   <p><strong>Constraint validation:</strong> While the <span
   title="concept-fe-value">value</span> of the element is not a
   <span>valid URL</span>, the element is <span>suffering from a type
@@ -26552,44 +26506,41 @@
   element represents a control for setting the element's <span
   title="concept-fe-value">value</span> to a string representing a
   specific <span>UTC date and time</span>. User agents may display the
-  time in whatever timezone is appropriate for the user.</p>
+  date and time in whatever timezone is appropriate for the user.</p>
 
   <p>If an <code>input</code> element whose <code
   title="attr-input-type">type</code> attribute is in the <span
   title="attr-input-type-datetime">Date and Time</span> state is <i
   title="concept-input-mutable">mutable</i>, the user should allow the
   user to change the date and time represented by its <span
-  title="concept-fe-value">value</span>. User agents must not allow
-  the user to set the <span title="concept-fe-value">value</span> to a
-  string that is not a <span>valid UTC date and time</span>. If the
-  user agent provides a user interface for selecting a date and time,
-  then the <span title="concept-fe-value">value</span> must be set to
-  a <span>valid UTC date and time</span> representing the user's
-  selection. User agents should allow the user to set the <span
+  title="concept-fe-value">value</span>, as obtained by <span
+  title="parse a UTC date and time">parsing a UTC date and tiem</span>
+  from it. User agents must not allow the user to set the <span
+  title="concept-fe-value">value</span> to a string that is not a
+  <span>valid UTC date and time</span>. If the user agent provides a
+  user interface for selecting a date and time, then the <span
+  title="concept-fe-value">value</span> must be set to a <span>valid
+  UTC date and time</span> representing the user's selection. User
+  agents should allow the user to set the <span
   title="concept-fe-value">value</span> to the empty string.</p>
 
   <p><strong>The <span title="attr-input-type-datetime">Date and
-  Time</span> state's <span>control initialization algorithm</span> is
-  as follows:</strong> If the <span
-  title="concept-fe-value">value</span> of the element is not a
-  <span>valid UTC date and time</span>, then set it to the empty
-  string instead.</p>
+  Time</span> state's <span>value sanitization algorithm</span> is as
+  follows:</strong> If the <span title="concept-fe-value">value</span>
+  of the element is not a <span>valid UTC date and time</span>, then
+  set it to the empty string instead.</p>
 
-  <p><strong>The <span title="attr-input-type-datetime">Date and
-  Time</span> state's <span>default value change algorithm</span> is
-  as follows:</strong> If the <code>input</code> element is not <i
-  title="concept-input-dirty">dirty</i> then set the <span
-  title="concept-fe-value">value</span> of the element to the value of
-  the <code title="attr-input-value">value</code> content attribute
-  and run the <span>control initialization algorithm</span>.</p>
+  <p class="big-issue"><strong>The <span
+  title="attr-input-type-datetime">Date and Time</span> state's
+  <span><code title="dom-input-valueAsDate">valueAsDate</code> setter
+  algorithm</span> is as follows:</strong> ...</p>
 
-  <p><strong>The <span title="attr-input-type-datetime">Date and
-  Time</span> state's <span><code title="dom-input-value">value</code>
-  setter algorithm</span> is as follows:</strong> Set the <span
-  title="concept-fe-value">value</span> of the element to the new
-  value and run the <span>control initialization algorithm</span>.</p>
+  <p class="big-issue"><strong>The <span
+  title="attr-input-type-datetime">Date and Time</span> state's
+  <span><code title="dom-input-valueAsNumber">valueAsNumber</code>
+  setter algorithm</span> is as follows:</strong> ...</p>
 
-  <!-- XXX min, max, step -->
+  <!-- XXX min, max, step; parsing for those -->
 
   <p>When an <code>input</code> element's <code
   title="attr-input-type">type</code> attribute is in the <span
@@ -26907,7 +26858,7 @@
 
   <p>The autocompletion mechanism must be implemented by the user
   agent acting as if the user had modified the element's <span
-  title="concept-input-value">value</span>, and must be done at a time
+  title="concept-fe-value">value</span>, and must be done at a time
   where the element is <i title="concept-input-mutable">mutable</i>
   (e.g. just after the element has been inserted into the document, or
   when the user agent <span>stops parsing</span>).</p>
@@ -26954,20 +26905,22 @@
   <h6>Value manipulation</h6>
 
   <p>The <dfn title="dom-input-value"><code>value</code></dfn> DOM
-  attribute allows secripts to manipulate the <span
-  title="concept-input-value">value</span> of an <code>input</code>
+  attribute allows scripts to manipulate the <span
+  title="concept-fe-value">value</span> of an <code>input</code>
   element. On getting, it must return the current <span
-  title="concept-input-value">value</span> of the element. On setting,
-  it must run the <dfn><code title="dom-input-value">value</code>
-  setter algorithm</dfn> defined for the element's <code
-  title="attr-input-type">type</code> attribute's current state.</p>
+  title="concept-fe-value">value</span> of the element. On setting,
+  it must set the element's <span
+  title="concept-fe-value">value</span> to the new value, and then
+  invoke the <span>value sanitization algorithm</span> defined for the
+  element's <code title="attr-input-type">type</code> attribute's
+  current state.</p>
 
   <hr>
 
   <p>The <dfn
   title="dom-input-valueAsDate"><code>valueAsDate</code></dfn> DOM
   attribute represents the <span
-  title="concept-input-value">value</span> of the element, interpreted
+  title="concept-fe-value">value</span> of the element, interpreted
   as a date.</p>
 
   <p>On getting, if the <code
@@ -26991,7 +26944,7 @@
   <p>The <dfn
   title="dom-input-valueAsNumber"><code>valueAsNumber</code></dfn> DOM
   attribute represents the <span
-  title="concept-input-value">value</span> of the element, interpreted
+  title="concept-fe-value">value</span> of the element, interpreted
   as a number.</p>
 
   <p>On getting, if the <code
@@ -27001,7 +26954,7 @@
   run the <dfn><code
   title="dom-input-valueAsNumber">valueAsNumber</code> getter
   algorithm</dfn> defined for that state. Otherwise, return the <span
-  title="concept-input-value">value</span> of the element, cast to the
+  title="concept-fe-value">value</span> of the element, cast to the
   type of the DOM attribute.</p>
 
   <p>On setting, if the <code
@@ -27011,7 +26964,7 @@
   run the <dfn><code
   title="dom-input-valueAsNumber">valueAsNumber</code> setter
   algorithm</dfn> defined for that state. Otherwise, the <span
-  title="concept-input-value">value</span> must be set to the shortest
+  title="concept-fe-value">value</span> must be set to the shortest
   possible representation of the given value that is a <span>valid
   floating point number</span> in base ten.</p>
 
@@ -55074,6 +55027,7 @@
        mean something. (2046 doesn't define anything like that, and
        2045's definition doesn't really help either, since it's part
        of something else, and doesn't mention whitespace, etc.)
+ XXX * reference [UTC] in the various places that use it.
 -->
 
  </body>

|