changeset 1701:dbd67f965e5e

add inheritBackgroundColor () in more cases This makes background color work for elements for which no new widget is added. It just a workaround until complete style handling for inline elements is implemented. Submitted-by: Jeremy Henty <onepoint@starurchin.org>
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 06 Sep 2010 21:41:00 +0200
parents e8f48dbdea2a
children 341debc7a62c deed598ea249
files src/html.cc
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Sun Sep 05 21:55:37 2010 +0200
+++ b/src/html.cc	Mon Sep 06 21:41:00 2010 +0200
@@ -1955,6 +1955,8 @@
 {
    const char *attrbuf;
 
+   html->styleEngine->inheritBackgroundColor ();
+
    if (prefs.show_tooltip &&
        (attrbuf = a_Html_get_attr(html, tag, tagsize, "title"))) {
       CssPropertyList props;
@@ -1971,6 +1973,7 @@
  */
 static void Html_tag_open_center(DilloHtml *html, const char *tag, int tagsize)
 {
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (0, html->styleEngine->wordStyle ());
 }
 
@@ -1988,6 +1991,7 @@
 static void Html_tag_open_address(DilloHtml *html,
                                   const char *tag, int tagsize)
 {
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
 }
 
@@ -2538,6 +2542,7 @@
      */
     const char *U201C = "\xe2\x80\x9c";
 
+    html->styleEngine->inheritBackgroundColor ();
     HT2TB(html)->addText (U201C, html->styleEngine->wordStyle ());
 }
 
@@ -2591,6 +2596,7 @@
  */
 static void Html_tag_open_dir(DilloHtml *html, const char *tag, int tagsize)
 {
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
 
    S_TOP(html)->list_type = HTML_LIST_UNORDERED;
@@ -2768,6 +2774,7 @@
 static void Html_tag_open_dl(DilloHtml *html, const char *tag, int tagsize)
 {
    /* may want to actually do some stuff here. */
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
 }
 
@@ -2776,6 +2783,7 @@
  */
 static void Html_tag_open_dt(DilloHtml *html, const char *tag, int tagsize)
 {
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
 }
 
@@ -2792,6 +2800,7 @@
  */
 static void Html_tag_open_pre(DilloHtml *html, const char *tag, int tagsize)
 {
+   html->styleEngine->inheritBackgroundColor ();
    HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
 
    html->InFlags |= IN_PRE;