summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-10 20:07:48 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-10 20:07:48 +0100
commit827fe83a429f7bceebfde326c8cff7723f971edd (patch)
tree3a11d32824c9dc931196f593543e71eed6448d3b /src
parentfb551355dfb2f49d56cdaab8a55ed3cb00ec7dc8 (diff)
add CSS_PROPERTY_BORDER_SPACING_HORIZONTAL, CSS_PROPERTY_BORDER_SPACING_VERTICAL
Diffstat (limited to 'src')
-rw-r--r--src/css.hh3
-rw-r--r--src/styleengine.cc6
-rw-r--r--src/table.cc9
3 files changed, 12 insertions, 6 deletions
diff --git a/src/css.hh b/src/css.hh
index c1ea2f8f..2eb7f114 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -28,7 +28,8 @@ class CssProperty {
CSS_PROPERTY_BORDER_RIGHT_COLOR,
CSS_PROPERTY_BORDER_RIGHT_STYLE,
CSS_PROPERTY_BORDER_RIGHT_WIDTH,
- CSS_PROPERTY_BORDER_SPACING,
+ CSS_PROPERTY_BORDER_SPACING_HORIZONTAL,
+ CSS_PROPERTY_BORDER_SPACING_VERTICAL,
CSS_PROPERTY_BORDER_STYLE,
CSS_PROPERTY_BORDER_TOP_COLOR,
CSS_PROPERTY_BORDER_TOP_STYLE,
diff --git a/src/styleengine.cc b/src/styleengine.cc
index bdd6affb..63cf094c 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -126,6 +126,12 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
case CssProperty::CSS_PROPERTY_BORDER_WIDTH:
attrs->borderWidth.setVal (p->value.intVal);
break;
+ case CssProperty::CSS_PROPERTY_BORDER_SPACING_HORIZONTAL:
+ attrs->borderWidth.setVal (p->value.intVal);
+ break;
+ case CssProperty::CSS_PROPERTY_BORDER_SPACING_VERTICAL:
+ attrs->borderWidth.setVal (p->value.intVal);
+ break;
case CssProperty::CSS_PROPERTY_COLOR:
attrs->color = Color::createSimple (layout, p->value.intVal);
break;
diff --git a/src/table.cc b/src/table.cc
index 63e1ba0e..7c17cdd7 100644
--- a/src/table.cc
+++ b/src/table.cc
@@ -61,10 +61,10 @@ void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize)
if (border != -1)
props.set (CssProperty::CSS_PROPERTY_BORDER_WIDTH, border);
- if (cellspacing != -1)
- props.set (CssProperty::CSS_PROPERTY_BORDER_SPACING, cellspacing);
-
- props.set (CssProperty::CSS_PROPERTY_BORDER_STYLE, BORDER_OUTSET);
+ if (cellspacing != -1) {
+ props.set (CssProperty::CSS_PROPERTY_BORDER_SPACING_HORIZONTAL, cellspacing);
+ props.set (CssProperty::CSS_PROPERTY_BORDER_SPACING_VERTICAL, cellspacing);
+ }
/* When dillo was started with the --debug-rendering option, there
* is always a border around the table. */
@@ -109,7 +109,6 @@ void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize)
table_cell_props->set (CssProperty::CSS_PROPERTY_PADDING, cellpadding);
/** \todo figure out how to implement shaded colors with CSS */
table_cell_props->set (CssProperty::CSS_PROPERTY_BORDER_COLOR, 0x000000);
- table_cell_props->set (CssProperty::CSS_PROPERTY_BORDER_STYLE, BORDER_INSET);
if (S_TOP(html)->table_cell_props)
S_TOP(html)->table_cell_props->unref ();