aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-14 09:55:28 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-14 09:55:28 +0200
commit573d04aecfd5eb4869f9cb02c2f87ddf1fd44d21 (patch)
tree640e9aa489795c1bd602c6f613a0f8f0718c8c5b /src
parent19db672bfd0ba98bd2015d5c09d843f43668303d (diff)
set border-width to 0 if border-style is 'hidden'
Diffstat (limited to 'src')
-rw-r--r--src/styleengine.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index c7820760..67212fb7 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -208,14 +208,19 @@ void StyleEngine::postprocessAttrs (dw::core::style::StyleAttrs *attrs) {
attrs->borderColor.left = attrs->color;
if (attrs->borderColor.right == NULL)
attrs->borderColor.right = attrs->color;
- /* computed value of border-width is 0 if border-style is 'none' */
- if (attrs->borderStyle.top == BORDER_NONE)
+ /* computed value of border-width is 0 if border-style
+ is 'none' or 'hidden' */
+ if (attrs->borderStyle.top == BORDER_NONE ||
+ attrs->borderStyle.top == BORDER_HIDDEN)
attrs->borderWidth.top = 0;
- if (attrs->borderStyle.bottom == BORDER_NONE)
+ if (attrs->borderStyle.bottom == BORDER_NONE ||
+ attrs->borderStyle.bottom == BORDER_HIDDEN)
attrs->borderWidth.bottom = 0;
- if (attrs->borderStyle.left == BORDER_NONE)
+ if (attrs->borderStyle.left == BORDER_NONE ||
+ attrs->borderStyle.left == BORDER_HIDDEN)
attrs->borderWidth.left = 0;
- if (attrs->borderStyle.right == BORDER_NONE)
+ if (attrs->borderStyle.right == BORDER_NONE ||
+ attrs->borderStyle.right == BORDER_HIDDEN)
attrs->borderWidth.right = 0;
}