This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25430 - NodeIterator mutation algorithm is totally broken
Summary: NodeIterator mutation algorithm is totally broken
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: public-webapps-bugzilla
URL: http://dom.spec.whatwg.org/#interface...
Whiteboard:
Keywords:
Depends on: 23268
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-23 15:05 UTC by Aryeh Gregor
Modified: 2014-04-24 14:21 UTC (History)
4 users (show)

See Also:


Attachments

Description Aryeh Gregor 2014-04-23 15:05:26 UTC
Discovered while writing tests.

"If the node is not a descendant of root and is not an ancestor of the referenceNode attribute value or the referenceNode attribute value itself, terminate these steps."

This doesn't make sense AFAICT.  "Not a descendant of root" means the same as "is the root," since we're only dealing with the iterator collection, and the root will (IIUC) always be an ancestor of the referenceNode attribute value.  I think this should read "If the node is *root or* is not an ancestor . . ."

"If the pointerBeforeReferenceNode attribute value is true and there is a node following the node that is being removed, set the referenceNode attribute to the first such node, and terminate these steps."

If the node that is being removed has a child, the node following it is its first child, which is obviously not what we want.  It should say "and there is a node following *the last inclusive descendant of* the node that is being removed," or similar.

Agreed?