[html5] r2204 - [] (0) WF2: Begin defining value='' for <input type=text>

whatwg at whatwg.org whatwg at whatwg.org
Wed Sep 17 03:23:45 PDT 2008


Author: ianh
Date: 2008-09-17 03:23:45 -0700 (Wed, 17 Sep 2008)
New Revision: 2204

Modified:
   index
   source
Log:
[] (0) WF2: Begin defining value='' for <input type=text>

Modified: index
===================================================================
--- index	2008-09-17 01:22:46 UTC (rev 2203)
+++ index	2008-09-17 10:23:45 UTC (rev 2204)
@@ -27102,7 +27102,7 @@
 
    <dd><code title=attr-input-type><a href="#type12">type</a></code>
 
-   <dd><code title=attr-input-value>value</code>
+   <dd><code title=attr-input-value><a href="#value7">value</a></code>
 
    <dt>DOM interface:
 
@@ -27135,7 +27135,7 @@
            attribute DOMString <a href="#target4" title=dom-fs-target>target</a>;
            attribute DOMString <a href="#type13" title=dom-input-type>type</a>;
            attribute DOMString <a href="#defaultvalue" title=dom-input-defaultValue>defaultValue</a>;
-           attribute DOMString <a href="#value7" title=dom-input-value>value</a>;
+           attribute DOMString <a href="#value8" title=dom-input-value>value</a>;
            attribute DOMTimeStamp <a href="#valueasdate" title=dom-input-valueAsDate>valueAsDate</a>;
            attribute float <a href="#valueasnumber" title=dom-input-valueAsNumber>valueAsNumber</a>;
   readonly attribute <a href="#htmloptionelement">HTMLOptionElement</a> <a href="#selectedoption" title=dom-input-selectedOption>selectedOption</a>;
@@ -27408,14 +27408,13 @@
    title=attr-input-readonly>readonly</code>, <code
    title=attr-input-required>required</code>, <code
    title=attr-input-size>size</code>, <code title=attr-input-src>src</code>,
-   <code title=attr-input-step>step</code>, <code title=attr-fs-target><a
-   href="#target3">target</a></code>, and <code
-   title=attr-input-value>value</code> attributes apply to an <code><a
+   <code title=attr-input-step>step</code>, and <code title=attr-fs-target><a
+   href="#target3">target</a></code> attributes apply to an <code><a
    href="#input0">input</a></code> element depends on the state of its <code
    title=attr-input-type><a href="#type12">type</a></code> attribute.
    Similarly, the <code title=dom-input-checked><a
    href="#checked1">checked</a></code>, <code title=dom-input-value><a
-   href="#value7">value</a></code>, <code title=dom-input-valueAsDate><a
+   href="#value8">value</a></code>, <code title=dom-input-valueAsDate><a
    href="#valueasdate">valueAsDate</a></code>, <code
    title=dom-input-valueAsNumber><a
    href="#valueasnumber">valueAsNumber</a></code>, <code
@@ -27426,8 +27425,35 @@
    <code title=dom-input-stepDown><a href="#stepdown">stepDown()</a></code>
    methods, are specific to certain states.
 
-  <hr>
+  <p>When an <code><a href="#input0">input</a></code> element's <code
+   title=attr-input-type><a href="#type12">type</a></code> attribute changes
+   state, and when the element is first created, the <dfn id=control0>control
+   initialization</dfn> algorithm defined for the <code
+   title=attr-input-type><a href="#type12">type</a></code> attribute's state
+   at the time must be invoked and the element's rendering and behaviour must
+   change accordingly.
 
+  <p>Each <code><a href="#input0">input</a></code> element has a <a
+   href="#value10" title=concept-fe-value>value</a>.
+
+  <p>Each <code><a href="#input0">input</a></code> element has a boolean <dfn
+   id=dirty>dirty flag</dfn>, which must be initially set to false when the
+   element is created, and which must be set to true whenever the user
+   interacts with the control in a way that changes the <a href="#value10"
+   title=concept-fe-value>value</a>.
+
+  <p>The <dfn id=value7 title=attr-input-value><code>value</code></dfn>
+   content attribute gives the default <a href="#value10"
+   title=concept-fe-value>value</a> of the <code><a
+   href="#input0">input</a></code> element. When the <code
+   title=attr-input-value><a href="#value7">value</a></code> content
+   attribute is added, set, or removed, and when the element is first
+   created, after invoking the <a href="#control0">control initialization</a>
+   algorithm, the <dfn id=default2>default value change</dfn> algorithm
+   defined for the <code title=attr-input-type><a
+   href="#type12">type</a></code> attribute's state at the time must be
+   invoked.
+
   <p>The <code title=attr-fae-form><a href="#form0">form</a></code> attribute
    is used to explicitly associate the <code><a
    href="#input0">input</a></code> element with its <a
