Author: jmb
Date: Wed Jan 21 18:35:22 2009
New Revision: 6165
URL: http://source.netsurf-browser.org?rev=6165&view=rev
Log:
Fix handling of EOF in property values
Modified:
trunk/libcss/src/parse/parse.c
trunk/libcss/test/data/parse2/eof.dat
Modified: trunk/libcss/src/parse/parse.c
URL:
http://source.netsurf-browser.org/trunk/libcss/src/parse/parse.c?rev=6165&r1=6164&r2=6165&view=diff
==============================================================================
--- trunk/libcss/src/parse/parse.c (original)
+++ trunk/libcss/src/parse/parse.c Wed Jan 21 18:35:22 2009
@@ -1639,6 +1639,9 @@
if (error != CSS_OK)
return error;
+ if (token->type == CSS_TOKEN_EOF)
+ return done(parser);
+
/* Grammar ambiguity -- assume ';' or '}' mark end */
if (token->type == CSS_TOKEN_CHAR &&
token->ilower->len == 1 &&
@@ -1740,6 +1743,9 @@
error = pushBack(parser, token);
if (error != CSS_OK)
return error;
+
+ if (token->type == CSS_TOKEN_EOF)
+ return done(parser);
/* Grammar ambiguity:
* assume '{', ';', ')', ']' mark end */
Modified: trunk/libcss/test/data/parse2/eof.dat
URL:
http://source.netsurf-browser.org/trunk/libcss/test/data/parse2/eof.dat?rev=6165&r1=6164&r2=6165&view=diff
==============================================================================
--- trunk/libcss/test/data/parse2/eof.dat (original)
+++ trunk/libcss/test/data/parse2/eof.dat Wed Jan 21 18:35:22 2009
@@ -99,10 +99,11 @@
#reset
#data
-f{g:h
-#errors
-#expected
-| f
+f{clear:both
+#errors
+#expected
+| f
+| clear: both
#reset
#data
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org