--- a/editcommands.html Mon May 30 13:33:05 2011 -0600
+++ b/editcommands.html Mon May 30 14:25:21 2011 -0600
@@ -3921,13 +3921,9 @@
<li>For each <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> <var title="">node</var> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#contained>contained</a> in <var title="">new range</var>,
append <var title="">node</var> to <var title="">node list</var> if it is
<a href=#editable>editable</a>, the last member of <var title="">node list</var> (if any) is
- not an <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-ancestor title=concept-tree-ancestor>ancestor</a> of <var title="">node</var>, and <var title="">node</var> is not an
- <a href=#html-element>HTML element</a> that has <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-element-local-name title=concept-element-local-name>local name</a> "article", "aside",
- "blockquote", "caption", "col", "colgroup", "dd", "dl", "dt", "footer",
- "header", "hgroup", "li", "nav", "ol", "section", "table", "tbody", "td",
- "th", "thead", "tr", or "ul".
-
- <p class=XXX>This list is random. Make it reasonable.
+ not an <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-ancestor title=concept-tree-ancestor>ancestor</a> of <var title="">node</var>, and <var title="">node</var> is either a
+ <a href=#non-list-single-line-container>non-list single-line container</a> or an <a href=#allowed-child>allowed child</a>
+ of "p".
<li>For each <var title="">node</var> in <var title="">node list</var>, while <var title="">node</var>
is a <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-descendant title=concept-tree-descendant>descendant</a> of an <a href=#editable>editable</a> <a href=#html-element>HTML element</a>
--- a/implementation.js Mon May 30 13:33:05 2011 -0600
+++ b/implementation.js Mon May 30 14:25:21 2011 -0600
@@ -2863,16 +2863,12 @@
// "For each node node contained in new range, append node to node list
// if it is editable, the last member of node list (if any) is not an
- // ancestor of node, and node is not an HTML element that has local
- // name "article", "aside", "blockquote", "caption", "col", "colgroup",
- // "dd", "dl", "dt", "footer", "header", "hgroup", "li", "nav", "ol",
- // "section", "table", "tbody", "td", "th", "thead", "tr", or "ul"."
+ // ancestor of node, and node is either a non-list single-line
+ // container or an allowed child of "p"."
nodeList = collectContainedNodes(newRange, function(node) {
return isEditable(node)
- && !isHtmlElement(node, ["ARTICLE", "ASIDE", "BLOCKQUOTE",
- "CAPTION", "COL", "COLGROUP", "DD", "DL", "DT", "FOOTER",
- "HEADER", "HGROUP", "LI", "NAV", "OL", "SECTION", "TABLE",
- "TBODY", "TD", "TH", "THEAD", "TR", "UL"]);
+ && (isNonListSingleLineContainer(node)
+ || isAllowedChild(node, "p"));
});
// "For each node in node list, while node is a descendant of an
--- a/source.html Mon May 30 13:33:05 2011 -0600
+++ b/source.html Mon May 30 14:25:21 2011 -0600
@@ -3944,13 +3944,9 @@
<li>For each [[node]] <var>node</var> [[contained]] in <var>new range</var>,
append <var>node</var> to <var>node list</var> if it is
<span>editable</span>, the last member of <var>node list</var> (if any) is
- not an [[ancestor]] of <var>node</var>, and <var>node</var> is not an
- <span>HTML element</span> that has [[localname]] "article", "aside",
- "blockquote", "caption", "col", "colgroup", "dd", "dl", "dt", "footer",
- "header", "hgroup", "li", "nav", "ol", "section", "table", "tbody", "td",
- "th", "thead", "tr", or "ul".
-
- <p class=XXX>This list is random. Make it reasonable.
+ not an [[ancestor]] of <var>node</var>, and <var>node</var> is either a
+ <span>non-list single-line container</span> or an <span>allowed child</span>
+ of "p".
<li>For each <var>node</var> in <var>node list</var>, while <var>node</var>
is a [[descendant]] of an <span>editable</span> <span>HTML element</span>