Bug 117486

Summary: Split SelectorDataList::executeSingleTagNameSelectorData() into the 4 kinds of traversal
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, commit-queue, esprehn+autocc, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rniwa: review+

Description Benjamin Poulain 2013-06-10 21:35:23 PDT
Split SelectorDataList::executeSingleTagNameSelectorData() into the 4 kinds of traversal
Comment 1 Benjamin Poulain 2013-06-10 22:07:30 PDT
Created attachment 204285 [details]
Patch
Comment 2 Ryosuke Niwa 2013-06-10 23:40:37 PDT
Comment on attachment 204285 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=204285&action=review

r=me provided the following comments are addressed.

> Source/WebCore/dom/SelectorQuery.cpp:161
> +        if (element->localName() == localName) {

Can we assert that this condition matches with SelectorChecker::tagMatches(element, tagQualifiedName)?
I'm afraid that this might get out of sync with SelectorChecker::tagMatches some day.

> Source/WebCore/dom/SelectorQuery.cpp:173
> +        matchedElements.append(element);

Ditto.
Comment 3 Benjamin Poulain 2013-06-11 13:53:08 PDT
That's a very good point. I add a test verifying the generated matchedElements vector is correct.
Comment 4 Benjamin Poulain 2013-06-11 14:10:08 PDT
Committed r151470: <http://trac.webkit.org/changeset/151470>