summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-03-28 12:48:09 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2012-03-28 12:48:09 +0000
commitfea71815737d9da24f66c440f02aa16ee256c770 (patch)
tree3ea8aa59e816fb7e4a477b4428457102e113cb15 /include
parentd49cde3fba68a70832e09f10b8a18406deecba28 (diff)
downloadlibdom-fea71815737d9da24f66c440f02aa16ee256c770.tar.gz
libdom-fea71815737d9da24f66c440f02aa16ee256c770.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/dom/core/element.h12
1 files changed, 12 insertions, 0 deletions
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