aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-10-11 14:32:32 +0200
committerSebastian Geerken <devnull@localhost>2013-10-11 14:32:32 +0200
commitde124c423740eb25bdceb0ea6939336d9dc096c7 (patch)
tree5b1c6bc9745e8aa1d0b1bf9fbd9402945611a13d /src/styleengine.cc
parentea02d9d78a3b945e1650a4ff38e2c70f252b1e02 (diff)
Background images for inline elements.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index f29b1a05..5b3b34f0 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -298,6 +298,16 @@ void StyleEngine::preprocessAttrs (dw::core::style::StyleAttrs *attrs) {
if (stack->getRef (stack->size () - 2)->inheritBackgroundColor) {
attrs->backgroundColor =
stack->getRef (stack->size () - 2)->style->backgroundColor;
+ attrs->backgroundImage =
+ stack->getRef (stack->size () - 2)->style->backgroundImage;
+ attrs->backgroundRepeat =
+ stack->getRef (stack->size () - 2)->style->backgroundRepeat;
+ attrs->backgroundAttachment =
+ stack->getRef (stack->size () - 2)->style->backgroundAttachment;
+ attrs->backgroundPositionX =
+ stack->getRef (stack->size () - 2)->style->backgroundPositionX;
+ attrs->backgroundPositionY =
+ stack->getRef (stack->size () - 2)->style->backgroundPositionY;
attrs->valign = stack->getRef (stack->size () - 2)->style->valign;
}
@@ -866,8 +876,14 @@ Style * StyleEngine::wordStyle0 (BrowserWindow *bw, DilloUrl *url) {
StyleAttrs attrs = *style (bw, url);
attrs.resetValues ();
- if (stack->getRef (stack->size() - 1)->inheritBackgroundColor)
+ if (stack->getRef (stack->size() - 1)->inheritBackgroundColor) {
attrs.backgroundColor = style (bw, url)->backgroundColor;
+ attrs.backgroundImage = style (bw, url)->backgroundImage;
+ attrs.backgroundRepeat = style (bw, url)->backgroundRepeat;
+ attrs.backgroundAttachment = style (bw, url)->backgroundAttachment;
+ attrs.backgroundPositionX = style (bw, url)->backgroundPositionX;
+ attrs.backgroundPositionY = style (bw, url)->backgroundPositionY;
+ }
attrs.valign = style (bw, url)->valign;