aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-01 16:12:16 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-01 16:12:16 +0200
commit47a9e5206c2f6d7775198533a70cb40013b467f2 (patch)
tree4b02a821d99ac8aeb4750e4ad9ad1a2c2c25ef48 /src/styleengine.cc
parent43bba3831700cf45fab30c913e6af38a4e67d9ef (diff)
rework border-width handling
The initial value of border-width-* is "medium" not 0 (see http://www.w3.org/TR/CSS2/box.html#border-width-properties). Redo the border handling for tables to deal with this.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index b9f30054..f8b63652 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -508,6 +508,14 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
if (attrs->borderColor.right == NULL)
attrs->borderColor.right = attrs->color;
+ if (attrs->borderStyle.top == BORDER_NONE)
+ attrs->borderWidth.top = 0;
+ if (attrs->borderStyle.bottom == BORDER_NONE)
+ attrs->borderWidth.bottom = 0;
+ if (attrs->borderStyle.left == BORDER_NONE)
+ attrs->borderWidth.left = 0;
+ if (attrs->borderStyle.right == BORDER_NONE)
+ attrs->borderWidth.right = 0;
}
/**