mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 13:29:21 +03:00
Only invoke callback when we successfully converted CSS data.
svn path=/trunk/netsurf/; revision=10592
This commit is contained in:
parent
9b635053e3
commit
89683af529
13
css/css.c
13
css/css.c
@ -29,6 +29,7 @@
|
||||
#include "render/html.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/http.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/messages.h"
|
||||
|
||||
/**
|
||||
@ -261,9 +262,17 @@ css_error nscss_convert_css_data(struct content_css_data *c,
|
||||
error = nscss_request_import(c, ctx);
|
||||
if (error != CSS_OK)
|
||||
free(ctx);
|
||||
} else {
|
||||
/* No imports, so complete conversion */
|
||||
} else if (error == CSS_OK) {
|
||||
/* No imports, and no errors, so complete conversion */
|
||||
callback(c, pw);
|
||||
} else {
|
||||
const char *url;
|
||||
|
||||
if (css_stylesheet_get_url(c->sheet, &url) == CSS_OK) {
|
||||
LOG(("Failed converting %p %s (%d)", c, url, error));
|
||||
} else {
|
||||
LOG(("Failed converting %p (%d)", c, error));
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user