Skip to content
Browse files

addedNodes and removedNodes should never have been null

Thanks Olli! Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=19463

Apologies to WebKit :/
  • Loading branch information...
1 parent 8cc0efd commit aad67c8f0cd78f3a9157acd481384ae22b5662de @annevk annevk committed Oct 11, 2012
Showing with 42 additions and 34 deletions.
  1. +20 −16 Overview.src.html
  2. +22 −18 dom-core.html
View
36 Overview.src.html
@@ -1630,8 +1630,8 @@ <h2 class=no-num>Goals</h2>
<p>If <var title>node</var> is a <code>DocumentFragment</code>
<span title=concept-node>node</span>,
<span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title>node</var>, addedNodes null, removedNodes
- <var title>nodes</var>, nextSibling null, and previousSibling null.
+ with target <var title>node</var>, and
+ removedNodes <var title>nodes</var>.
<p class=note>This step does intentionally not pay attention to the
<i title>suppress observers flag</i>.
@@ -1645,7 +1645,7 @@ <h2 class=no-num>Goals</h2>
<li><p>If <i title>suppress observers flag</i> is unset,
<span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
with target <var title>parent</var>, addedNodes <var title>nodes</var>,
- removedNodes null, nextSibling <var title>child</var>, and previousSibling
+ nextSibling <var title>child</var>, and previousSibling
<var title>child</var>'s
<span title=concept-tree-previous-sibling>previous sibling</span>
or <var title>parent</var>'s
@@ -1819,10 +1819,9 @@ <h2 class=no-num>Goals</h2>
<var title>node</var> otherwise.
<li><p><span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title>parent</var>, addedNodes
- <var title>nodes</var>, removedNodes <var title>parent</var>'s
- <span title=concept-tree-child>children</span>, nextSibling null, and
- previousSibling null.
+ with target <var title>parent</var>, addedNodes <var title>nodes</var>, and
+ removedNodes <var title>parent</var>'s
+ <span title=concept-tree-child>children</span>.
<li><p>Run <span>node is removed</span> for each
<span title=concept-tree-child>child</span> of <var title>parent</var>, in
@@ -1891,7 +1890,7 @@ <h2 class=no-num>Goals</h2>
<li><p>If <i title>suppress observers flag</i> is unset,
<span title=concept-MO-queue-childList>queue a "<code>childList</code>" record</span>
- with target <var title>parent</var>, addedNodes null,
+ with target <var title>parent</var>,
removedNodes a list solely containing <var title>node</var>,
nextSibling <var title>node</var>'s
<span title=concept-tree-next-sibling>next sibling</span>,
@@ -2277,9 +2276,9 @@ <h2 class=no-num>Goals</h2>
<p>To
<dfn title=concept-MO-queue-childList>queue a "<code>childList</code>" record</dfn>
with target <var title>target</var>, addedNodes <var title>addedNodes</var>,
-removedNodes <var title>removedNodes</var>, previousSibling
-<var title>previousSibling</var>, and nextSibling
-<var title>nextSibling</var>, run these steps:
+removedNodes <var title>removedNodes</var>,
+previousSibling <var title>previousSibling</var>, and
+nextSibling <var title>nextSibling</var>, run these steps:
<ol>
<li><p>Let <var title>record</var> be a new <code>MutationRecord</code> object with its
@@ -2460,8 +2459,8 @@ <h2 class=no-num>Goals</h2>
<pre class=idl>interface <dfn>MutationRecord</dfn> {
readonly attribute DOMString <span title=dom-MutationRecord-type>type</span>;
readonly attribute <span>Node</span> <span title=dom-MutationRecord-target>target</span>;
- readonly attribute <span>NodeList</span>? <span title=dom-MutationRecord-addedNodes>addedNodes</span>;
- readonly attribute <span>NodeList</span>? <span title=dom-MutationRecord-removedNodes>removedNodes</span>;
+ readonly attribute <span>NodeList</span> <span title=dom-MutationRecord-addedNodes>addedNodes</span>;
+ readonly attribute <span>NodeList</span> <span title=dom-MutationRecord-removedNodes>removedNodes</span>;
readonly attribute <span>Node</span>? <span title=dom-MutationRecord-previousSibling>previousSibling</span>;
readonly attribute <span>Node</span>? <span title=dom-MutationRecord-nextSibling>nextSibling</span>;
readonly attribute DOMString? <span title=dom-MutationRecord-attributeName>attributeName</span>;
@@ -2493,7 +2492,7 @@ <h2 class=no-num>Goals</h2>
<dt><code><var title>record</var> . <span title=dom-MutationRecord-addedNodes>addedNodes</span></code>
<dt><code><var title>record</var> . <span title=dom-MutationRecord-removedNodes>removedNodes</span></code>
<dd><p>Return the <span title=concept-node>nodes</span> added and removed
- respectively, or null otherwise.
+ respectively.
<dt><code><var title>record</var> . <span title=dom-MutationRecord-previousSibling>previousSibling</span></code>
<dt><code><var title>record</var> . <span title=dom-MutationRecord-nextSibling>nextSibling</span></code>
@@ -2528,8 +2527,13 @@ <h2 class=no-num>Goals</h2>
attributes must return the values they were initialized to.
<p>The
-<dfn title=dom-MutationRecord-addedNodes><code>addedNodes</code></dfn>,
-<dfn title=dom-MutationRecord-removedNodes><code>removedNodes</code></dfn>,
+<dfn title=dom-MutationRecord-addedNodes><code>addedNodes</code></dfn> and
+<dfn title=dom-MutationRecord-removedNodes><code>removedNodes</code></dfn>
+attributes must be return the values they were initialized to. Unless stated
+otherwise, when a <code>MutationRecord</code> object is created, they must
+both be initialized to an empty <code>NodeList</code>.
+
+<p>The
<dfn title=dom-MutationRecord-previousSibling><code>previousSibling</code></dfn>,
<dfn title=dom-MutationRecord-nextSibling><code>nextSibling</code></dfn>,
<dfn title=dom-MutationRecord-attributeName><code>attributeName</code></dfn>,
View
40 dom-core.html
@@ -8,7 +8,7 @@
<div class="head">
<h1>DOM</h1>
- <h2 class="no-num no-toc" id="living-standard-—-last-updated-10-october-2012">Living Standard — Last Updated 10 October 2012</h2>
+ <h2 class="no-num no-toc" id="living-standard-—-last-updated-11-october-2012">Living Standard — Last Updated 11 October 2012</h2>
<dl>
<dt>This Version:
@@ -39,7 +39,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-10-october-2012">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
-10 October 2012, the editors have made this specification available
+11 October 2012, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
@@ -1691,8 +1691,8 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<p>If <var title="">node</var> is a <code><a href="#documentfragment">DocumentFragment</a></code>
<a href="#concept-node" title="concept-node">node</a>,
<a href="#concept-mo-queue-childlist" title="concept-MO-queue-childList">queue a "<code>childList</code>" record</a>
- with target <var title="">node</var>, addedNodes null, removedNodes
- <var title="">nodes</var>, nextSibling null, and previousSibling null.
+ with target <var title="">node</var>, and
+ removedNodes <var title="">nodes</var>.
<p class="note">This step does intentionally not pay attention to the
<i title="">suppress observers flag</i>.
@@ -1706,7 +1706,7 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<li><p>If <i title="">suppress observers flag</i> is unset,
<a href="#concept-mo-queue-childlist" title="concept-MO-queue-childList">queue a "<code>childList</code>" record</a>
with target <var title="">parent</var>, addedNodes <var title="">nodes</var>,
- removedNodes null, nextSibling <var title="">child</var>, and previousSibling
+ nextSibling <var title="">child</var>, and previousSibling
<var title="">child</var>'s
<a href="#concept-tree-previous-sibling" title="concept-tree-previous-sibling">previous sibling</a>
or <var title="">parent</var>'s
@@ -1880,10 +1880,9 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<var title="">node</var> otherwise.
<li><p><a href="#concept-mo-queue-childlist" title="concept-MO-queue-childList">queue a "<code>childList</code>" record</a>
- with target <var title="">parent</var>, addedNodes
- <var title="">nodes</var>, removedNodes <var title="">parent</var>'s
- <a href="#concept-tree-child" title="concept-tree-child">children</a>, nextSibling null, and
- previousSibling null.
+ with target <var title="">parent</var>, addedNodes <var title="">nodes</var>, and
+ removedNodes <var title="">parent</var>'s
+ <a href="#concept-tree-child" title="concept-tree-child">children</a>.
<li><p>Run <a href="#node-is-removed">node is removed</a> for each
<a href="#concept-tree-child" title="concept-tree-child">child</a> of <var title="">parent</var>, in
@@ -1952,7 +1951,7 @@ <h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithm
<li><p>If <i title="">suppress observers flag</i> is unset,
<a href="#concept-mo-queue-childlist" title="concept-MO-queue-childList">queue a "<code>childList</code>" record</a>
- with target <var title="">parent</var>, addedNodes null,
+ with target <var title="">parent</var>,
removedNodes a list solely containing <var title="">node</var>,
nextSibling <var title="">node</var>'s
<a href="#concept-tree-next-sibling" title="concept-tree-next-sibling">next sibling</a>,
@@ -2336,9 +2335,9 @@ <h4 id="mutation-observers"><span class="secno">5.2.4 </span>Mutation observers<
<p>To
<dfn id="concept-mo-queue-childlist" title="concept-MO-queue-childList">queue a "<code>childList</code>" record</dfn>
with target <var title="">target</var>, addedNodes <var title="">addedNodes</var>,
-removedNodes <var title="">removedNodes</var>, previousSibling
-<var title="">previousSibling</var>, and nextSibling
-<var title="">nextSibling</var>, run these steps:
+removedNodes <var title="">removedNodes</var>,
+previousSibling <var title="">previousSibling</var>, and
+nextSibling <var title="">nextSibling</var>, run these steps:
<ol>
<li><p>Let <var title="">record</var> be a new <code><a href="#mutationrecord">MutationRecord</a></code> object with its
@@ -2519,8 +2518,8 @@ <h4 id="interface-mutationrecord"><span class="secno">5.2.5 </span>Interface <co
<pre class="idl">interface <dfn id="mutationrecord">MutationRecord</dfn> {
readonly attribute DOMString <a href="#dom-mutationrecord-type" title="dom-MutationRecord-type">type</a>;
readonly attribute <a href="#node">Node</a> <a href="#dom-mutationrecord-target" title="dom-MutationRecord-target">target</a>;
- readonly attribute <a href="#nodelist">NodeList</a>? <a href="#dom-mutationrecord-addednodes" title="dom-MutationRecord-addedNodes">addedNodes</a>;
- readonly attribute <a href="#nodelist">NodeList</a>? <a href="#dom-mutationrecord-removednodes" title="dom-MutationRecord-removedNodes">removedNodes</a>;
+ readonly attribute <a href="#nodelist">NodeList</a> <a href="#dom-mutationrecord-addednodes" title="dom-MutationRecord-addedNodes">addedNodes</a>;
+ readonly attribute <a href="#nodelist">NodeList</a> <a href="#dom-mutationrecord-removednodes" title="dom-MutationRecord-removedNodes">removedNodes</a>;
readonly attribute <a href="#node">Node</a>? <a href="#dom-mutationrecord-previoussibling" title="dom-MutationRecord-previousSibling">previousSibling</a>;
readonly attribute <a href="#node">Node</a>? <a href="#dom-mutationrecord-nextsibling" title="dom-MutationRecord-nextSibling">nextSibling</a>;
readonly attribute DOMString? <a href="#dom-mutationrecord-attributename" title="dom-MutationRecord-attributeName">attributeName</a>;
@@ -2552,7 +2551,7 @@ <h4 id="interface-mutationrecord"><span class="secno">5.2.5 </span>Interface <co
<dt><code><var title="">record</var> . <a href="#dom-mutationrecord-addednodes" title="dom-MutationRecord-addedNodes">addedNodes</a></code>
<dt><code><var title="">record</var> . <a href="#dom-mutationrecord-removednodes" title="dom-MutationRecord-removedNodes">removedNodes</a></code>
<dd><p>Return the <a href="#concept-node" title="concept-node">nodes</a> added and removed
- respectively, or null otherwise.
+ respectively.
<dt><code><var title="">record</var> . <a href="#dom-mutationrecord-previoussibling" title="dom-MutationRecord-previousSibling">previousSibling</a></code>
<dt><code><var title="">record</var> . <a href="#dom-mutationrecord-nextsibling" title="dom-MutationRecord-nextSibling">nextSibling</a></code>
@@ -2587,8 +2586,13 @@ <h4 id="interface-mutationrecord"><span class="secno">5.2.5 </span>Interface <co
attributes must return the values they were initialized to.
<p>The
-<dfn id="dom-mutationrecord-addednodes" title="dom-MutationRecord-addedNodes"><code>addedNodes</code></dfn>,
-<dfn id="dom-mutationrecord-removednodes" title="dom-MutationRecord-removedNodes"><code>removedNodes</code></dfn>,
+<dfn id="dom-mutationrecord-addednodes" title="dom-MutationRecord-addedNodes"><code>addedNodes</code></dfn> and
+<dfn id="dom-mutationrecord-removednodes" title="dom-MutationRecord-removedNodes"><code>removedNodes</code></dfn>
+attributes must be return the values they were initialized to. Unless stated
+otherwise, when a <code><a href="#mutationrecord">MutationRecord</a></code> object is created, they must
+both be initialized to an empty <code><a href="#nodelist">NodeList</a></code>.
+
+<p>The
<dfn id="dom-mutationrecord-previoussibling" title="dom-MutationRecord-previousSibling"><code>previousSibling</code></dfn>,
<dfn id="dom-mutationrecord-nextsibling" title="dom-MutationRecord-nextSibling"><code>nextSibling</code></dfn>,
<dfn id="dom-mutationrecord-attributename" title="dom-MutationRecord-attributeName"><code>attributeName</code></dfn>,

0 comments on commit aad67c8

Please sign in to comment.
Something went wrong with that request. Please try again.