[webkit-reviews] review granted: [Bug 116502] Optimized querySelector(All) when selector contains #id : [Attachment 225028] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 24 14:42:57 PST 2014


Andreas Kling <akling at apple.com> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 116502: Optimized querySelector(All) when selector contains #id
https://bugs.webkit.org/show_bug.cgi?id=116502

Attachment 225028: Patch
https://bugs.webkit.org/attachment.cgi?id=225028&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=225028&action=review


r=me

> Source/WebCore/ChangeLog:13
> +	   cache, and start matching the childre from there.

Typo, children.

> Source/WebCore/dom/SelectorQuery.cpp:246
> +	       if
(LIKELY(!rootNode.treeScope().containsMultipleElementsWithId(idToMatch))) {
> +		   if (ContainerNode* searchRoot =
rootNode.treeScope().getElementById(idToMatch)) {

It would be more efficient to do these two checks in opposite order.

> Source/WebCore/dom/SelectorQuery.cpp:417
> +	   CompiledSingleWithRootFilterCase:

Indentation is off here.

> Source/WebCore/dom/SelectorQuery.h:49
> -    void initialize(const CSSSelectorList&);
> +    SelectorDataList(const CSSSelectorList&);

explicit


More information about the webkit-reviews mailing list