summaryrefslogtreecommitdiff
path: root/include/libcss
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-01-12 20:56:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-01-12 20:56:08 +0000
commit46e3a946d7b2f7d68f3753a37c6f68a732a36f01 (patch)
tree7fb3b470499776274246cb261b13785ecd254e6e /include/libcss
parent41d14d090b1ce6b34865c12b3d1c980bd0fa36e8 (diff)
downloadlibcss-46e3a946d7b2f7d68f3753a37c6f68a732a36f01.tar.gz
libcss-46e3a946d7b2f7d68f3753a37c6f68a732a36f01.tar.bz2
Origin and media are not properties of the stylesheet.
They are properties of the context in which the stylesheet is used. Therefore, for top-level sheets, this information must be provided at selection time. For child sheets, the origin is inherited from their parent and the applicable media types are specified on the linking mechanism. svn path=/trunk/libcss/; revision=9802
Diffstat (limited to 'include/libcss')
-rw-r--r--include/libcss/select.h6
-rw-r--r--include/libcss/stylesheet.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/include/libcss/select.h b/include/libcss/select.h
index 76bdcf5..931dcf1 100644
--- a/include/libcss/select.h
+++ b/include/libcss/select.h
@@ -84,9 +84,11 @@ css_error css_select_ctx_create(css_allocator_fn alloc, void *pw,
css_error css_select_ctx_destroy(css_select_ctx *ctx);
css_error css_select_ctx_append_sheet(css_select_ctx *ctx,
- const css_stylesheet *sheet);
+ const css_stylesheet *sheet,
+ css_origin origin, uint64_t media);
css_error css_select_ctx_insert_sheet(css_select_ctx *ctx,
- const css_stylesheet *sheet, uint32_t index);
+ const css_stylesheet *sheet, uint32_t index,
+ css_origin origin, uint64_t media);
css_error css_select_ctx_remove_sheet(css_select_ctx *ctx,
const css_stylesheet *sheet);
diff --git a/include/libcss/stylesheet.h b/include/libcss/stylesheet.h
index 940e9b7..e70214d 100644
--- a/include/libcss/stylesheet.h
+++ b/include/libcss/stylesheet.h
@@ -26,8 +26,7 @@ typedef css_error (*css_url_resolution_fn)(void *pw, lwc_context *dict,
css_error css_stylesheet_create(css_language_level level,
const char *charset, const char *url, const char *title,
- css_origin origin, uint64_t media, bool allow_quirks,
- bool inline_style, lwc_context *dict,
+ bool allow_quirks, bool inline_style, lwc_context *dict,
css_allocator_fn alloc, void *alloc_pw,
css_url_resolution_fn resolve, void *resolve_pw,
css_stylesheet **stylesheet);
@@ -46,8 +45,6 @@ css_error css_stylesheet_get_language_level(css_stylesheet *sheet,
css_language_level *level);
css_error css_stylesheet_get_url(css_stylesheet *sheet, const char **url);
css_error css_stylesheet_get_title(css_stylesheet *sheet, const char **title);
-css_error css_stylesheet_get_origin(css_stylesheet *sheet, css_origin *origin);
-css_error css_stylesheet_get_media(css_stylesheet *sheet, uint64_t *media);
css_error css_stylesheet_quirks_allowed(css_stylesheet *sheet, bool *allowed);
css_error css_stylesheet_used_quirks(css_stylesheet *sheet, bool *quirks);