[webkit-reviews] review denied: [Bug 137418] Implement Element.closest() API : [Attachment 239285] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 4 12:57:37 PDT 2014


Benjamin Poulain <benjamin at webkit.org> has denied Dhi Aurrahman
<diorahman at rockybars.com>'s request for review:
Bug 137418: Implement Element.closest() API
https://bugs.webkit.org/show_bug.cgi?id=137418

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

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


> Source/WebCore/dom/SelectorQuery.cpp:149
> +	       Element* candidateElement = selectorClosest(selector,
*currentNode, *currentNode);

Shouldn't the scope be targetElement instead of currentNode?

> LayoutTests/fast/selectors/closest-scope.html:24
> +shouldBe('theTarget.closest("body>:scope")', 'theTarget');

Let's add a test for the :scope bug.

theTarget.closest('body:scope') should be null.


More information about the webkit-reviews mailing list