summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-27 09:24:30 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-27 09:24:30 +0000
commit2244791cef34b0818dc6d2fab177efaa7b8a3040 (patch)
tree877298f053ce0ceca2bc78146ed53eaafc219f96
parent9208eb249116013db51504ff9f4be6a6afcde596 (diff)
downloadlibcss-2244791cef34b0818dc6d2fab177efaa7b8a3040.tar.gz
libcss-2244791cef34b0818dc6d2fab177efaa7b8a3040.tar.bz2
Fiddle around with css_select_style()'s API. Add some documentation.
svn path=/trunk/libcss/; revision=6285
-rw-r--r--src/select/select.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/select/select.c b/src/select/select.c
index a8acd7a..deb7718 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -203,13 +203,34 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
return CSS_OK;
}
+/**
+ * Select a style for the given node
+ *
+ * \param ctx Selection context to use
+ * \param node Node to select style for
+ * \param pseudo_element Pseudo element to select for, instead
+ * \param pseudo_classes Currently active pseudo classes
+ * \param media Currently active media types
+ * \param result Pointer to style to populate
+ * \return CSS_OK on success, appropriate error otherwise.
+ *
+ * In computing the style, no reference is made to the parent node's
+ * style. Therefore, the resultant computed style is not ready for
+ * immediate use, as some properties may be marked as inherited.
+ * Use css_computed_style_compose() to obtain a fully computed style.
+ *
+ * This two-step approach to style computation is designed to allow
+ * the client to store the partially computed style and efficiently
+ * update the fully computed style for a node when layout changes.
+ */
css_error css_select_style(css_select_ctx *ctx, void *node,
- uint32_t pseudo_classes, uint32_t media,
- css_computed_style **result)
+ uint64_t pseudo_element, uint64_t pseudo_classes,
+ uint64_t media, css_computed_style *result)
{
UNUSED(ctx);
UNUSED(node);
UNUSED(pseudo_classes);
+ UNUSED(pseudo_element);
UNUSED(media);
UNUSED(result);