aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-23 12:07:37 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-23 12:07:37 +0100
commit9164300a781474a91ceef47ca2cf12653cf4a562 (patch)
tree9193413b048daacadf068dc4ed3c355b599b5384
parent4140475302ea088e5ad74ebf24c98700cf13b0fa (diff)
disable negative margins for now
dw::Textblock does not handle them properly yet.
-rw-r--r--ChangeLog1
-rw-r--r--src/styleengine.cc8
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index de89eabb..eb6bb09f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);