summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-12-08 18:41:23 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-12-08 18:41:23 +0100
commit8c95d423cee2fc3a1666f938c8b7bbcbd0355cbc (patch)
treeaddf91332aa71fbe4f93cae995e15b2c784189fa /src
parentdd1fe82d94986ca9aea49c803304ca9355cdcbf2 (diff)
add support for CSS property list-style-position
Diffstat (limited to 'src')
-rw-r--r--src/cssparser.cc7
-rw-r--r--src/styleengine.cc3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 39b43c1f..d0daf566 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -81,6 +81,10 @@ static const char *const Css_letter_spacing_enum_vals[] = {
"normal", NULL
};
+static const char *const Css_list_style_position_enum_vals[] = {
+ "inside", "outside", NULL
+};
+
static const char *const Css_list_style_type_enum_vals[] = {
"disc", "circle", "square", "decimal", "decimal-leading-zero",
"lower-roman", "upper-roman", "lower-greek", "lower-alpha",
@@ -157,7 +161,8 @@ const CssPropertyInfo Css_property_info[CSS_PROPERTY_LAST] = {
Css_letter_spacing_enum_vals},
{"line-height", {CSS_TYPE_UNUSED}, NULL},
{"list-style-image", {CSS_TYPE_UNUSED}, NULL},
- {"list-style-position", {CSS_TYPE_UNUSED}, NULL},
+ {"list-style-position", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
+ Css_list_style_position_enum_vals},
{"list-style-type", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
Css_list_style_type_enum_vals},
{"margin-bottom", {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED}, NULL},
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 5472f3b6..c5d44906 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -414,6 +414,9 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
case CSS_PROPERTY_DISPLAY:
attrs->display = (DisplayType) p->value.intVal;
break;
+ case CSS_PROPERTY_LIST_STYLE_POSITION:
+ attrs->listStylePosition = (ListStylePosition) p->value.intVal;
+ break;
case CSS_PROPERTY_LIST_STYLE_TYPE:
attrs->listStyleType = (ListStyleType) p->value.intVal;
break;