summaryrefslogtreecommitdiff
path: root/src/stylesheet.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 17:20:19 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 17:20:19 +0000
commit1d8b0aad719898be0f1b8a862be41c2b51075c80 (patch)
tree1efac87b00dba4be396a3aa9ef1c45e023272ff0 /src/stylesheet.h
parent03c0b36fdb90960b4a4c1e6f86084c850463195b (diff)
downloadlibcss-1d8b0aad719898be0f1b8a862be41c2b51075c80.tar.gz
libcss-1d8b0aad719898be0f1b8a862be41c2b51075c80.tar.bz2
Rework handling of imported stylesheets.
No longer is the client called back mid-parse. Instead, they must acquire details of and process imported stylesheets after css_stylesheet_data_done() has been called on the parent sheet. The return code of css_stylesheet_data_done() informs the client of the need to process imported sheets. svn path=/trunk/libcss/; revision=6504
Diffstat (limited to 'src/stylesheet.h')
-rw-r--r--src/stylesheet.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/stylesheet.h b/src/stylesheet.h
index 2b5860f..d2316d1 100644
--- a/src/stylesheet.h
+++ b/src/stylesheet.h
@@ -133,6 +133,9 @@ typedef struct css_rule_page {
typedef struct css_rule_import {
css_rule base;
+ const parserutils_hash_entry *url;
+ uint64_t media;
+
css_stylesheet *sheet;
} css_rule_import;
@@ -161,9 +164,6 @@ struct css_stylesheet {
void *ownerNode; /**< Owning node in document */
css_rule *ownerRule; /**< Owning rule in parent */
- css_import_handler import; /**< Import callback */
- void *import_pw; /**< Import handler data */
-
css_language_level level; /**< Language level of sheet */
css_parser *parser; /**< Core parser for sheet */
void *parser_frontend; /**< Frontend parser */
@@ -207,8 +207,9 @@ css_error css_stylesheet_rule_append_style(css_stylesheet *sheet,
css_error css_stylesheet_rule_set_charset(css_stylesheet *sheet,
css_rule *rule, const parserutils_hash_entry *charset);
-css_error css_stylesheet_rule_set_import(css_stylesheet *sheet,
- css_rule *rule, css_stylesheet *import);
+css_error css_stylesheet_rule_set_nascent_import(css_stylesheet *sheet,
+ css_rule *rule, const parserutils_hash_entry *url,
+ uint64_t media);
/** \todo registering other rule-type data with css_rules */