summaryrefslogtreecommitdiff
path: root/src/stylesheet.c
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 /src/stylesheet.c
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 'src/stylesheet.c')
-rw-r--r--src/stylesheet.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index e6d8ea7..a20ec14 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -25,8 +25,6 @@ static size_t _rule_size(const css_rule *rule);
* \param charset The charset of the stylesheet data, or NULL to detect
* \param url URL of stylesheet
* \param title Title of stylesheet
- * \param origin Origin of stylesheet
- * \param media Media stylesheet applies to
* \param allow_quirks Permit quirky parsing of stylesheets
* \param inline_style This stylesheet is an inline style
* \param dict Dictionary in which to intern strings
@@ -41,8 +39,7 @@ static size_t _rule_size(const css_rule *rule);
*/
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)
@@ -136,9 +133,6 @@ css_error css_stylesheet_create(css_language_level level,
memcpy(sheet->title, title, len);
}
- sheet->origin = origin;
- sheet->media = media;
-
sheet->resolve = resolve;
sheet->resolve_pw = resolve_pw;
@@ -431,40 +425,6 @@ css_error css_stylesheet_get_title(css_stylesheet *sheet, const char **title)
}
/**
- * Retrieve the origin of a stylesheet
- *
- * \param sheet The stylesheet to retrieve the origin of
- * \param origin Pointer to location to receive origin
- * \return CSS_OK on success, appropriate error otherwise
- */
-css_error css_stylesheet_get_origin(css_stylesheet *sheet, css_origin *origin)
-{
- if (sheet == NULL || origin == NULL)
- return CSS_BADPARM;
-
- *origin = sheet->origin;
-
- return CSS_OK;
-}
-
-/**
- * Retrieve the media types associated with a stylesheet
- *
- * \param sheet The stylesheet to retrieve the media types for
- * \param media Pointer to location to receive media types
- * \return CSS_OK on success, appropriate error otherwise
- */
-css_error css_stylesheet_get_media(css_stylesheet *sheet, uint64_t *media)
-{
- if (sheet == NULL || media == NULL)
- return CSS_BADPARM;
-
- *media = sheet->media;
-
- return CSS_OK;
-}
-
-/**
* Determine whether quirky parsing was permitted on a stylesheet
*
* \param sheet The stylesheet to consider