[Bug 25430] New: NodeIterator mutation algorithm is totally broken

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25430

            Bug ID: 25430
           Summary: NodeIterator mutation algorithm is totally broken
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
               URL: http://dom.spec.whatwg.org/#interface-nodeiterator
                OS: All
            Status: ASSIGNED
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: ayg@aryeh.name
          Reporter: ayg@aryeh.name
        QA Contact: public-webapps-bugzilla@w3.org
                CC: annevk@annevk.nl, mike@w3.org, Ms2ger@gmail.com,
                    www-dom@w3.org

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?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 23 April 2014 15:05:28 UTC