summaryrefslogtreecommitdiff
path: root/src/stylesheet.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 18:42:23 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 18:42:23 +0000
commitb4d0d63be81dce36b1ddc4365235036c8e9d1a3d (patch)
treea62ec6f46d1989a1268b44d95fa21c571cc45ac8 /src/stylesheet.c
parentddb3c1e8d9e62591f17a463aae05374effae66dc (diff)
downloadlibcss-b4d0d63be81dce36b1ddc4365235036c8e9d1a3d.tar.gz
libcss-b4d0d63be81dce36b1ddc4365235036c8e9d1a3d.tar.bz2
Simplify API of css_stylesheet_selector_create -- it's always used to create element selectors. Everything else is handled via detail.
svn path=/trunk/libcss/; revision=6266
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r--src/stylesheet.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index 24d46eb..c8eb2e7 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -368,20 +368,17 @@ css_error css_stylesheet_style_destroy(css_stylesheet *sheet, css_style *style)
}
/**
- * Create a selector
+ * Create an element selector
*
* \param sheet The stylesheet context
- * \param type The type of selector to create
* \param name Name of selector
- * \param value Value of selector, or NULL
* \param selector Pointer to location to receive selector object
* \return CSS_OK on success,
* CSS_BADPARM on bad parameters,
* CSS_NOMEM on memory exhaustion
*/
css_error css_stylesheet_selector_create(css_stylesheet *sheet,
- css_selector_type type, const parserutils_hash_entry *name,
- const parserutils_hash_entry *value, css_selector **selector)
+ const parserutils_hash_entry *name, css_selector **selector)
{
css_selector *sel;
@@ -394,9 +391,9 @@ css_error css_stylesheet_selector_create(css_stylesheet *sheet,
memset(sel, 0, sizeof(css_selector));
- sel->data.type = type;
+ sel->data.type = CSS_SELECTOR_ELEMENT;
sel->data.name = name;
- sel->data.value = value;
+ sel->data.value = NULL;
/** \todo specificity */
sel->specificity = 0;