summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-06-07 12:09:20 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-06-07 12:09:20 +0200
commit437800a02d8f3b89e1bb87e2dd8018b4aa8fbd6f (patch)
treed52793c82ea59ba2170461f6b7b59f24a925ede3
parentd9d884f2437dcfaf9bb576194767247616e5efdb (diff)
widgets draw their own border and background
Don't draw background for widgets in Textblock::drawLine(). This fixes the border_background_margin.html test in css_compat.
-rw-r--r--dw/textblock.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 02393ccd..401ada66 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1403,11 +1403,6 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
word->content.type == core::Content::WIDGET) {
if (word->size.width > 0) {
- if (word->style->hasBackground ()) {
- drawBox (view, word->style, area, xWidget,
- yWidgetBase - line->boxAscent, word->size.width,
- line->boxAscent + line->boxDescent, false);
- }
if (word->content.type == core::Content::WIDGET) {
core::Widget *child = word->content.widget;
core::Rectangle childArea;
@@ -1415,6 +1410,11 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
if (child->intersects (area, &childArea))
child->draw (view, &childArea);
} else {
+ if (word->style->hasBackground ()) {
+ drawBox (view, word->style, area, xWidget,
+ yWidgetBase - line->boxAscent, word->size.width,
+ line->boxAscent + line->boxDescent, false);
+ }
drawText(wordIndex, view, area, xWidget, yWidgetBase);
}
}