diff options
-rw-r--r-- | dw/style.hh | 4 | ||||
-rw-r--r-- | src/cssparser.cc | 6 | ||||
-rw-r--r-- | src/styleengine.cc | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/dw/style.hh b/dw/style.hh index 81d47930..57ee1d10 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -309,9 +309,9 @@ enum WhiteSpace { }; enum FloatType { + FLOAT_NONE, FLOAT_LEFT, - FLOAT_RIGHT, - FLOAT_NONE + FLOAT_RIGHT }; enum ClearType { diff --git a/src/cssparser.cc b/src/cssparser.cc index 00ba7428..9d141293 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -68,6 +68,10 @@ static const char *const Css_display_enum_vals[] = { "table-cell", NULL }; +static const char *const Css_float_enum_vals[] = { + "none", "left", "right", NULL +}; + static const char *const Css_font_size_enum_vals[] = { "large", "larger", "medium", "small", "smaller", "xx-large", "xx-small", "x-large", "x-small", NULL @@ -162,7 +166,7 @@ const CssPropertyInfo Css_property_info[CSS_PROPERTY_LAST] = { {"direction", {CSS_TYPE_UNUSED}, NULL}, {"display", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED}, Css_display_enum_vals}, {"empty-cells", {CSS_TYPE_UNUSED}, NULL}, - {"float", {CSS_TYPE_UNUSED}, NULL}, + {"float", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED}, Css_float_enum_vals}, {"font-family", {CSS_TYPE_SYMBOL, CSS_TYPE_UNUSED}, NULL}, {"font-size", {CSS_TYPE_ENUM, CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_UNUSED}, Css_font_size_enum_vals}, diff --git a/src/styleengine.cc b/src/styleengine.cc index 906f47ee..b861e717 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -399,6 +399,9 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { case CSS_PROPERTY_DISPLAY: attrs->display = (DisplayType) p->value.intVal; break; + case CSS_PROPERTY_FLOAT: + attrs->vloat = (FloatType) p->value.intVal; + break; case CSS_PROPERTY_LINE_HEIGHT: if (p->type == CSS_TYPE_ENUM) { //only valid enum value is "normal" attrs->lineHeight = dw::core::style::LENGTH_AUTO; |