[html5] r1358 - /
whatwg at whatwg.org
whatwg at whatwg.org
Fri Mar 7 16:13:47 PST 2008
Author: ianh
Date: 2008-03-07 16:13:46 -0800 (Fri, 07 Mar 2008)
New Revision: 1358
Modified:
index
source
Log:
[] (0) Fix the definition of contentEditable; clarify handling of non-editable sections inside editable sections.
Modified: index
===================================================================
--- index 2008-03-07 12:08:25 UTC (rev 1357)
+++ index 2008-03-08 00:13:46 UTC (rev 1358)
@@ -24,7 +24,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=working>Working Draft — 7 March 2008</h2>
+ <h2 class="no-num no-toc" id=working>Working Draft — 8 March 2008</h2>
<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -33522,50 +33522,56 @@
string, <code title="">true</code>, and <code title="">false</code>. The
empty string and the <code title="">true</code> keyword map to the
<em>true</em> state. The <code title="">false</code> keyword maps to the
- <em>false</em> state, which is also the <em>invalid value default</em>.
- There is no <em>missing value default</em>.
+ <em>false</em> state. In addition, there is a third state, the
+ <em>inherit</em> state, which is the <em>missing value default</em> (and
+ the <em>invalid value default</em>).
<p>If an <a href="#html-elements" title="HTML elements">HTML element</a>
has a <code title=attr-contenteditable><a
href="#contenteditable0">contenteditable</a></code> attribute set to the
- true state, or if its nearest ancestor <a href="#html-elements"
+ true state, or it has its <code title=attr-contenteditable><a
+ href="#contenteditable0">contenteditable</a></code> attribute set to the
+ inherit state and if its nearest ancestor <a href="#html-elements"
title="HTML elements">HTML element</a> with the <code
title=attr-contenteditable><a
- href="#contenteditable0">contenteditable</a></code> attribute set has its
- attribute set to the true state, or if it has no ancestors with the <code
+ href="#contenteditable0">contenteditable</a></code> attribute set to a
+ state other than the inherit state has its attribute set to the true
+ state, or if it and its ancestors all have their <code
title=attr-contenteditable><a
- href="#contenteditable0">contenteditable</a></code> attribute set but the
- <code>Document</code> has <code title=dom-document-designMode><a
- href="#designMode">designMode</a></code> enabled, then the UA must treat
- the element as <dfn id=editable0>editable</dfn> (as described below).
+ href="#contenteditable0">contenteditable</a></code> attribute set to the
+ inherit state but the <code>Document</code> has <code
+ title=dom-document-designMode><a href="#designMode">designMode</a></code>
+ enabled, then the UA must treat the element as <dfn
+ id=editable0>editable</dfn> (as described below).
<p>Otherwise, either the <a href="#html-elements" title="HTML
elements">HTML element</a> has a <code title=attr-contenteditable><a
href="#contenteditable0">contenteditable</a></code> attribute set to the
- false state, or its nearest ancestor <a href="#html-elements" title="HTML
- elements">HTML element</a> with the <code title=attr-contenteditable><a
- href="#contenteditable0">contenteditable</a></code> attribute set is not
- <em><a href="#editable0">editable</a></em>, or it has no ancestor with the
+ false state, or its code title="attr-contenteditable">contenteditable
+ attribute is set to the inherit state and its nearest ancestor <a
+ href="#html-elements" title="HTML elements">HTML element</a> with the
<code title=attr-contenteditable><a
- href="#contenteditable0">contenteditable</a></code> attribute set and the
- <code>Document</code> itself has <code title=dom-document-designMode><a
- href="#designMode">designMode</a></code> disabled, and the element is thus
- not editable.
+ href="#contenteditable0">contenteditable</a></code> attribute set to a
+ state other than the inherit state has its attribute set to the false
+ state, or all its ancestors have their <code title=attr-contenteditable><a
+ href="#contenteditable0">contenteditable</a></code> attribute set to the
+ inherit state and the <code>Document</code> itself has <code
+ title=dom-document-designMode><a href="#designMode">designMode</a></code>
+ disabled, and the element is thus not editable.
<p>The <dfn id=contenteditable1
title=dom-contentEditable><code>contentEditable</code></dfn> DOM
- attribute, on getting, must return the string "<code
- title="">inherit</code>" if the content attribute isn't set, "<code
- title="">true</code>" if the attribute is set and has the true state, and
- "<code title="">false</code>" otherwise. On setting, if the new value is
+ attribute, on getting, must return the string "<code title="">true</code>"
+ if the content attribute is set to the true state, <code
+ title="">false</code>" if the content attribute is set to the false state,
+ and "<code title="">inherit</code>" otherwise. On setting, if the new
+ value is case-insensitively<!--
+ XXX ascii --> equal to the string "<code
+ title="">inherit</code>" then the content attribute must be removed, if
+ the new value is case-insensitively<!-- XXX ascii --> equal to the string
+ "<code title="">true</code>" then the content attribute must be set to the
+ string "<code title="">true</code>", if the new value is
case-insensitively<!-- XXX ascii --> equal to the string "<code
- title="">inherit</code>" then the content attribute must be removed, if
- the new value is case-insensitively<!-- XXX
- ascii --> equal to the
- string "<code title="">true</code>" then the content attribute must be set
- to the string "<code title="">true</code>", if the new value is
- case-insensitively<!--
- XXX ascii --> equal to the string "<code
title="">false</code>" then the content attribute must be set to the
string "<code title="">false</code>", and otherwise the attribute setter
must raise a <code>SYNTAX_ERR</code> exception.
@@ -33614,9 +33620,12 @@
<dd>
<p>User agents must allow users to change <a href="#a-selection">the
selection</a> within an editing host, even into nested editable
- elements. This could be triggered as the default action of <code
- title=event-keydown>keydown</code> events with various key identifiers
- and as the default action of <code
+ elements. User agents may prevent selections from being made in ways
+ that cross from editable elements into non-editable elements (e.g. by
+ making each non-editable descendant atomically selectable, but not
+ allowing text selection within them). This could be triggered as the
+ default action of <code title=event-keydown>keydown</code> events with
+ various key identifiers and as the default action of <code
title=event-mousedown>mousedown</code> events.
<dt id=contenteditable-insertText>Insert text
@@ -33691,9 +33700,10 @@
<dt id=contenteditable-delete>Delete
<dd>
- <p>UAs should offer a way for the user to delete text and elements, e.g.
- as the default action of <code title=event-keydown>keydown</code> events
- whose identifiers are "U+0008" or "U+007F".</p>
+ <p>UAs should offer a way for the user to delete text and elements,
+ including non-editable descendants, e.g. as the default action of <code
+ title=event-keydown>keydown</code> events whose identifiers are "U+0008"
+ or "U+007F".</p>
<p>Five edge cases in particular need to be considered carefully when
implementing this feature: backspacing at the start of an element,
Modified: source
===================================================================
--- source 2008-03-07 12:08:25 UTC (rev 1357)
+++ source 2008-03-08 00:13:46 UTC (rev 1358)
@@ -30981,17 +30981,21 @@
title="">false</code>. The empty string and the <code
title="">true</code> keyword map to the <em>true</em> state. The
<code title="">false</code> keyword maps to the <em>false</em>
- state, which is also the <em>invalid value default</em>. There is no
- <em>missing value default</em>.</p>
+ state. In addition, there is a third state, the <em>inherit</em>
+ state, which is the <em>missing value default</em> (and the
+ <em>invalid value default</em>).</p>
<p>If an <span title="HTML elements">HTML element</span> has a <code
title="attr-contenteditable">contenteditable</code> attribute set to
- the true state, or if its nearest ancestor <span title="HTML
+ the true state, or it has its <code
+ title="attr-contenteditable">contenteditable</code> attribute set to
+ the inherit state and if its nearest ancestor <span title="HTML
elements">HTML element</span> with the <code
- title="attr-contenteditable">contenteditable</code> attribute set
- has its attribute set to the true state, or if it has no ancestors
- with the <code title="attr-contenteditable">contenteditable</code>
- attribute set but the <code>Document</code> has <code
+ title="attr-contenteditable">contenteditable</code> attribute set to
+ a state other than the inherit state has its attribute set to the
+ true state, or if it and its ancestors all have their <code
+ title="attr-contenteditable">contenteditable</code> attribute set to
+ the inherit state but the <code>Document</code> has <code
title="dom-document-designMode">designMode</code> enabled, then the
UA must treat the element as <dfn>editable</dfn> (as described
below).</p>
@@ -30999,31 +31003,34 @@
<p>Otherwise, either the <span title="HTML elements">HTML
element</span> has a <code
title="attr-contenteditable">contenteditable</code> attribute set to
- the false state, or its nearest ancestor <span title="HTML
+ the false state, or its code
+ title="attr-contenteditable">contenteditable</code> attribute is set
+ to the inherit state and its nearest ancestor <span title="HTML
elements">HTML element</span> with the <code
- title="attr-contenteditable">contenteditable</code> attribute set is
- not <em>editable</em>, or it has no ancestor with the <code
- title="attr-contenteditable">contenteditable</code> attribute set
- and the <code>Document</code> itself has <code
+ title="attr-contenteditable">contenteditable</code> attribute set to
+ a state other than the inherit state has its attribute set to the
+ false state, or all its ancestors have their <code
+ title="attr-contenteditable">contenteditable</code> attribute set to
+ the inherit state and the <code>Document</code> itself has <code
title="dom-document-designMode">designMode</code> disabled, and the
element is thus not editable.</p>
<p>The <dfn
title="dom-contentEditable"><code>contentEditable</code></dfn> DOM
attribute, on getting, must return the string "<code
- title="">inherit</code>" if the content attribute isn't set, "<code
- title="">true</code>" if the attribute is set and has the true
- state, and "<code title="">false</code>" otherwise. On setting, if
- the new value is case-insensitively<!-- XXX ascii --> equal to the
- string "<code title="">inherit</code>" then the content attribute
- must be removed, if the new value is case-insensitively<!-- XXX
- ascii --> equal to the string "<code title="">true</code>" then the
- content attribute must be set to the string "<code
- title="">true</code>", if the new value is case-insensitively<!--
- XXX ascii --> equal to the string "<code title="">false</code>" then
- the content attribute must be set to the string "<code
- title="">false</code>", and otherwise the attribute setter must
- raise a <code>SYNTAX_ERR</code> exception.</p>
+ title="">true</code>" if the content attribute is set to the true
+ state, <code title="">false</code>" if the content attribute is set
+ to the false state, and "<code title="">inherit</code>"
+ otherwise. On setting, if the new value is case-insensitively<!--
+ XXX ascii --> equal to the string "<code title="">inherit</code>"
+ then the content attribute must be removed, if the new value is
+ case-insensitively<!-- XXX ascii --> equal to the string "<code
+ title="">true</code>" then the content attribute must be set to the
+ string "<code title="">true</code>", if the new value is
+ case-insensitively<!-- XXX ascii --> equal to the string "<code
+ title="">false</code>" then the content attribute must be set to the
+ string "<code title="">false</code>", and otherwise the attribute
+ setter must raise a <code>SYNTAX_ERR</code> exception.</p>
<p>If an element is <span>editable</span> and its parent element is
not, or if an element is <span>editable</span> and it has no parent
@@ -31073,7 +31080,11 @@
<dd><p>User agents must allow users to change <span>the
selection</span> within an editing host, even into nested editable
- elements. This could be triggered as the default action of <code
+ elements. User agents may prevent selections from being made in
+ ways that cross from editable elements into non-editable elements
+ (e.g. by making each non-editable descendant atomically selectable,
+ but not allowing text selection within them). This could be
+ triggered as the default action of <code
title="event-keydown">keydown</code> events with various key
identifiers and as the default action of <code
title="event-mousedown">mousedown</code> events.</p></dd>
@@ -31149,9 +31160,9 @@
<dt id="contenteditable-delete">Delete</dt>
<dd><p>UAs should offer a way for the user to delete text and
- elements, e.g. as the default action of <code
- title="event-keydown">keydown</code> events whose identifiers are
- "U+0008" or "U+007F".</p>
+ elements, including non-editable descendants, e.g. as the default
+ action of <code title="event-keydown">keydown</code> events whose
+ identifiers are "U+0008" or "U+007F".</p>
<p>Five edge cases in particular need to be considered carefully
when implementing this feature: backspacing at the start of an
More information about the Commit-Watchers
mailing list