changeset 997:d633f4cc03e2

fix allow_white_bg=NO case This is not perfect, as the replacement color is hardcoded to 0xdcd1ba.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Wed, 11 Mar 2009 15:19:34 +0100
parents 2ed439264264
children 9e07ea8a694b
files ChangeLog src/styleengine.cc
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 11 09:14:43 2009 -0300
+++ b/ChangeLog	Wed Mar 11 15:19:34 2009 +0100
@@ -72,6 +72,7 @@
  - Fix CSS string parsing bug.
  - Replace visited_color dillorc option.
  - Add support for negative numbers in CSS parser.
+ - Fix allow_white_bg dillorc option.
    Patches: Johannes Hofmann
 +- Updated the GPL copyright note in the source files.
    Patch: Detlef Riekenberg
--- a/src/styleengine.cc	Wed Mar 11 09:14:43 2009 -0300
+++ b/src/styleengine.cc	Wed Mar 11 15:19:34 2009 +0100
@@ -291,8 +291,12 @@
       switch (p->name) {
          /* \todo missing cases */
          case CSS_PROPERTY_BACKGROUND_COLOR:
-            attrs->backgroundColor =
-               Color::create (layout, p->value.intVal);
+            if (!prefs.allow_white_bg && p->value.intVal == 0xffffff)
+               attrs->backgroundColor =
+                  Color::create (layout, 0xdcd1ba);
+            else
+               attrs->backgroundColor =
+                  Color::create (layout, p->value.intVal);
             break;
          case CSS_PROPERTY_BORDER_TOP_COLOR:
             attrs->borderColor.top =