Bug 44377 - TreeWalker traversal order is wrong when skipping and rejecting
Summary: TreeWalker traversal order is wrong when skipping and rejecting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: http://www-archive.mozilla.org/docs/d...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 21:07 PDT by Simon Fraser (smfr)
Modified: 2010-08-24 13:09 PDT (History)
5 users (show)

See Also:


Attachments
Add some tests (that all pass when bug 35296 is fixed) (10.79 KB, patch)
2010-08-20 21:17 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (5.66 KB, patch)
2010-08-21 12:22 PDT, Simon Fraser (smfr)
sam: review+
Details | Formatted Diff | Diff
Patch (5.66 KB, patch)
2010-08-21 13:30 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-08-20 21:07:27 PDT
When the NodeFilter skips or rejects nodes, the traversal order is all wrong (and doesn't match Firefox).
Comment 1 Simon Fraser (smfr) 2010-08-20 21:12:45 PDT
I have some tests that work fine, but when I load
http://www-archive.mozilla.org/docs/dom/samples/treewalkerdemo.xml
and hit the "All datatypes" button, the result is different from Firefox.
Comment 2 Simon Fraser (smfr) 2010-08-20 21:17:30 PDT
Created attachment 65020 [details]
Add some tests (that all pass when bug 35296 is fixed)
Comment 3 Simon Fraser (smfr) 2010-08-20 22:34:20 PDT
I was able to reduce a problem not covered by these tests. Will attach later.
Comment 4 Simon Fraser (smfr) 2010-08-21 12:22:07 PDT
Created attachment 65031 [details]
Patch
Comment 5 Simon Fraser (smfr) 2010-08-21 13:30:15 PDT
Created attachment 65034 [details]
Patch
Comment 6 Simon Fraser (smfr) 2010-08-21 13:30:58 PDT
Comment on attachment 65034 [details]
Patch

Oops, attached the same patch again.
Comment 7 Andreas Kling 2010-08-24 06:23:19 PDT
Comment on attachment 65031 [details]
Patch

LGTM (not a reviewer though.)

Of note: This change will make WebKit pass 2 additional tests on the IE Test Center (previous- and nextSibling() with NodeFilter)
Comment 8 WebKit Review Bot 2010-08-24 11:49:20 PDT
http://trac.webkit.org/changeset/65914 might have broken GTK Linux 64-bit Debug
The following changes are on the blame list:
http://trac.webkit.org/changeset/65913
http://trac.webkit.org/changeset/65914
http://trac.webkit.org/changeset/65915
Comment 9 Simon Fraser (smfr) 2010-08-24 13:08:26 PDT
Comment on attachment 65020 [details]
Add some tests (that all pass when bug 35296 is fixed)

http://trac.webkit.org/changeset/65914
Comment 10 Simon Fraser (smfr) 2010-08-24 13:09:22 PDT
http://trac.webkit.org/changeset/65926