- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 19 Sep 2008 01:02:58 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv13091
Modified Files:
Overview.html
Log Message:
WF2: Define the autofocus='' attribute. Define generic task sources. (whatwg r2218)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1390
retrieving revision 1.1391
diff -u -d -r1.1390 -r1.1391
--- Overview.html 19 Sep 2008 00:17:53 -0000 1.1390
+++ Overview.html 19 Sep 2008 01:02:56 -0000 1.1391
@@ -1423,6 +1423,10 @@
contexts</a>
<li><a href="#event0"><span class=secno>5.4.2 </span>Event loops</a>
+ <ul class=toc>
+ <li><a href="#generic"><span class=secno>5.4.2.1. </span>Generic
+ task sources</a>
+ </ul>
<li><a href="#security4"><span class=secno>5.4.3 </span>Security
exceptions</a>
@@ -5696,7 +5700,7 @@
incrementally, as, for instance, with a progressively interlaced JPEG or
an HTML file, multiple tasks may be queued to process the data as it is
downloaded. The <a href="#task-source">task source</a> for these tasks
- is the <dfn id=networking>networking task source</dfn>.</p>
+ is the <a href="#networking">networking task source</a>.</p>
<!-- XXX make sure each use of 'fetch' defines what the appropriate
task is -->
@@ -7295,7 +7299,7 @@
void <a href="#document.write" title=dom-document-write>write</a>([Variadic] in DOMString text);
void <a href="#document.writeln..." title=dom-document-writeln>writeln</a>([Variadic] in DOMString text);
- // <a href="#user-interaction">user interaction</a>
+ // <a href="#user-interaction0">user interaction</a>
<a href="#selection1">Selection</a> <a href="#getselection0" title=dom-document-getSelection>getSelection</a>();
readonly attribute <span>Element</span> <a href="#activeelement" title=dom-document-activeElement>activeElement</a>;
boolean <a href="#hasfocus" title=dom-document-hasFocus>hasFocus</a>();
@@ -7881,7 +7885,7 @@
readonly attribute <a href="#domtokenlist0">DOMTokenList</a> <a href="#classlist" title=dom-classList>classList</a>;
readonly attribute <a href="#domstringmap0">DOMStringMap</a> <a href="#dataset" title=dom-dataset>dataset</a>;
- // <a href="#user-interaction">user interaction</a>
+ // <a href="#user-interaction0">user interaction</a>
attribute boolean <a href="#hidden5" title=dom-hidden>hidden</a>;
void <a href="#click1" title=dom-click>click</a>();
void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>();
@@ -30834,12 +30838,49 @@
<h5 id=autofocusing><span class=secno>4.10.13.4. </span>Autofocusing a form
control</h5>
- <p class=big-issue>... <dfn id=autofocus
- title=attr-fe-autofocus>autofocus</dfn> content attribute
+ <p>The <dfn id=autofocus
+ title=attr-fe-autofocus><code>autofocus</code></dfn> content attribute
+ allows the user to indicate that a control is to be focused as soon as the
+ page is loaded, allowing the user to just start typing without having to
+ manually focus the main control.
- <p class=big-issue>... <dfn id=autofocus0
- title=dom-fe-autofocus>autofocus</dfn> DOM attribute</p>
- <!-- If the element is <span>focusable</span>, run the <span>focusing steps</step> for that element. -->
+ <p>The <code title=attr-fe-autofocus><a
+ href="#autofocus">autofocus</a></code> attribute is a <a
+ href="#boolean0">boolean attribute</a>.
+
+ <p>There must not be more than one element in the document with the <code
+ title=attr-fe-autofocus><a href="#autofocus">autofocus</a></code>
+ attribute specified.
+
+ <p>Whenever an element with the <code title=attr-fe-autofocus><a
+ href="#autofocus">autofocus</a></code> attribute specified is <a
+ href="#inserted" title="insert an element into a document">inserted into a
+ document</a>, the user agent should <a href="#queue">queue a task</a> that
+ checks to see if the element is <a href="#focusable">focusable</a>, and if
+ so, runs the <a href="#focusing">focusing steps</a> for that element. User
+ agents may also change the scrolling position of the document, or perform
+ some other action that brings the element to the user's attention. The <a
+ href="#task-source">task source</a> for this task is the <a
+ href="#dom-manipulation">DOM manipulation task source</a>.
+
+ <p>User agents may ignore this attribute if the user has indicated (for
+ example, by starting to type in a form control) that he does not wish
+ focus to be changed.
+
+ <p class=note>Focusing the control does not imply that the user agent must
+ focus the browser window if it has lost focus.
+
+ <p>The <dfn id=autofocus0
+ title=dom-fe-autofocus><code>autofocus</code></dfn> DOM attribute must <a
+ href="#reflect">reflect</a> the content attribute of the same name.
+
+ <div class=example>
+ <p>In the following snippet, the text control would be focused when the
+ document was loaded.</p>
+
+ <pre><input maxlength="256" name="q" value="" autofocus>
+<input type="submit" value="Search"></pre>
+ </div>
<h4 id=attributes2><span class=secno>4.10.14 </span><dfn
id=attributes5>Attributes for form submission</dfn></h4>
@@ -37430,13 +37471,13 @@
different <a href="#task-queues" title="task queue">task queues</a>.
<p class=example>For example, a user agent could have one <a
- href="#task-queues">task queue</a> for mouse and key events (the
- <span>user interaction task source</span>, not defined in this
- specification<!-- XXX xref -->), and another for everything else. The user
- agent could then give keyboard and mouse events preference over other
- tasks three quarters of the time, keeping the interface responsive but not
- starving other task queues, and never processing events from any one <a
- href="#task-source">task source</a> out of order.
+ href="#task-queues">task queue</a> for mouse and key events (the <a
+ href="#user-interaction">user interaction task source</a>), and another
+ for everything else. The user agent could then give keyboard and mouse
+ events preference over other tasks three quarters of the time, keeping the
+ interface responsive but not starving other task queues, and never
+ processing events from any one <a href="#task-source">task source</a> out
+ of order.
<p>An <a href="#event4">event loop</a> must continually run through the
following steps for as long as it exists:
@@ -37459,6 +37500,46 @@
<p>Return to the first step of the <a href="#event4">event loop</a>.
</ol>
+ <h5 id=generic><span class=secno>5.4.2.1. </span>Generic task sources</h5>
+
+ <p>The following <a href="#task-source" title="task source">task
+ sources</a> are used by a number of mostly unrelated features in this and
+ other specifications.
+
+ <dl>
+ <dt>The <dfn id=dom-manipulation>DOM manipulation task source</dfn>
+
+ <dd>
+ <p>This <a href="#task-source">task source</a> is used for features that
+ react to DOM manipulations, such as things that happen asynchronously
+ when an element is <a href="#inserted" title="insert an element into a
+ document">inserted into the document</a>.</p>
+
+ <p>Asynchronous mutation events must be dispatched using <a href="#tasks"
+ title=concept-task>tasks</a> <a href="#queue" title="queue a
+ task">queued</a> with the <a href="#dom-manipulation">DOM manipulation
+ task source</a>. <a href="#references">[DOMEVENTS]</a></p>
+
+ <dt>The <dfn id=user-interaction>user interaction task source</dfn>
+
+ <dd>
+ <p>This <a href="#task-source">task source</a> is used for features that
+ react to user interaction, for example keyboard or mouse input.</p>
+
+ <p>Asynchronous events sent in response to user input (e.g. <span
+ title=event-click>click</span> events) must be dispatched using <a
+ href="#tasks" title=concept-task>tasks</a> <a href="#queue" title="queue
+ a task">queued</a> with the <a href="#user-interaction">user interaction
+ task source</a>. <a href="#references">[DOMEVENTS]</a></p>
+
+ <dt>The <dfn id=networking>networking task source</dfn>
+
+ <dd>
+ <p>This <a href="#task-source">task source</a> is used for features that
+ trigger in response to network activity.</p>
+ <!-- XHR should use this -->
+ </dl>
+
<h4 id=security4><span class=secno>5.4.3 </span>Security exceptions</h4>
<p class=big-issue>Define <dfn id=security10>security exception</dfn>.</p>
@@ -44431,7 +44512,7 @@
<p>This specification does not define how new values will get approved. It
is expected that the Wiki will have a community that addresses this.
- <h2 id=editing><span class=secno>6. </span><dfn id=user-interaction>User
+ <h2 id=editing><span class=secno>6. </span><dfn id=user-interaction0>User
Interaction</dfn></h2>
<p>This section describes various features that allow authors to enable
@@ -53830,8 +53911,8 @@
<hr>
- <p>The <dfn id=generic>generic CDATA element parsing algorithm</dfn> and
- the <dfn id=generic0>generic RCDATA element parsing algorithm</dfn>
+ <p>The <dfn id=generic0>generic CDATA element parsing algorithm</dfn> and
+ the <dfn id=generic1>generic RCDATA element parsing algorithm</dfn>
consist of the following steps. These algorithms are always invoked in
response to a start tag token.
@@ -53840,10 +53921,10 @@
<p><a href="#insert0">Insert an HTML element</a> for the token.
<li>
- <p>If the algorithm that was invoked is the <a href="#generic">generic
+ <p>If the algorithm that was invoked is the <a href="#generic0">generic
CDATA element parsing algorithm</a>, switch the tokeniser's <a
href="#content4">content model flag</a> to the CDATA state; otherwise
- the algorithm invoked was the <a href="#generic0">generic RCDATA element
+ the algorithm invoked was the <a href="#generic1">generic RCDATA element
parsing algorithm</a>, switch the tokeniser's <a
href="#content4">content model flag</a> to the RCDATA state.
@@ -54448,7 +54529,7 @@
<dt>A start tag whose tag name is "title"
<dd>
- <p>Follow the <a href="#generic0">generic RCDATA element parsing
+ <p>Follow the <a href="#generic1">generic RCDATA element parsing
algorithm</a>.</p>
<dt>A start tag whose tag name is "noscript", if the <a
@@ -54457,7 +54538,7 @@
<dt>A start tag whose tag name is one of: "noframes", "style"
<dd>
- <p>Follow the <a href="#generic">generic CDATA element parsing
+ <p>Follow the <a href="#generic0">generic CDATA element parsing
algorithm</a>.</p>
<dt>A start tag whose tag name is "noscript", if the <a
@@ -55475,7 +55556,7 @@
<p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
if any.</p>
- <p>Follow the <a href="#generic">generic CDATA element parsing
+ <p>Follow the <a href="#generic0">generic CDATA element parsing
algorithm</a>.</p>
<dt>A start tag whose tag name is "table"
@@ -55695,7 +55776,7 @@
href="#scripting3">scripting flag</a> is enabled
<dd>
- <p>Follow the <a href="#generic">generic CDATA element parsing
+ <p>Follow the <a href="#generic0">generic CDATA element parsing
algorithm</a>.</p>
<dt>A start tag whose tag name is "select"
Received on Friday, 19 September 2008 01:03:41 UTC