changeset 1720:d9765916771e

don't try to set lineHeight if illegal value 'auto' is specified Testcase: <div style="line-height: auto"> foo<br>foo<br>foo<br> </div> This only fixes the use of uninitialzed values in this case. The real fix will be to drop the invalid declaration in the CSS parser. This needs to be implemented with a later commit. Reported-by: Jeremy Henty <onepoint@starurchin.org>
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Fri, 15 Oct 2010 11:37:44 +0200
parents 2bf8bf3a0277
children 8a4b1d7c0b0d
files src/styleengine.cc
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/styleengine.cc	Thu Oct 14 09:55:28 2010 +0200
+++ b/src/styleengine.cc	Fri Oct 15 11:37:44 2010 +0200
@@ -451,9 +451,8 @@
                if (CSS_LENGTH_TYPE (p->value.intVal) == CSS_LENGTH_TYPE_NONE) {
                   attrs->lineHeight =
                      createPerLength(CSS_LENGTH_VALUE(p->value.intVal));
-               } else {
-                  computeValue (&lineHeight, p->value.intVal, attrs->font,
-                                attrs->font->size);
+               } else if (computeValue (&lineHeight, p->value.intVal,
+                                        attrs->font, attrs->font->size)) {
                   attrs->lineHeight = createAbsLength(lineHeight);
                }
             }