diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-04 19:26:45 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-04 19:26:45 +0100 |
commit | 30277ddc04f944b0374efbd9361ccf32bfe5d5cf (patch) | |
tree | 774aded05baf86e3e867c8f03fd0c6d5d775ae75 /src/styleengine.cc | |
parent | d9e2b8de79ca2235611436c1982f2f026f6f646e (diff) |
adjust inheritBackgroundColor() handling to new wordStyle() stuff
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index a3cb1444..7d1eb773 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -353,10 +353,6 @@ Style * StyleEngine::style0 (CssPropertyList *nonCssProperties) { // 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::style0 (CssPropertyList *nonCssProperties) { 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; } |