From d9d884f2437dcfaf9bb576194767247616e5efdb Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 7 Jun 2011 12:06:52 +0200 Subject: support !important in style attributes --- src/cssparser.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/cssparser.cc') diff --git a/src/cssparser.cc b/src/cssparser.cc index aa4cea56..4838f607 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -1590,22 +1590,16 @@ void CssParser::parse(DilloHtml *html, DilloUrl *url, CssContext * context, } } -CssPropertyList *CssParser::parseDeclarationBlock(const char *buf, int buflen) +void CssParser::parseDeclarationBlock(const char *buf, int buflen, + CssPropertyList *props, + CssPropertyList *propsImortant) { - CssPropertyList *props = new CssPropertyList (true); CssParser parser (NULL, CSS_ORIGIN_AUTHOR, buf, buflen); parser.withinBlock = true; do - parser.parseDeclaration(props, NULL); + parser.parseDeclaration(props, propsImortant); while (!(parser.ttype == CSS_TK_END || (parser.ttype == CSS_TK_CHAR && parser.tval[0] == '}'))); - - if (props->size () == 0) { - delete props; - props = NULL; - } - - return props; } -- cgit v1.2.3