[Webkit-unassigned] [Bug 117766] New: Make createNodeIterator() and createTreeWalker() accept default arguments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 18 18:37:58 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=117766

           Summary: Make createNodeIterator() and createTreeWalker()
                    accept default arguments
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: BlinkMergeCandidate
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: mjs at apple.com, ap at webkit.org


Consider merging https://chromium.googlesource.com/chromium/blink/+/f428315bba882a4ba1b2af42869e477b86b51bf1

In DOM Level 2 Traversal and Range, the arguments to these methods were all
mandatory. In DOM4, however, the arguments except the first one (root node)
became optional. Especially, the |whatToShow| argument has the default value
of 0xFFFFFFFF, which is a bitmask meaning that the all kinds of nodes will be
accepted. In contrast, in our current implementation, |whatToShow| argument
is defaulted to zero when it is omitted. This means that all kinds of nodes
should be filtered, which is totally useless for users.

This change updates Document.createNodeIterator() and createTreeWalker() so
they can accept default arguments properly. The potential risk of this change
is low, because omitting the |whatToShow| argument was meaningless with our
old implementation. Mozilla also implements this default argument, so I
assume it is safe to follow the recent specification.

Additionally, this change removes |expandEntityReferences| flag from these
methods' implementation. This flag first appeared in the DOM2 Traversal
specification, but later got removed in DOM4. This flag was never implemented
and was actually ignored. To keep compatibility, this flag is still accepted
when specified in createNodeIterator() and createTreeWalker() methods, so this
change does not affect the behavior.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list