From fea71815737d9da24f66c440f02aa16ee256c770 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 28 Mar 2012 12:48:09 +0000 Subject: Add some functions to implement some of LibCSS's selection callbacks, as an experiment in clawing back performance. May well get reverted. svn path=/trunk/libdom/; revision=13755 --- include/dom/core/element.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/dom/core/element.h b/include/dom/core/element.h index df093a4..91b763f 100644 --- a/include/dom/core/element.h +++ b/include/dom/core/element.h @@ -352,4 +352,16 @@ static inline dom_exception dom_element_has_class( dom_element_has_class((dom_element *) (e), \ (lwc_string *) (n), (bool *) (m)) + +/* Functions for implementing some libcss selection callbacks. + * Note that they don't take a reference to the returned element, as such they + * are UNSAFE if you require the returned element to live beyond the next time + * the DOM gets a chance to change. */ +dom_exception dom_element_named_ancestor_node(dom_element *element, + lwc_string *name, dom_element **ancestor); +dom_exception dom_element_named_parent_node(dom_element *element, + lwc_string *name, dom_element **parent); +dom_exception dom_element_parent_node(dom_element *element, + dom_element **parent); + #endif -- cgit v1.2.3