@@ -27466,8 +27492,8 @@
    title=attr-input-checked>checked</code> content attribute. The <dfn
    id=defaultvalue
    title=dom-input-defaultValue><code>defaultValue</code></dfn> DOM attribute
-   must <a href="#reflect">reflect</a> the <code
-   title=attr-input-value>value</code> content attribute.
+   must <a href="#reflect">reflect</a> the <code title=attr-input-value><a
+   href="#value7">value</a></code> content attribute.
 
   <p>The <code title=dom-cva-willValidate><a
    href="#willvalidate">willValidate</a></code>, <code
@@ -27492,6 +27518,36 @@
    href="#text1">text</a></code>, or has an invalid value, it is in the <a
    href="#text2" title=attr-input-type-text>Text</a> state.
 
+  <p>When an <code><a href="#input0">input</a></code> element's <code
+   title=attr-input-type><a href="#type12">type</a></code> attribute is in
+   the <a href="#text2" title=attr-input-type-text>Text</a> state, it
+   represents a text edit control for a single line of plain text.
+
+  <p><strong>The <a href="#text2" title=attr-input-type-text>Text</a> state's
+   <a href="#control0">control initialization</a> algorithm is as
+   follows:</strong> Run the <a href="#line-feed">line feed stripper</a>
+   algorithm.
+
+  <p><strong>The <a href="#text2" title=attr-input-type-text>Text</a> state's
+   <a href="#default2">default value change</a> algorithm is as
+   follows:</strong> If the <code><a href="#input0">input</a></code> element
+   is not <span>dirty</span> then set the <a href="#value10"
+   title=concept-fe-value>value</a> of the element to the value of the <code
+   title=attr-input-value><a href="#value7">value</a></code> content
+   attribute and run the <a href="#line-feed">line feed stripper</a>
+   algorithm.
+
+  <p>The <dfn id=line-feed>line feed stripper</dfn> algorithm consists of
+   removing any U+000A LINE FEED (LF) characters from <a href="#value10"
+   title=concept-fe-value>value</a>.
+
+  <p>User agents must not allow users to insert U+000A LINE FEED (LF)
+   characters into the <a href="#value10" title=concept-fe-value>value</a> of
+   an <code><a href="#input0">input</a></code> element whose <code
+   title=attr-input-type><a href="#type12">type</a></code> attribute is in
+   the <a href="#text2" title=attr-input-type-text>Text</a> state.</p>
+  <!-- XXX allow users to edit, when not disabled or readonly -->
+
   <p class=big-issue>...
 
   <p>When an <code><a href="#input0">input</a></code> element's <code
@@ -27507,8 +27563,8 @@
    title=attr-input-pattern>pattern</code>, <code
    title=attr-input-readonly>readonly</code>, <code
    title=attr-input-required>required</code>, <code
-   title=attr-input-size>size</code>, and <code
-   title=attr-input-value>value</code>.
+   title=attr-input-size>size</code>, and <code title=attr-input-value><a
+   href="#value7">value</a></code>.
 
   <p>When an <code><a href="#input0">input</a></code> element's <code
    title=attr-input-type><a href="#type12">type</a></code> attribute is in
@@ -27830,7 +27886,7 @@
   <p class=big-issue>... <dfn id=checked1
    title=dom-input-checked><code>checked</code></dfn>
 
-  <p class=big-issue>... <dfn id=value7
+  <p class=big-issue>... <dfn id=value8
    title=dom-input-value><code>value</code></dfn>
 
   <p class=big-issue>... <dfn id=valueasdate
@@ -28150,7 +28206,7 @@
            attribute DOMString <span title=dom-option-label>label</span>;
            attribute boolean <span title=dom-option-defaultSelected>defaultSelected</span>;
            attribute boolean <span title=dom-option-selected>selected</span>;
-           attribute DOMString <a href="#value7" title=dom-input-value>value</a>;
+           attribute DOMString <a href="#value8" title=dom-input-value>value</a>;
 
   readonly attribute DOMString <span title=dom-option-text>text</span>;
   readonly attribute long <span title=dom-option-index>index</span>;
@@ -28162,7 +28218,7 @@
   <p class=big-issue>... <dfn id=selected1
    title=concept-option-selected>selected</dfn>
 
