diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-01 10:35:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-07-01 10:35:37 +0000 |
commit | 94ff706d99220d915be8cedcda6b93ead998f5b8 (patch) | |
tree | f28b6eec02fb023351dbeb2610d19d7c76580757 /test/select-auto.c | |
parent | 5099ad82bbfc21bd45408bf5ca069df3ecfd0e8d (diff) | |
download | libcss-94ff706d99220d915be8cedcda6b93ead998f5b8.tar.gz libcss-94ff706d99220d915be8cedcda6b93ead998f5b8.tar.bz2 |
Make all URIs absolute
svn path=/trunk/libcss/; revision=8228
Diffstat (limited to 'test/select-auto.c')
-rw-r--r-- | test/select-auto.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/select-auto.c b/test/select-auto.c index 3f82433..e884a18 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -145,6 +145,18 @@ static void *myrealloc(void *data, size_t len, void *pw) return realloc(data, len); } +static css_error resolve_url(void *pw, lwc_context *dict, + const char *base, lwc_string *rel, lwc_string **abs) +{ + UNUSED(pw); + UNUSED(base); + + /* About as useless as possible */ + *abs = lwc_context_string_ref(dict, rel); + + return CSS_OK; +} + int main(int argc, char **argv) { line_ctx ctx; @@ -451,7 +463,7 @@ void parse_sheet(line_ctx *ctx, const char *data, size_t len) /** \todo How are we going to handle @import? */ assert(css_stylesheet_create(CSS_LEVEL_21, "UTF-8", "foo", "foo", origin, media, false, false, ctx->dict, - myrealloc, NULL, &sheet) == CSS_OK); + myrealloc, NULL, resolve_url, NULL, &sheet) == CSS_OK); /* Extend array of sheets and append new sheet to it */ temp = realloc(ctx->sheets, |