aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2010-10-21 11:22:29 -0300
committerJorge Arellano Cid <jcid@dillo.org>2010-10-21 11:22:29 -0300
commit4bc80c00e134f96f7226f64eaa37d5c1097d00b2 (patch)
treef9f85a9eb4bcaf69dcf8fdb0f35e887ee4cc293b /dw
parent90531a3492332a841770ffe32257c97f5531dc0d (diff)
imported patch border-collapse-parsing
Diffstat (limited to 'dw')
-rw-r--r--dw/style.cc4
-rw-r--r--dw/style.hh8
2 files changed, 11 insertions, 1 deletions
diff --git a/dw/style.cc b/dw/style.cc
index 30597af2..d315382c 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -49,6 +49,7 @@ void StyleAttrs::initValues ()
margin.setVal (0);
borderWidth.setVal (0);
padding.setVal (0);
+ borderCollapse = BORDER_MODEL_SEPARATE;
setBorderColor (NULL);
setBorderStyle (BORDER_NONE);
hBorderSpacing = 0;
@@ -123,6 +124,7 @@ bool StyleAttrs::equals (object::Object *other) {
margin.equals (&otherAttrs->margin) &&
borderWidth.equals (&otherAttrs->borderWidth) &&
padding.equals (&otherAttrs->padding) &&
+ borderCollapse == otherAttrs->borderCollapse &&
borderColor.top == otherAttrs->borderColor.top &&
borderColor.right == otherAttrs->borderColor.right &&
borderColor.bottom == otherAttrs->borderColor.bottom &&
@@ -158,6 +160,7 @@ int StyleAttrs::hashValue () {
margin.hashValue () +
borderWidth.hashValue () +
padding.hashValue () +
+ borderCollapse +
(intptr_t) borderColor.top +
(intptr_t) borderColor.right +
(intptr_t) borderColor.bottom +
@@ -246,6 +249,7 @@ void Style::copyAttrs (StyleAttrs *attrs)
margin = attrs->margin;
borderWidth = attrs->borderWidth;
padding = attrs->padding;
+ borderCollapse = attrs->borderCollapse;
borderColor = attrs->borderColor;
borderStyle = attrs->borderStyle;
display = attrs->display;
diff --git a/dw/style.hh b/dw/style.hh
index 33d42c29..0fbd2a84 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -193,7 +193,7 @@ namespace core {
namespace style {
enum Cursor {
- CURSOR_COSSHAIR,
+ CURSOR_CROSSHAIR,
CURSOR_DEFAULT,
CURSOR_POINTER,
CURSOR_MOVE,
@@ -210,6 +210,11 @@ enum Cursor {
CURSOR_HELP
};
+enum BorderCollapse {
+ BORDER_MODEL_SEPARATE,
+ BORDER_MODEL_COLLAPSE
+};
+
enum BorderStyle {
BORDER_NONE,
BORDER_HIDDEN,
@@ -435,6 +440,7 @@ public:
Length width, height, lineHeight;
Box margin, borderWidth, padding;
+ BorderCollapse borderCollapse;
struct { Color *top, *right, *bottom, *left; } borderColor;
struct { BorderStyle top, right, bottom, left; } borderStyle;