Mercurial > dillo_port1.3
changeset 801:ec76f63c44db
start supporting "auto" value in CSS
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> |
---|---|
date | Wed, 21 Jan 2009 21:40:00 +0100 |
parents | 756f3deec1b8 |
children | bb850fc92050 |
files | src/cssparser.cc src/styleengine.cc |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cssparser.cc Wed Jan 21 21:01:32 2009 +0100 +++ b/src/cssparser.cc Wed Jan 21 21:40:00 2009 +0100 @@ -696,6 +696,7 @@ val->intVal = CSS_CREATE_LENGTH(fval, lentype); } else if (parser->ttype == CSS_TK_SYMBOL && strcmp(parser->tval, "auto") == 0) { + ret = true; val->intVal = CSS_LENGTH_TYPE_AUTO; Css_next_token(parser); }
--- a/src/styleengine.cc Wed Jan 21 21:01:32 2009 +0100 +++ b/src/styleengine.cc Wed Jan 21 21:40:00 2009 +0100 @@ -377,10 +377,13 @@ if (CSS_LENGTH_TYPE (value) == CSS_LENGTH_TYPE_PERCENTAGE) { *dest = createPerLength (CSS_LENGTH_VALUE (value)); return true; - } else if (computeValue (&v, value, font)) { - *dest = createAbsLength (v); - return true; - } + } else if (CSS_LENGTH_TYPE (value) == CSS_LENGTH_TYPE_AUTO) { + *dest = dw::core::style::LENGTH_AUTO; + return true; + } else if (computeValue (&v, value, font)) { + *dest = createAbsLength (v); + return true; + } return false; }