mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
Log failures
svn path=/trunk/netsurf/; revision=9629
This commit is contained in:
parent
1c403cb2f8
commit
9e742f13da
@ -27,6 +27,7 @@
|
||||
#include "css/select.h"
|
||||
#include "css/utils.h"
|
||||
#include "desktop/options.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/url.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
@ -139,17 +140,21 @@ css_stylesheet *nscss_create_inline_style(const uint8_t *data, size_t len,
|
||||
error = css_stylesheet_create(CSS_LEVEL_DEFAULT, charset, url, NULL,
|
||||
CSS_ORIGIN_AUTHOR, CSS_MEDIA_ALL, allow_quirks, true,
|
||||
dict, alloc, pw, nscss_resolve_url, NULL, &sheet);
|
||||
if (error != CSS_OK)
|
||||
if (error != CSS_OK) {
|
||||
LOG(("Failed creating sheet: %d", error));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
error = css_stylesheet_append_data(sheet, data, len);
|
||||
if (error != CSS_OK && error != CSS_NEEDDATA) {
|
||||
LOG(("failed appending data: %d", error));
|
||||
css_stylesheet_destroy(sheet);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
error = css_stylesheet_data_done(sheet);
|
||||
if (error != CSS_OK) {
|
||||
LOG(("failed completing parse: %d", error));
|
||||
css_stylesheet_destroy(sheet);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user