diff options
author | Sebastian Geerken <devnull@localhost> | 2013-10-07 21:30:34 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-10-07 21:30:34 +0200 |
commit | c4a148796a7597db7bb3ca1b0d1a2623e1373ce8 (patch) | |
tree | 9715ccdbafc722540da2fcc5c2e6e2f38187510c /src/styleengine.cc | |
parent | cfdf262f3ffe5f818ebf318d68d03b698ff3e363 (diff) |
View(port) background now set by HTML parser.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index efd4d629..90ef718e 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -248,6 +248,26 @@ dw::core::style::Color *StyleEngine::backgroundColor () { return NULL; } +dw::core::style::StyleImage *StyleEngine::backgroundImage + (dw::core::style::BackgroundRepeat *bgRepeat, + dw::core::style::BackgroundAttachment *bgAttachment, + dw::core::style::Length *bgPositionX, + dw::core::style::Length *bgPositionY) { + for (int i = 1; i < stack->size (); i++) { + Node *n = stack->getRef (i); + + if (n->style && n->style->backgroundImage) { + *bgRepeat = n->style->backgroundRepeat; + *bgAttachment = n->style->backgroundAttachment; + *bgPositionX = n->style->backgroundPositionX; + *bgPositionY = n->style->backgroundPositionY; + return n->style->backgroundImage; + } + } + + return NULL; +} + /** * \brief set the CSS pseudo class :link. */ |