-  <p class=big-issue>... <dfn id=value8
+  <p class=big-issue>... <dfn id=value9
    title=concept-option-value>value</dfn>
 
   <p class=big-issue> <dfn id=option0
@@ -28471,7 +28527,7 @@
   <p class=big-issue>... <dfn id=disabled6
    title=dom-fe-disabled>disabled</dfn> DOM attribute
 
-  <p class=big-issue>... <dfn id=value9 title=concept-fe-value>value</dfn></p>
+  <p class=big-issue>... <dfn id=value10 title=concept-fe-value>value</dfn></p>
   <!-- XXX autocomplete: define somewhere that the value may be set from a stored value -->
 
   <h4 id=attributes2><span class=secno>4.9.14 </span><dfn
@@ -28818,7 +28874,7 @@
        href="#select">select</a></code> element that is <a href="#selected1"
        title=concept-option-selected>selected</a>, append an entry in the
        <var title="">form data set</var> with the <var title="">name</var> as
-       the name and the <a href="#value8"
+       the name and the <a href="#value9"
        title=concept-option-value>value</a> of the <code><a
        href="#option">option</a></code> element as the value.
 
@@ -28836,7 +28892,7 @@
 
      <li>
       <p>Otherwise, append an entry in the <var title="">form data set</var>
-       with <var title="">name</var> as the name and the <a href="#value9"
+       with <var title="">name</var> as the name and the <a href="#value10"
        title=concept-fe-value>value</a> of the <var title="">field</var>
        element as the value.
     </ol>
@@ -31548,7 +31604,7 @@
 
     <p>The <code title=dom-provider-getCellData><a
      href="#getcelldata">getCellData()</a></code> method must return the
-     <code title=dom-input-value><a href="#value7">value</a></code> of the
+     <code title=dom-input-value><a href="#value8">value</a></code> of the
      <code><a href="#input0">input</a></code> element.</p>
 
     <p>The <code title=dom-provider-getCellClasses><a
@@ -31559,7 +31615,7 @@
     <p>The <code title=dom-provider-editCell><a
      href="#editcell">editCell()</a></code> method must set the <code><a
      href="#input0">input</a></code> element's <code title=dom-input-value><a
-     href="#value7">value</a></code> DOM attribute to the value of the third
+     href="#value8">value</a></code> DOM attribute to the value of the third
      argument to the method.</p>
 
     <p>The <code title=dom-provider-setCellCheckedState><a
@@ -32381,7 +32437,7 @@
     href="#radiogroup">radiogroup</a></code>
 
    <dd><code title=attr-command-default><a
-    href="#default2">default</a></code>
+    href="#default3">default</a></code>
 
    <dd>Also, the <code title=attr-command-title><a
     href="#title6">title</a></code> attribute has special semantics on this
@@ -32398,7 +32454,7 @@
            attribute boolean <a href="#disabled10" title=dom-command-disabled>disabled</a>;
            attribute boolean <a href="#checked4" title=dom-command-checked>checked</a>;
            attribute DOMString <a href="#radiogroup0" title=dom-command-radiogroup>radiogroup</a>;
-           attribute boolean <a href="#default3" title=dom-command-default>default</a>;
+           attribute boolean <a href="#default4" title=dom-command-default>default</a>;
  void <a href="#click" title=dom-command-click>click</a>(); // shadows <code><a href="#htmlelement">HTMLElement</a></code>.<code title=dom-click><a href="#click1">click()</a></code>
 };</pre>
 
@@ -32463,12 +32519,12 @@
 
   <p>If the <code><a href="#command0">command</a></code> element is used when
    <span title="menu generation">generating</span> a <span>context
-   menu</span>, then the <dfn id=default2
+   menu</span>, then the <dfn id=default3
    title=attr-command-default><code>default</code></dfn> attribute indicates,
    if present, that the command is the one that would have been invoked if
    the user had directly activated the menu's subject instead of using its
    context menu. The <code title=attr-command-default><a
-   href="#default2">default</a></code> attribute is a <a
+   href="#default3">default</a></code> attribute is a <a
    href="#boolean0">boolean attribute</a>.
 
   <div class=example>
@@ -32484,7 +32540,7 @@
    title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked4
    title=dom-command-checked><code>checked</code></dfn>, <dfn id=radiogroup0
    title=dom-command-radiogroup><code>radiogroup</code></dfn>, and <dfn
-   id=default3 title=dom-command-default><code>default</code></dfn> DOM
+   id=default4 title=dom-command-default><code>default</code></dfn> DOM
    attributes must <a href="#reflect">reflect</a> the content attributes of
    the same name.
 
