changeset 544:197fa5e98f9f

add CSS_PROPERTY_BORDER_SPACING_HORIZONTAL, CSS_PROPERTY_BORDER_SPACING_VERTICAL
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 10 Nov 2008 20:07:48 +0100
parents 74c07ade1edc
children 7789abebb0c8
files src/css.hh src/styleengine.cc src/table.cc
diffstat 3 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/css.hh	Mon Nov 10 19:56:36 2008 +0100
+++ b/src/css.hh	Mon Nov 10 20:07:48 2008 +0100
@@ -28,7 +28,8 @@
          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,
--- a/src/styleengine.cc	Mon Nov 10 19:56:36 2008 +0100
+++ b/src/styleengine.cc	Mon Nov 10 20:07:48 2008 +0100
@@ -126,6 +126,12 @@
          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; 
--- a/src/table.cc	Mon Nov 10 19:56:36 2008 +0100
+++ b/src/table.cc	Mon Nov 10 20:07:48 2008 +0100
@@ -61,10 +61,10 @@
 
    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 @@
    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 ();