From c4a148796a7597db7bb3ca1b0d1a2623e1373ce8 Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Mon, 7 Oct 2013 21:30:34 +0200 Subject: View(port) background now set by HTML parser. --- src/styleengine.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/styleengine.cc') 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. */ -- cgit v1.2.3