r5438 jmb - /trunk/libcss/src/stylesheet.c

netsurf at semichrome.net netsurf at semichrome.net
Thu Sep 25 09:20:18 BST 2008


Author: jmb
Date: Thu Sep 25 03:20:18 2008
New Revision: 5438

URL: http://source.netsurf-browser.org?rev=5438&view=rev
Log:
Implement css_stylesheet_append_data and css_stylesheet_data_done

Modified:
    trunk/libcss/src/stylesheet.c

Modified: trunk/libcss/src/stylesheet.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/stylesheet.c?rev=5438&r1=5437&r2=5438&view=diff
==============================================================================
--- trunk/libcss/src/stylesheet.c (original)
+++ trunk/libcss/src/stylesheet.c Thu Sep 25 03:20:18 2008
@@ -140,13 +140,10 @@
 css_error css_stylesheet_append_data(css_stylesheet *sheet,
 		const uint8_t *data, size_t len)
 {
-	UNUSED(sheet);
-	UNUSED(data);
-	UNUSED(len);
-
-	/** \todo parse data */
-
-	return CSS_OK;
+	if (sheet == NULL || data == NULL)
+		return CSS_BADPARM;
+
+	return css_parser_parse_chunk(sheet->parser, data, len);
 }
 
 /**
@@ -157,11 +154,10 @@
  */
 css_error css_stylesheet_data_done(css_stylesheet *sheet)
 {
-	UNUSED(sheet);
-
-	/** \todo flag completion to the parser */
-
-	return CSS_OK;
+	if (sheet == NULL)
+		return CSS_BADPARM;
+
+	return css_parser_completed(sheet->parser);
 }
 
 /**




More information about the netsurf-commits mailing list