1. Open the URL. 2. If under "Log:" it does not say 3, 2 the test has failed. (The version and OS and such are all wrong, as I'm using Opera on Ubuntu at the moment...)
Confirmed and even extended with this testcase. http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3E%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3E%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3Ex%0A%3Cscript%3E%0A%20var%20elms%3Ddocument.getElementsByTagName('div')%3B%0A%20for(i%20%3D%200%3B%20i%20%3C%20elms.length%3B%20i%2B%2B)%20%7B%0A%20var%20elms2%20%3D%20document.getElementsByClassName('x')%3B%20%0A%20%20w(elms2.length)%3B%0A%20%20elms2%5Bi%5D.className%20%3D%20'xx'%3B%0A%20%7D%20%0A%3C%2Fscript%3E
Created attachment 24560 [details] Easier (imo) to understand testcase
Created attachment 24570 [details] Fix I'm a little worried about the performance implications of this, but not sure how the best way to test would be.
Comment on attachment 24570 [details] Fix r=me
Landed in r37800. As a workaround for versions that still have this bug, you can force an update by setting just about any non-class property when you set the class.
*** Bug 22523 has been marked as a duplicate of this bug. ***