make intersectsNode not throw https://www.w3.org/Bugs/Public/show_bug.cgi?id=16759
authorAnne van Kesteren <annevk@opera.com>
Tue, 17 Apr 2012 15:25:04 +0200
changeset 1027223cb01d4de4
parent 1026 3a4a7b168bef
child 1028 86853b24f89a
make intersectsNode not throw https://www.w3.org/Bugs/Public/show_bug.cgi?id=16759
Overview.html
Overview.src.html
dom-core.html
     1.1 --- a/Overview.html	Tue Apr 17 12:29:25 2012 +0200
     1.2 +++ b/Overview.html	Tue Apr 17 15:25:04 2012 +0200
     1.3 @@ -7330,15 +7330,10 @@
     1.4   <li><p>Let <var title="">parent</var> be <var title="">node</var>'s
     1.5   <a href="#concept-tree-parent" title="concept-tree-parent">parent</a>.
     1.6  
     1.7 - <li><p>If <var title="">parent</var> is null, <a href="#concept-throw" title="concept-throw">throw</a> a "<code><a href="#notfounderror">NotFoundError</a></code>" exception
     1.8 - and terminate these steps.
     1.9 - <!-- Opera Next 12.00 alpha seems to throw InvalidNodeTypeError instead.
    1.10 - The spec follows Chrome 17 dev. -->
    1.11 -
    1.12 - <p class="XXX">All implementations throw in this case, but would it make more
    1.13 - sense to simply return true?  This case can only occur when the roots are
    1.14 - the same, so it means that <var title="">node</var> is the range's root, so
    1.15 - the range is fully contained in <var title="">node</var>.
    1.16 + <li><p>If <var title="">parent</var> is null, return true and terminate these
    1.17 + steps.
    1.18 + <!-- browsers currently throw, but are willing to change
    1.19 +      https://www.w3.org/Bugs/Public/show_bug.cgi?id=16759 -->
    1.20  
    1.21   <li><p>Let <var title="">offset</var> be <var title="">node</var>'s
    1.22   <a href="#concept-tree-index" title="concept-tree-index">index</a>.
     2.1 --- a/Overview.src.html	Tue Apr 17 12:29:25 2012 +0200
     2.2 +++ b/Overview.src.html	Tue Apr 17 15:25:04 2012 +0200
     2.3 @@ -7372,16 +7372,10 @@
     2.4   <li><p>Let <var title>parent</var> be <var title>node</var>'s
     2.5   <span title=concept-tree-parent>parent</span>.
     2.6  
     2.7 - <li><p>If <var title>parent</var> is null, <span
     2.8 - title=concept-throw>throw</span> a "<code>NotFoundError</code>" exception
     2.9 - and terminate these steps.
    2.10 - <!-- Opera Next 12.00 alpha seems to throw InvalidNodeTypeError instead.
    2.11 - The spec follows Chrome 17 dev. -->
    2.12 -
    2.13 - <p class=XXX>All implementations throw in this case, but would it make more
    2.14 - sense to simply return true?  This case can only occur when the roots are
    2.15 - the same, so it means that <var title>node</var> is the range's root, so
    2.16 - the range is fully contained in <var title>node</var>.
    2.17 + <li><p>If <var title>parent</var> is null, return true and terminate these
    2.18 + steps.
    2.19 + <!-- browsers currently throw, but are willing to change
    2.20 +      https://www.w3.org/Bugs/Public/show_bug.cgi?id=16759 -->
    2.21  
    2.22   <li><p>Let <var title>offset</var> be <var title>node</var>'s
    2.23   <span title=concept-tree-index>index</span>.
     3.1 --- a/dom-core.html	Tue Apr 17 12:29:25 2012 +0200
     3.2 +++ b/dom-core.html	Tue Apr 17 15:25:04 2012 +0200
     3.3 @@ -7284,15 +7284,10 @@
     3.4   <li><p>Let <var title="">parent</var> be <var title="">node</var>'s
     3.5   <a href="#concept-tree-parent" title="concept-tree-parent">parent</a>.
     3.6  
     3.7 - <li><p>If <var title="">parent</var> is null, <a href="#concept-throw" title="concept-throw">throw</a> a "<code><a href="#notfounderror">NotFoundError</a></code>" exception
     3.8 - and terminate these steps.
     3.9 - <!-- Opera Next 12.00 alpha seems to throw InvalidNodeTypeError instead.
    3.10 - The spec follows Chrome 17 dev. -->
    3.11 -
    3.12 - <p class="XXX">All implementations throw in this case, but would it make more
    3.13 - sense to simply return true?  This case can only occur when the roots are
    3.14 - the same, so it means that <var title="">node</var> is the range's root, so
    3.15 - the range is fully contained in <var title="">node</var>.
    3.16 + <li><p>If <var title="">parent</var> is null, return true and terminate these
    3.17 + steps.
    3.18 + <!-- browsers currently throw, but are willing to change
    3.19 +      https://www.w3.org/Bugs/Public/show_bug.cgi?id=16759 -->
    3.20  
    3.21   <li><p>Let <var title="">offset</var> be <var title="">node</var>'s
    3.22   <a href="#concept-tree-index" title="concept-tree-index">index</a>.