diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/styleengine.cc | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -76,6 +76,7 @@ dillo-2.1 - Fix allow_white_bg dillorc option. - Load <style></style> content only if applicable. - Allow negative values for specific CSS properties only. + - Disable negative margins for now as dw/* does not support them yet. Patches: Johannes Hofmann +- Updated the GPL copyright note in the source files. Patch: Detlef Riekenberg diff --git a/src/styleengine.cc b/src/styleengine.cc index 51e304e9..4c00f362 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -355,15 +355,23 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { break; case CSS_PROPERTY_MARGIN_BOTTOM: computeValue (&attrs->margin.bottom, p->value.intVal, attrs->font); + if (attrs->margin.bottom < 0) // \todo fix negative margins in dw/* + attrs->margin.bottom = 0; break; case CSS_PROPERTY_MARGIN_LEFT: computeValue (&attrs->margin.left, p->value.intVal, attrs->font); + if (attrs->margin.left < 0) // \todo fix negative margins in dw/* + attrs->margin.left = 0; break; case CSS_PROPERTY_MARGIN_RIGHT: computeValue (&attrs->margin.right, p->value.intVal, attrs->font); + if (attrs->margin.right < 0) // \todo fix negative margins in dw/* + attrs->margin.right = 0; break; case CSS_PROPERTY_MARGIN_TOP: computeValue (&attrs->margin.top, p->value.intVal, attrs->font); + if (attrs->margin.top < 0) // \todo fix negative margins in dw/* + attrs->margin.top = 0; break; case CSS_PROPERTY_PADDING_TOP: computeValue (&attrs->padding.top, p->value.intVal, attrs->font); |