summaryrefslogtreecommitdiff
path: root/css/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'css/select.c')
-rw-r--r--css/select.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/css/select.c b/css/select.c
index 9d7a2d8ba..be090c0db 100644
--- a/css/select.c
+++ b/css/select.c
@@ -167,36 +167,30 @@ css_stylesheet *nscss_create_inline_style(const uint8_t *data, size_t len,
*
* \param html HTML document
* \param n Element to select for
- * \param pseudo_element Pseudo element to select for, instead
* \param media Permitted media types
* \param inline_style Inline style associated with element, or NULL
* \param alloc Memory allocation function
* \param pw Private word for allocator
- * \return Pointer to partial computed style, or NULL on failure
+ * \return Pointer to selection results (containing partial computed styles),
+ * or NULL on failure
*/
-css_computed_style *nscss_get_style(struct content *html, xmlNode *n,
- uint32_t pseudo_element, uint64_t media,
- const css_stylesheet *inline_style,
+css_select_results *nscss_get_style(struct content *html, xmlNode *n,
+ uint64_t media, const css_stylesheet *inline_style,
css_allocator_fn alloc, void *pw)
{
- css_computed_style *style;
+ css_select_results *styles;
css_error error;
assert(html->type == CONTENT_HTML);
- error = css_computed_style_create(alloc, pw, &style);
- if (error != CSS_OK)
- return NULL;
-
- error = css_select_style(html->data.html.select_ctx, n,
- pseudo_element, media, inline_style, style,
- &selection_handler, html);
+ error = css_select_style(html->data.html.select_ctx, n, media,
+ inline_style, &selection_handler, html, &styles);
if (error != CSS_OK) {
- css_computed_style_destroy(style);
+ css_select_results_destroy(styles);
return NULL;
}
- return style;
+ return styles;
}
/**