Bug 120050

Summary: Don't bother using a Vector for the ouput of querySelector, just return the first element found
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, commit-queue, esprehn+autocc, kangil.han
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rniwa: review+

Benjamin Poulain
Reported 2013-08-19 20:29:27 PDT
Don't bother using a Vector for the ouput of querySelector, just return the first element found
Attachments
Patch (16.05 KB, patch)
2013-08-19 20:30 PDT, Benjamin Poulain
rniwa: review+
Benjamin Poulain
Comment 1 2013-08-19 20:30:38 PDT
Ryosuke Niwa
Comment 2 2013-08-19 20:37:10 PDT
Comment on attachment 209152 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209152&action=review > Source/WebCore/dom/SelectorQuery.cpp:149 > + SelectorQueryTrait::appendOutputForElement(output, element); > + if (SelectorQueryTrait::shouldOnlyMatchFirstElement) It'll be nice to assert that we never call appendOutputForElement for the first match case.
Benjamin Poulain
Comment 3 2013-08-20 15:42:57 PDT
Note You need to log in before you can comment on or make changes to this bug.