summaryrefslogtreecommitdiff
path: root/dw/style.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-06-03 16:30:40 +0200
committerSebastian Geerken <devnull@localhost>2013-06-03 16:30:40 +0200
commit7023da550213b6a46fd81a081a770c4eebe201a8 (patch)
treea9acc4c5cde096d7333f28d8fa6ef6adf9157021 /dw/style.cc
parent425e2d4d38d9fa566132363cbb51a83258f710e9 (diff)
Added CSS properties: position, top, bottom, left, right. (Needed for absolute positions.)
Diffstat (limited to 'dw/style.cc')
-rw-r--r--dw/style.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/dw/style.cc b/dw/style.cc
index 2f64e468..51dda098 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -49,6 +49,8 @@ void StyleAttrs::initValues ()
width = height = lineHeight = LENGTH_AUTO;
vloat = FLOAT_NONE;
clear = CLEAR_NONE;
+ position = POSITION_STATIC;
+ top = bottom = left = right = LENGTH_AUTO;
textIndent = 0;
margin.setVal (0);
borderWidth.setVal (0);
@@ -77,6 +79,9 @@ void StyleAttrs::resetValues ()
textAlignChar = '.';
vloat = FLOAT_NONE; /** \todo Correct? Check specification. */
clear = CLEAR_NONE; /** \todo Correct? Check specification. */
+ position = POSITION_STATIC; /** \todo Correct? Check specification. */
+ top = bottom = left = right = LENGTH_AUTO; /** \todo Correct? Check
+ specification. */
backgroundColor = NULL;
width = LENGTH_AUTO;
height = LENGTH_AUTO;
@@ -124,6 +129,11 @@ bool StyleAttrs::equals (object::Object *other) {
textTransform == otherAttrs->textTransform &&
vloat == otherAttrs->vloat &&
clear == otherAttrs->clear &&
+ position == otherAttrs->position &&
+ top == otherAttrs->top &&
+ bottom == otherAttrs->bottom &&
+ left == otherAttrs->left &&
+ right == otherAttrs->right &&
hBorderSpacing == otherAttrs->hBorderSpacing &&
vBorderSpacing == otherAttrs->vBorderSpacing &&
wordSpacing == otherAttrs->wordSpacing &&
@@ -166,6 +176,11 @@ int StyleAttrs::hashValue () {
textTransform +
vloat +
clear +
+ position +
+ top +
+ bottom +
+ left +
+ right +
hBorderSpacing +
vBorderSpacing +
wordSpacing +
@@ -260,6 +275,11 @@ void Style::copyAttrs (StyleAttrs *attrs)
textTransform = attrs->textTransform;
vloat = attrs->vloat;
clear = attrs->clear;
+ position = attrs->position;
+ top = attrs->top;
+ bottom = attrs->bottom;
+ left = attrs->left;
+ right = attrs->right;
hBorderSpacing = attrs->hBorderSpacing;
vBorderSpacing = attrs->vBorderSpacing;
wordSpacing = attrs->wordSpacing;