Bug 20941 - Treewalker previousNode algorithm seems wrong
Treewalker previousNode algorithm seems wrong
Status: RESOLVED FIXED
Product: WebAppsWG
Classification: Unclassified
Component: DOM
unspecified
PC All
: P2 normal
: ---
Assigned To: Anne
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-10 02:11 UTC by Boris Zbarsky
Modified: 2013-02-10 11:53 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Zbarsky 2013-02-10 02:11:14 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".