Bug 19974

Summary: getElementsByClassName not live enough ;)
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: David Smith <catfish.man>
Status: RESOLVED FIXED    
Severity: Normal CC: catfish.man, rik, sam, stevey
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: 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%0D%0A%3Cscript%3E%0D%0A%20elms2%20%3D%20document.getElementsByClassName('x')%3B%20%0D%0A%20for(i%20%3D%200%3B%20i%20%3C%20elms2.length%3B%20i%2B%2B)%20%7B%0D%0A%20%20w(elms2.length)%3B%0D%0A%20%20elms2%5Bi%5D.className%20%3D%20'xx'%3B%0D%0A%20%7D%20%0D%0A%3C%2Fscript%3E
Attachments:
Description Flags
Easier (imo) to understand testcase
none
Fix andersca: review+

Anne van Kesteren
Reported 2008-07-10 13:26:30 PDT
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...)
Attachments
Easier (imo) to understand testcase (310 bytes, text/html)
2008-10-22 11:05 PDT, David Smith
no flags
Fix (2.66 KB, patch)
2008-10-22 13:47 PDT, David Smith
andersca: review+
David Smith
Comment 2 2008-10-22 11:05:45 PDT
Created attachment 24560 [details] Easier (imo) to understand testcase
David Smith
Comment 3 2008-10-22 13:47:28 PDT
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.
Anders Carlsson
Comment 4 2008-10-22 17:44:34 PDT
Comment on attachment 24570 [details] Fix r=me
David Smith
Comment 5 2008-10-22 17:50:21 PDT
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.
David Smith
Comment 6 2008-11-26 23:35:00 PST
*** Bug 22523 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.