This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20941 - Treewalker previousNode algorithm seems wrong
Summary: Treewalker previousNode algorithm seems wrong
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-10 02:11 UTC by Boris Zbarsky
Modified: 2013-02-10 11:53 UTC (History)
2 users (show)

See Also:


Attachments

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".