Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: Source/core/dom/SelectorQuery.h

Issue 701723007: Adding Element.closest() API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.idl ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/SelectorQuery.h
diff --git a/Source/core/dom/SelectorQuery.h b/Source/core/dom/SelectorQuery.h
index 47720b68ef482f76a96f16cccdd8c6782f5622fd..b7e3671322b91bc2b9d01b3ef77435b6c5b17259 100644
--- a/Source/core/dom/SelectorQuery.h
+++ b/Source/core/dom/SelectorQuery.h
@@ -47,6 +47,7 @@ class SelectorDataList {
public:
void initialize(const CSSSelectorList&);
bool matches(Element&) const;
+ Element* closest(Element&) const;
PassRefPtrWillBeRawPtr<StaticElementList> queryAll(ContainerNode& rootNode) const;
PassRefPtrWillBeRawPtr<Element> queryFirst(ContainerNode& rootNode) const;
@@ -89,6 +90,7 @@ public:
static PassOwnPtr<SelectorQuery> adopt(CSSSelectorList&);
bool matches(Element&) const;
+ Element* closest(Element&) const;
PassRefPtrWillBeRawPtr<StaticElementList> queryAll(ContainerNode& rootNode) const;
PassRefPtrWillBeRawPtr<Element> queryFirst(ContainerNode& rootNode) const;
private:
« no previous file with comments | « Source/core/dom/Element.idl ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698