changeset 1719:2bf8bf3a0277

set border-width to 0 if border-style is 'hidden'
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 14 Oct 2010 09:55:28 +0200
parents 088f506cb465
children d9765916771e
files src/styleengine.cc
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/styleengine.cc	Thu Oct 14 02:47:46 2010 +0000
+++ b/src/styleengine.cc	Thu Oct 14 09:55:28 2010 +0200
@@ -208,14 +208,19 @@
       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;
 }