changeset 1018:1949cc16378f

disable negative margins for now dw::Textblock does not handle them properly yet.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Mon, 23 Mar 2009 12:07:37 +0100
parents 181a53d66446
children 1a9bfdd32aa3
files ChangeLog src/styleengine.cc
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 23 10:13:53 2009 +0100
+++ b/ChangeLog	Mon Mar 23 12:07:37 2009 +0100
@@ -76,6 +76,7 @@
  - 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
--- a/src/styleengine.cc	Mon Mar 23 10:13:53 2009 +0100
+++ b/src/styleengine.cc	Mon Mar 23 12:07:37 2009 +0100
@@ -355,15 +355,23 @@
             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);