diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-12 18:45:25 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-12 18:45:25 +0100 |
commit | 0351402f305160ce50462bdc380407b96a640d70 (patch) | |
tree | 4b0e0ed10ded4bf1dca580907f70804669fe201f /src/styleengine.cc | |
parent | e089ce0b838bab062389b4c9ccb078c01d47975b (diff) |
support more CSS_PROPERTY_MARGIN* props; fix primary order
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 50cd6570..76f23777 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -168,6 +168,18 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { case CssProperty::CSS_PROPERTY_MARGIN: attrs->margin.setVal (p->value.intVal); break; + case CssProperty::CSS_PROPERTY_MARGIN_BOTTOM: + attrs->margin.bottom = p->value.intVal; + break; + case CssProperty::CSS_PROPERTY_MARGIN_LEFT: + attrs->margin.left = p->value.intVal; + break; + case CssProperty::CSS_PROPERTY_MARGIN_RIGHT: + attrs->margin.right = p->value.intVal; + break; + case CssProperty::CSS_PROPERTY_MARGIN_TOP: + attrs->margin.top = p->value.intVal; + break; case CssProperty::CSS_PROPERTY_PADDING: attrs->padding.setVal (p->value.intVal); break; @@ -205,8 +217,7 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { */ Style * StyleEngine::style0 (CssPropertyList *nonCssProperties) { CssPropertyList props; - CssPropertyList *tagStyleProps = CssPropertyList::parse ( - stack->getRef (stack->size () - 1)->styleAttribute); + CssPropertyList *tagStyleProps = NULL; /** \todo implementation */ // get previous style from the stack StyleAttrs attrs = *stack->getRef (stack->size () - 2)->style; |