Skip to content

Commit 8d281a3

Browse files
shvaikaleshannevk
authored andcommitted
Editorial: flip non-null/otherwise conditions
PR: #234
1 parent 8ae8749 commit 8d281a3

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

dom.bs

+7-8
Original file line numberDiff line numberDiff line change
@@ -2517,9 +2517,8 @@ invoked, must run these steps:
25172517
<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a>, given
25182518
<var>nodes</var> and <a>context object</a>'s <a>node document</a>. Rethrow any exceptions.
25192519

2520-
<li><p>If <var>viablePreviousSibling</var> is non-null, set it to
2521-
<var>viablePreviousSibling</var>'s <a>next sibling</a>, and to <var>parent</var>'s
2522-
<a>first child</a> otherwise.
2520+
<li><p>If <var>viablePreviousSibling</var> is null, set it to <var>parent</var>'s
2521+
<a>first child</a>, and to <var>viablePreviousSibling</var>'s <a>next sibling</a> otherwise.
25232522

25242523
<li><p><a>Pre-insert</a> <var>node</var> into <var>parent</var> before
25252524
<var>viablePreviousSibling</var>. Rethrow any exceptions.
@@ -8719,11 +8718,10 @@ The <dfn><code>NodeIterator</code> pre-removing steps</dfn> given a
87198718
<p class="note no-backref">Steps are not terminated here.
87208719
</ol>
87218720

8722-
<li><p>Set <var>nodeIterator</var>'s {{NodeIterator/referenceNode}} attribute to the
8723-
<a>inclusive descendant</a> of <var>toBeRemovedNode</var>'s <a>previous sibling</a> that
8724-
appears last in <a>tree order</a>, if <var>toBeRemovedNode</var>'s
8725-
<a>previous sibling</a> is non-null, and to <var>toBeRemovedNode</var>'s <a>parent</a>
8726-
otherwise.
8721+
<li><p>Set <var>nodeIterator</var>'s {{NodeIterator/referenceNode}} attribute to
8722+
<var>toBeRemovedNode</var>'s <a>parent</a>, if <var>toBeRemovedNode</var>'s <a>previous sibling</a>
8723+
is null, and to the <a>inclusive descendant</a> of <var>toBeRemovedNode</var>'s
8724+
<a>previous sibling</a> that appears last in <a>tree order</a> otherwise.
87278725
</ol>
87288726

87298727
<hr>
@@ -9714,6 +9712,7 @@ making this standard what it is today.
97149712
With that, many thanks to
97159713
Adam Klein,
97169714
Adrian Bateman,
9715+
Aleksey Shvayka,
97179716
Alex Komoroske,
97189717
Alex Russell,
97199718
Anthony Ramine,

dom.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
7272
<hgroup>
7373
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
74-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-04-20">20 April 2016</time></span></h2>
74+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-04-21">21 April 2016</time></span></h2>
7575
</hgroup>
7676
<div data-fill-with="spec-metadata">
7777
<dl>
@@ -1594,7 +1594,7 @@ <h4 class="heading settled" data-level="4.2.8" id="interface-childnode"><span cl
15941594
<li>
15951595
<p>Let <var>node</var> be the result of <a data-link-type="dfn" href="#converting-nodes-into-a-node">converting nodes into a node</a>, given <var>nodes</var> and <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-node-document">node document</a>. Rethrow any exceptions. </p>
15961596
<li>
1597-
<p>If <var>viablePreviousSibling</var> is non-null, set it to <var>viablePreviousSibling</var>’s <a data-link-type="dfn" href="#concept-tree-next-sibling">next sibling</a>, and to <var>parent</var>’s <a data-link-type="dfn" href="#concept-tree-first-child">first child</a> otherwise. </p>
1597+
<p>If <var>viablePreviousSibling</var> is null, set it to <var>parent</var>’s <a data-link-type="dfn" href="#concept-tree-first-child">first child</a>, and to <var>viablePreviousSibling</var>’s <a data-link-type="dfn" href="#concept-tree-next-sibling">next sibling</a> otherwise. </p>
15981598
<li>
15991599
<p><a data-link-type="dfn" href="#concept-node-pre-insert">Pre-insert</a> <var>node</var> into <var>parent</var> before <var>viablePreviousSibling</var>. Rethrow any exceptions. </p>
16001600
</ol>
@@ -4621,8 +4621,7 @@ <h3 class="heading settled" data-level="6.1" id="interface-nodeiterator"><span c
46214621
<p class="note no-backref" role="note">Steps are not terminated here. </p>
46224622
</ol>
46234623
<li>
4624-
<p>Set <var>nodeIterator</var>’s <code class="idl"><a data-link-type="idl" href="#dom-nodeiterator-referencenode">referenceNode</a></code> attribute to the <a data-link-type="dfn" href="#concept-tree-inclusive-descendant">inclusive descendant</a> of <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-previous-sibling">previous sibling</a> that
4625-
appears last in <a data-link-type="dfn" href="#concept-tree-order">tree order</a>, if <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-previous-sibling">previous sibling</a> is non-null, and to <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-parent">parent</a> otherwise. </p>
4624+
<p>Set <var>nodeIterator</var>’s <code class="idl"><a data-link-type="idl" href="#dom-nodeiterator-referencenode">referenceNode</a></code> attribute to <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-parent">parent</a>, if <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-previous-sibling">previous sibling</a> is null, and to the <a data-link-type="dfn" href="#concept-tree-inclusive-descendant">inclusive descendant</a> of <var>toBeRemovedNode</var>’s <a data-link-type="dfn" href="#concept-tree-previous-sibling">previous sibling</a> that appears last in <a data-link-type="dfn" href="#concept-tree-order">tree order</a> otherwise. </p>
46264625
</ol>
46274626
<hr>
46284627
<p>The <dfn class="idl-code" data-dfn-for="NodeIterator" data-dfn-type="attribute" data-export="" id="dom-nodeiterator-root">root<a class="self-link" href="#dom-nodeiterator-root"></a></dfn> attribute
@@ -5198,6 +5197,7 @@ <h2 class="no-num heading settled" id="acks"><span class="content">Acknowledgmen
51985197
<p>With that, many thanks to
51995198
Adam Klein,
52005199
Adrian Bateman,
5200+
Aleksey Shvayka,
52015201
Alex Komoroske,
52025202
Alex Russell,
52035203
Anthony Ramine,

0 commit comments

Comments
 (0)