Skip to content

Commit

Permalink
Editorial: flip non-null/otherwise conditions
Browse files Browse the repository at this point in the history
PR: #234
  • Loading branch information
shvaikalesh authored and annevk committed Apr 21, 2016
1 parent 8ae8749 commit 8d281a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
15 changes: 7 additions & 8 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2517,9 +2517,8 @@ invoked, must run these steps:
<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a>, given
<var>nodes</var> and <a>context object</a>'s <a>node document</a>. Rethrow any exceptions.

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

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

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

<hr>
Expand Down Expand Up @@ -9714,6 +9712,7 @@ making this standard what it is today.
With that, many thanks to
Adam Klein,
Adrian Bateman,
Aleksey Shvayka,
Alex Komoroske,
Alex Russell,
Anthony Ramine,
Expand Down
8 changes: 4 additions & 4 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<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>
<hgroup>
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
<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>
<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>
</hgroup>
<div data-fill-with="spec-metadata">
<dl>
Expand Down Expand Up @@ -1594,7 +1594,7 @@ <h4 class="heading settled" data-level="4.2.8" id="interface-childnode"><span cl
<li>
<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>
<li>
<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>
<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>
<li>
<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>
</ol>
Expand Down Expand Up @@ -4621,8 +4621,7 @@ <h3 class="heading settled" data-level="6.1" id="interface-nodeiterator"><span c
<p class="note no-backref" role="note">Steps are not terminated here. </p>
</ol>
<li>
<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
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>
<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>
</ol>
<hr>
<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
Expand Down Expand Up @@ -5198,6 +5197,7 @@ <h2 class="no-num heading settled" id="acks"><span class="content">Acknowledgmen
<p>With that, many thanks to
Adam Klein,
Adrian Bateman,
Aleksey Shvayka,
Alex Komoroske,
Alex Russell,
Anthony Ramine,
Expand Down

0 comments on commit 8d281a3

Please sign in to comment.