r8243 jmb - /trunk/libcss/src/select/select.c

netsurf at semichrome.net netsurf at semichrome.net
Wed Jul 1 16:56:45 BST 2009


Author: jmb
Date: Wed Jul  1 10:56:45 2009
New Revision: 8243

URL: http://source.netsurf-browser.org?rev=8243&view=rev
Log:
Blank inline styles, or inline styles that only contain invalid data will have no bytecode. This is perfectly legitimate, so should not result in an error.

Modified:
    trunk/libcss/src/select/select.c

Modified: trunk/libcss/src/select/select.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/select.c?rev=8243&r1=8242&r2=8243&view=diff
==============================================================================
--- trunk/libcss/src/select/select.c (original)
+++ trunk/libcss/src/select/select.c Wed Jul  1 10:56:45 2009
@@ -307,15 +307,16 @@
 		/* Sanity check style */
 		if (inline_style->rule_count != 1 ||
 			inline_style->rule_list->type != CSS_RULE_SELECTOR || 
-				inline_style->rule_list->items != 0 ||
-				sel->style == NULL) {
+				inline_style->rule_list->items != 0) {
 			error = CSS_INVALID;
 			goto cleanup;
 		}
 
-		error = cascade_style(sel->style, &state);
-		if (error != CSS_OK)
-			goto cleanup;
+		if (sel->style != NULL) {
+			error = cascade_style(sel->style, &state);
+			if (error != CSS_OK)
+				goto cleanup;
+		}
 	}
 
 	/* Take account of presentational hints */




More information about the netsurf-commits mailing list