diff options
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/render/html.c b/render/html.c index ad7ab9997..0f854bc67 100644 --- a/render/html.c +++ b/render/html.c @@ -1121,13 +1121,30 @@ static bool html_convert(struct content *c) /* if there are no active fetches in progress no scripts are * being fetched or they completed already. - */ - if (htmlc->base.active == 0) { + */ + if (html_can_begin_conversion(htmlc)) { return html_begin_conversion(htmlc); } return true; } +/* Exported interface documented in html_internal.h */ +bool html_can_begin_conversion(html_content *htmlc) +{ + unsigned int i; + bool got_modified_stylesheet = false; + + for (i = 0; i != htmlc->stylesheet_count; i++) { + if (htmlc->stylesheets[i].modified) + got_modified_stylesheet = true; + } + + if (htmlc->base.active != 0 || got_modified_stylesheet) + return false; + + return true; +} + bool html_begin_conversion(html_content *htmlc) { |