diff options
-rw-r--r-- | src/styleengine.cc | 15 |
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; } |