RESOLVED FIXED 148257
Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker()
https://bugs.webkit.org/show_bug.cgi?id=148257
Summary Fix passing null / undefined as NodeFilter parameter for createNodeIterator()...
Chris Dumez
Reported 2015-08-20 16:01:51 PDT
Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker(). It is supposed to be translated into a *null* NodeFilter. However, WebKit currently constructs a new NodeFilter. Chrome and Firefox do not create a NodeFilter in this case. Test Suite: http://w3c-test.org/dom/traversal/NodeIterator.html http://w3c-test.org/dom/traversal/TreeWalker.html
Attachments
Patch (4.90 KB, patch)
2015-08-20 16:04 PDT, Chris Dumez
no flags
Patch (4.97 KB, patch)
2015-08-20 17:01 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-08-20 16:04:13 PDT
Chris Dumez
Comment 2 2015-08-20 17:01:27 PDT
Chris Dumez
Comment 3 2015-08-20 17:03:15 PDT
Comment on attachment 259530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259530&action=review > Source/WebCore/bindings/js/JSNodeFilterCustom.cpp:43 > + if (!value.isObject()) NodeFilter can be implemented as a JavaScript object. This is why we have a custom toWrapped() and we create a NodeFilter from that object. However, if we are not passed an object, we should simply return null instead of constructing a NodeFilter.
WebKit Commit Bot
Comment 4 2015-08-20 20:05:12 PDT
Comment on attachment 259530 [details] Patch Clearing flags on attachment: 259530 Committed r188745: <http://trac.webkit.org/changeset/188745>
WebKit Commit Bot
Comment 5 2015-08-20 20:05:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.