[Webkit-unassigned] [Bug 137418] Implement Element.closest() API

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


https://bugs.webkit.org/show_bug.cgi?id=137418


Benjamin Poulain <benjamin at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #239285|review?                     |review-
               Flag|                            |




--- Comment #7 from Benjamin Poulain <benjamin at webkit.org>  2014-10-04 12:57:36 PST ---
(From update of attachment 239285)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list