mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 14:31:20 +03:00
Now that we own imported stylesheets, we can get away with allocating a single blank import and registering that.
svn path=/trunk/netsurf/; revision=10370
This commit is contained in:
parent
eb19a649e7
commit
7dcc15cbd4
@ -434,16 +434,23 @@ css_error nscss_import_complete(struct content_css_data *c,
|
||||
struct content *s = hlcache_handle_get_content(import);
|
||||
sheet = s->data.css.sheet;
|
||||
} else {
|
||||
static css_stylesheet *blank_import;
|
||||
|
||||
/* Create a blank sheet if needed. */
|
||||
if (blank_import == NULL) {
|
||||
error = css_stylesheet_create(CSS_LEVEL_DEFAULT,
|
||||
NULL, "", NULL, false, false,
|
||||
myrealloc, NULL,
|
||||
nscss_resolve_url, NULL,
|
||||
&sheet);
|
||||
&blank_import);
|
||||
if (error != CSS_OK) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
sheet = blank_import;
|
||||
}
|
||||
|
||||
error = css_stylesheet_register_import(c->sheet, sheet);
|
||||
if (error != CSS_OK) {
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user