Bug 21052

Summary: Generalize id selector special case for querySelectorAll
Product: WebKit Reporter: David Smith <catfish.man>
Component: DOMAssignee: David Smith <catfish.man>
Status: RESOLVED FIXED    
Severity: Enhancement    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch; Passes run-webkit-tests and doesn't regress http://ejohn.org/apps/selectortest/#target timothy: review+

Description David Smith 2008-09-24 02:05:46 PDT
Currently we special case only a raw id selector. Patch forthcoming shortly to expand this to any selector with an id selector as its rightmost element, at a small cost in special case speed.

Changes results from:
#title: 2ms
h1#title: 55ms
div #title: 55ms

to:
#title: 1ms (test variance? it shouldn't have sped up...)
h1#title: 2ms
div #title: 5ms
Comment 1 David Smith 2008-09-24 02:21:09 PDT
Created attachment 23745 [details]
Patch; Passes run-webkit-tests and doesn't regress http://ejohn.org/apps/selectortest/#target
Comment 2 David Smith 2008-09-25 13:56:47 PDT
Fixed in r36907