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

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected], [email protected],
                    [email protected]

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 on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.