Bugzilla – Bug 20941
Treewalker previousNode algorithm seems wrong
Last modified: 2013-02-10 11:53:56 UTC
I was comparing http://dom.spec.whatwg.org/#dom-treewalker-previousnode to the corresponding Gecko code, and the Gecko code has one difference: Step 2 substep 2 has an additional subsubstep:
5. Set "sibling" to the previous sibling of "node".
I believe the Gecko code is correct and the spec is wrong, since step 2 substep 2 says "While sibling is not null, run these subsubsteps:" but the subsubsteps do not change the value of "sibling".