--- a/editcommands.html Sun Jul 10 12:55:22 2011 -0600
+++ b/editcommands.html Sun Jul 10 13:03:53 2011 -0600
@@ -5139,7 +5139,7 @@
expected.
-->
<li>If <var title="">node</var> is an <code class=external data-anolis-spec=html title="the li element"><a href=http://www.whatwg.org/html/#the-li-element>li</a></code> or <code class=external data-anolis-spec=html title="the dt element"><a href=http://www.whatwg.org/html/#the-dt-element>dt</a></code> or <code class=external data-anolis-spec=html title="the dd element"><a href=http://www.whatwg.org/html/#the-dd-element>dd</a></code> and is the first
- <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a> of its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>:
+ <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a> of its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>, and <var title="">offset</var> is zero:
<ol>
<li>Let <var title="">items</var> be a list of all <code class=external data-anolis-spec=html title="the li element"><a href=http://www.whatwg.org/html/#the-li-element>li</a></code>s that are
--- a/implementation.js Sun Jul 10 12:55:22 2011 -0600
+++ b/implementation.js Sun Jul 10 13:03:53 2011 -0600
@@ -5323,9 +5323,11 @@
return;
}
- // "If node is an li or dt or dd and is the first child of its parent:"
+ // "If node is an li or dt or dd and is the first child of its parent,
+ // and offset is zero:"
if (isHtmlElement(node, ["li", "dt", "dd"])
- && node == node.parentNode.firstChild) {
+ && node == node.parentNode.firstChild
+ && offset == 0) {
// "Let items be a list of all lis that are ancestors of node."
//
// Remember, must be in tree order.
--- a/source.html Sun Jul 10 12:55:22 2011 -0600
+++ b/source.html Sun Jul 10 13:03:53 2011 -0600
@@ -5140,7 +5140,7 @@
expected.
-->
<li>If <var>node</var> is an [[li]] or [[dt]] or [[dd]] and is the first
- [[child]] of its [[parent]]:
+ [[child]] of its [[parent]], and <var>offset</var> is zero:
<ol>
<li>Let <var>items</var> be a list of all [[li]]s that are
--- a/tests.js Sun Jul 10 12:55:22 2011 -0600
+++ b/tests.js Sun Jul 10 13:03:53 2011 -0600
@@ -366,6 +366,8 @@
'<ol><li>foo<li>[]bar<br>baz</ol>',
'<ol><li>foo<br>bar<li>[]baz</ol>',
+ '<ol><li><p>foo</p>{}bar</ol>',
+
'<ol><li><p>foo<li>[]bar</ol>',
'<ol><li>foo<li><p>[]bar</ol>',
'<ol><li><p>foo<li><p>[]bar</ol>',