[webkit-reviews] review granted: [Bug 136851] filterRootById accidentally clears inAdjacentChain flag : [Attachment 238172] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 16 12:43:23 PDT 2014


Benjamin Poulain <benjamin at webkit.org> has granted Yusuke Suzuki
<utatane.tea at gmail.com>'s request for review:
Bug 136851: filterRootById accidentally clears inAdjacentChain flag
https://bugs.webkit.org/show_bug.cgi?id=136851

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

------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=238172&action=review


Good catch and good fix.

> Source/WebCore/ChangeLog:11
> +	   * dom/SelectorQuery.cpp:
> +	   (WebCore::filterRootById):

You could add your copyright to this file, you already fixed a bunch of stuff
here.

>
LayoutTests/fast/selectors/filter-root-node-with-selector-contains-adjacents.ht
ml:35
> +shouldBe('document.querySelectorAll("span#first + t1").length', '1');
> +shouldBe('document.querySelectorAll("span#second ~ t2").length', '1');
> +shouldBe('document.querySelectorAll("span#third + t3 > t4").length', '1');
> +shouldBe('document.querySelectorAll("span#third + t3 > t5").length', '0');
> +shouldBe('document.querySelectorAll("span#fourth t6 ~ t7").length', '3');

Can you please extend those test cases to sub-selectors on the left and on the
right to cover all possible cases?

Something like "span#first + t1", ".class#first + t1", ""#first.class + t1", 
"span#first.class + t1", etc.


More information about the webkit-reviews mailing list