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
Created attachment 259513 [details] Patch
Created attachment 259530 [details] Patch
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.
Comment on attachment 259530 [details] Patch Clearing flags on attachment: 259530 Committed r188745: <http://trac.webkit.org/changeset/188745>
All reviewed patches have been landed. Closing bug.