@@ -32966,7 +33022,7 @@
    this means for each facet -->.
     If the element is a <code><a href="#command0">command</a></code> element
     with a <code title=attr-command-default><a
-    href="#default2">default</a></code> attribute, mark the command as being
+    href="#default3">default</a></code> attribute, mark the command as being
     a default command.</dd>
    <!-- XXX if there's an
    Icon URL for the command, it should be <span
@@ -33442,8 +33498,8 @@
    depends on the Type of the command:
 
   <p>If the <a href="#type22" title=command-facet-Type>Type</a> is "command",
-   then it is the string given by the <code
-   title=attr-input-value>value</code> attribute, if any, and a
+   then it is the string given by the <code title=attr-input-value><a
+   href="#value7">value</a></code> attribute, if any, and a
    <span>UA-dependent value</span><!-- XXX xref--> that the UA uses to label
    the button itself if the attribute is absent.
 
@@ -33455,9 +33511,10 @@
    question is the <a href="#label4" title=command-facet-Label>Label</a> (in
    DOM terms, this the string given by <code><var
    title="">element</var>.labels[0].textContent</code>). Otherwise, the value
-   of the <code title=attr-input-value>value</code> attribute, if present, is
-   the <a href="#label4" title=command-facet-Label>Label</a>. Otherwise, the
-   <a href="#label4" title=command-facet-Label>Label</a> is the empty string.
+   of the <code title=attr-input-value><a href="#value7">value</a></code>
+   attribute, if present, is the <a href="#label4"
+   title=command-facet-Label>Label</a>. Otherwise, the <a href="#label4"
+   title=command-facet-Label>Label</a> is the empty string.
 
   <p>The <a href="#hint" title=command-facet-Hint>Hint</a> of the command is
    the value of the <code title=attr-title><a href="#title">title</a></code>
@@ -34698,9 +34755,9 @@
    data mining tools are likely to never instantiate browsing contexts.
 
   <p>The main <a href="#view">view</a> through which a user primarily
-   interacts with a user agent is the <dfn id=default4>default view</dfn>.
+   interacts with a user agent is the <dfn id=default5>default view</dfn>.
 
-  <p class=note>The <a href="#default4">default view</a> of a
+  <p class=note>The <a href="#default5">default view</a> of a
    <code>Document</code> is given by the <code title="">defaultView</code>
    attribute on the <code>Document</code> object's <code>DocumentView</code>
    interface. <a href="#refsDOM3VIEWS">[DOM3VIEWS]</a>
@@ -35084,7 +35141,7 @@
 
   <h3 id=the-default0><span class=secno>5.2 </span>The default view</h3>
 
-  <p>The <code>AbstractView</code> object of <a href="#default4"
+  <p>The <code>AbstractView</code> object of <a href="#default5"
    title="default view">default views</a> must also implement the <code><a
    href="#window">Window</a></code> and <code>EventTarget</code> interfaces.
 
@@ -35186,7 +35243,7 @@
    href="#browsing1">browsing context</a> has an associated <dfn
    id=list-of2>list of added properties</dfn> that, when a document is <a
    href="#active" title="active document">active</a>, are available on the
-   <code>Document</code>'s <a href="#default4">default view</a>'s <code><a
+   <code>Document</code>'s <a href="#default5">default view</a>'s <code><a
    href="#window">Window</a></code> object. A <code>Document</code> object's
    <a href="#list-of2">list of added properties</a> must be empty when the
    <code>Document</code> object is created.
@@ -43932,7 +43989,7 @@
      default value. For <code><a href="#input0">input</a></code> elements
      this means updating the <code title=dom-input-defaultValue><a
      href="#defaultvalue">defaultValue</a></code> DOM attribute as well as
-     the <code title=dom-input-value><a href="#value7">value</a></code> DOM
+     the <code title=dom-input-value><a href="#value8">value</a></code> DOM
      attribute; for <code><a href="#select">select</a></code> elements it
      means updating the <code><a href="#option">option</a></code> elements'
      <code title=dom-option-defaultSelected>defaultSelected</code> DOM
@@ -47485,7 +47542,7 @@
      the <code title=dom-MessageEvent-source><a
      href="#source3">source</a></code> attribute must be set to the <code><a
      href="#window">Window</a></code> object of the <a
