diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-03-18 14:48:00 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-03-18 14:48:00 +0000 |
commit | 5930e4bcc46f8e49c34e5630cf875f2b055502ff (patch) | |
tree | 5c4f6af0e164a02fbcbeebeb66072eee22715adb /render/html.c | |
parent | bf69cfa74bb3bac972a0fb23ccbffeba5aa49412 (diff) | |
download | netsurf-5930e4bcc46f8e49c34e5630cf875f2b055502ff.tar.gz netsurf-5930e4bcc46f8e49c34e5630cf875f2b055502ff.tar.bz2 |
Fix bug where html conversion began before STYLE element fetch had been launched.
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) { |