diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-09-17 22:05:15 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-09-17 22:05:15 +0200 |
commit | 3d530af5285a6b6238a683a87d637d22ec0855f3 (patch) | |
tree | 22edb9ec16183f1f795b6d06765fb9fffeb11d82 /src/html.cc | |
parent | 4fc467bb9112d4e49cc9ecbde03aa72bd805fc6d (diff) |
draw topLevel background if it differs from canvas background
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc index 3f39095a..9649b42e 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1569,10 +1569,16 @@ static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize) */ static void Html_tag_open_html(DilloHtml *html, const char *tag, int tagsize) { + Style *style; + if (!(html->InFlags & IN_HTML)) html->InFlags |= IN_HTML; ++html->Num_HTML; + style = html->styleEngine->style (); + if (style->backgroundColor) + HT2LT(html)->setBgColor(style->backgroundColor); + if (html->Num_HTML > 1) { BUG_MSG("HTML element was already open\n"); } @@ -1761,7 +1767,11 @@ static void Html_tag_open_body(DilloHtml *html, const char *tag, int tagsize) html->styleEngine->setNonCssHints (&props); html->dw->setStyle (html->styleEngine->style ()); - HT2LT(html)->setBgColor(html->styleEngine->style ()->backgroundColor); + + /* Set canvas color if not already set from Html_open_html(). + */ + if (! HT2LT(html)->getBgColor()) + HT2LT(html)->setBgColor(html->styleEngine->style ()->backgroundColor); /* Determine a color for visited links. * This color is computed once per page and used for immediate feedback |