-     href="#default4">default view</a> of the <a href="#browsing1">browsing
+     href="#default5">default view</a> of the <a href="#browsing1">browsing
      context</a> for which the <code>Document</code> object with which the
      script is associated is the <a href="#active">active
      document</a><!--, if there is one, or null
@@ -47566,7 +47623,7 @@
      the <code title=dom-MessageEvent-source><a
      href="#source3">source</a></code> attribute must be set to the <code><a
      href="#window">Window</a></code> object of the <a
-     href="#default4">default view</a> of the <a href="#browsing1">browsing
+     href="#default5">default view</a> of the <a href="#browsing1">browsing
      context</a> for which the <code>Document</code> object with which the
      script is associated is the <a href="#active">active
      document</a><!--, if there is one, or null
@@ -48472,9 +48529,9 @@
      (<code>></code>) characters, and must not be the empty string.</p>
 
     <div class=example>
-     <p>In the following example, the <code
-      title=attr-input-value>value</code> attribute is given with the
-      unquoted attribute value syntax:</p>
+     <p>In the following example, the <code title=attr-input-value><a
+      href="#value7">value</a></code> attribute is given with the unquoted
+      attribute value syntax:</p>
 
      <pre><input <em>value=yes</em>></pre>
     </div>

Modified: source
===================================================================
--- source	2008-09-17 01:22:46 UTC (rev 2203)
+++ source	2008-09-17 10:23:45 UTC (rev 2204)
@@ -24473,9 +24473,8 @@
   title="attr-input-required">required</code>, <code
   title="attr-input-size">size</code>, <code
   title="attr-input-src">src</code>, <code
-  title="attr-input-step">step</code>, <code
-  title="attr-fs-target">target</code>, and <code
-  title="attr-input-value">value</code> attributes apply to an
+  title="attr-input-step">step</code>, and <code
+  title="attr-fs-target">target</code> attributes apply to an
   <code>input</code> element depends on the state of its <code
   title="attr-input-type">type</code> attribute. Similarly, the <code
   title="dom-input-checked">checked</code>, <code
@@ -24488,8 +24487,33 @@
   and <code title="dom-input-stepDown">stepDown()</code> methods, are
   specific to certain states.</p>
 
-  <hr>
+  <p>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute changes state, and
+  when the element is first created, the <dfn>control
+  initialization</dfn> algorithm defined for the <code
+  title="attr-input-type">type</code> attribute's state at the time
+  must be invoked and the element's rendering and behaviour must
+  change accordingly.</p>
 
+  <p>Each <code>input</code> element has a <span
+  title="concept-fe-value">value</span>.</p>
+
+  <p>Each <code>input</code> element has a boolean <dfn>dirty
+  flag</dfn>, which must be initially set to false when the element is
+  created, and which must be set to true whenever the user interacts
+  with the control in a way that changes the <span
+  title="concept-fe-value">value</span>.</p>
+
+  <p>The <dfn title="attr-input-value"><code>value</code></dfn>
+  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</span> algorithm, the <dfn>default value change</dfn>
+  algorithm defined for the <code title="attr-input-type">type</code>
+  attribute's state at the time must be invoked.</p>
+
   <p>The <code title="attr-fae-form">form</code> attribute is used to
   explicitly associate the <code>input</code> element with its
   <span>form owner</span>. The <code title="attr-fe-name">name</code>
@@ -24547,6 +24571,36 @@
   or has an invalid value, it is in the <span
   title="attr-input-type-text">Text</span> state.</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, it represents a text
+  edit control for a single line of plain text.</p>
+
+  <p><strong>The <span title="attr-input-type-text">Text</span>
+  state's <span>control initialization</span> algorithm is as
+  follows:</strong> Run the <span>line feed stripper</span>
+  algorithm.</p>
+
+  <p><strong>The <span title="attr-input-type-text">Text</span>
+  state's <span>default value change</span> algorithm is as
+  follows:</strong> If the <code>input</code> element is not
+  <span>dirty</span> 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>line feed stripper</span> algorithm.</p>
+
+  <p>The <dfn>line feed stripper</dfn> algorithm consists of removing
+  any U+000A LINE FEED (LF) characters from <span
+  title="concept-fe-value">value</span>.</p>
+
+  <p>User agents must not allow users to insert U+000A LINE FEED (LF)
+  characters into the <span title="concept-fe-value">value</span> of
+  an <code>input</code> element whose <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-text">Text</span> state.</p>
+
+  <!-- XXX allow users to edit, when not disabled or readonly -->
+
   <p class="big-issue">...</p>
 
   <p>When an <code>input</code> element's <code




More information about the Commit-Watchers mailing list