query-selector-last.html tests querySelector() for an element that appears after 1000 div elements, all of which have the same id and class. To test the performance of querySelector() under a lot of ids and classes, we should make the ids and classes of the 1000 elements different.
Created attachment 145500 [details] Patch
Comment on attachment 145500 [details] Patch Conversely, should we have a test where we have lots of duplicate ids as well?
(In reply to comment #2) > (From update of attachment 145500 [details]) > Conversely, should we have a test where we have lots of duplicate ids as well? Good point. For example, getElementById() (which is internally called by querySelector()) traces different call paths for duplicated ids. I'll add the test in another patch.
Comment on attachment 145500 [details] Patch Clearing flags on attachment: 145500 Committed r119366: <http://trac.webkit.org/changeset/119366>
All reviewed patches have been landed. Closing bug.
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 145500 [details] [details]) > > Conversely, should we have a test where we have lots of duplicate ids as well? > > Good point. For example, getElementById() (which is internally called by querySelector()) traces different call paths for duplicated ids. I'll add the test in another patch. Hmm, it might not be worth adding. DOM/GetElement.html already tests duplicate id cases.