changeset 647:ed5ea857edc6

adjust inheritBackgroundColor() handling to new wordStyle() stuff
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 04 Dec 2008 19:26:45 +0100
parents 35c1cb888c4a
children c059122f351f
files src/styleengine.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/styleengine.cc	Thu Dec 04 19:06:05 2008 +0100
+++ b/src/styleengine.cc	Thu Dec 04 19:26:45 2008 +0100
@@ -353,10 +353,6 @@
    // reset values that are not inherited according to CSS
    attrs.resetValues ();
   
-   if (stack->getRef (stack->size () - 2)->inheritBackgroundColor)
-      attrs.backgroundColor =
-         stack->getRef (stack->size () - 2)->style->backgroundColor; 
-
    cssContext->apply (&props, this, tagStyleProps, nonCssProperties);
 
    apply (&attrs, &props);
@@ -369,6 +365,10 @@
 Style * StyleEngine::wordStyle0 (CssPropertyList *nonCssProperties) {
    StyleAttrs attrs = *style ();
    attrs.resetValues ();
+
+   if (stack->getRef (stack->size () - 1)->inheritBackgroundColor)
+      attrs.backgroundColor = style ()->backgroundColor;
+
    stack->getRef (stack->size () - 1)->wordStyle = Style::create (layout, &attrs);
    return stack->getRef (stack->size () - 1)->wordStyle;
 }