summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-08-21 13:44:00 +0200
committerSebastian Geerken <devnull@localhost>2013-08-21 13:44:00 +0200
commit1eadbc7adf57405730f8b5efbb4c4c8b19d2f1d6 (patch)
tree2bab24cc907b7046ac1726cf09c6fc2f3f7fbd82 /src
parent1b9c7e87a56398814be78adea71e935f8a75b3cd (diff)
"clear" attribute, mostly.
Diffstat (limited to 'src')
-rw-r--r--src/cssparser.cc6
-rw-r--r--src/styleengine.cc3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 3caa62c1..67d8ff54 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -64,6 +64,10 @@ static const char *const Css_border_width_enum_vals[] = {
"thin", "medium", "thick", NULL
};
+static const char *const Css_clear_enum_vals[] = {
+ "left", "right", "both", "none", NULL
+};
+
static const char *const Css_cursor_enum_vals[] = {
"crosshair", "default", "pointer", "move", "e-resize", "ne-resize",
"nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize",
@@ -181,7 +185,7 @@ const CssPropertyInfo Css_property_info[CSS_PROPERTY_LAST] = {
Css_border_width_enum_vals},
{"bottom", {CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_UNUSED}, NULL},
{"caption-side", {CSS_TYPE_UNUSED}, NULL},
- {"clear", {CSS_TYPE_UNUSED}, NULL},
+ {"clear", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED}, Css_clear_enum_vals},
{"clip", {CSS_TYPE_UNUSED}, NULL},
{"color", {CSS_TYPE_COLOR, CSS_TYPE_UNUSED}, NULL},
{"content", {CSS_TYPE_STRING, CSS_TYPE_UNUSED}, NULL},
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 890f6bcb..7a76d18a 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -498,6 +498,9 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props) {
case CSS_PROPERTY_BOTTOM:
computeLength (&attrs->bottom, p->value.intVal, attrs->font);
break;
+ case CSS_PROPERTY_CLEAR:
+ attrs->clear = (ClearType) p->value.intVal;
+ break;
case CSS_PROPERTY_COLOR:
attrs->color = Color::create (layout, p->value.intVal);
break;