Author: jmb
Date: Sat Nov 29 20:14:22 2008
New Revision: 5848
URL:
http://source.netsurf-browser.org?rev=5848&view=rev
Log:
Commentary on which tokens actually need string data interning.
Modified:
trunk/libcss/src/parse/parse.c
Modified: trunk/libcss/src/parse/parse.c
URL:
http://source.netsurf-browser.org/trunk/libcss/src/parse/parse.c?rev=5848...
==============================================================================
--- trunk/libcss/src/parse/parse.c (original)
+++ trunk/libcss/src/parse/parse.c Sat Nov 29 20:14:22 2008
@@ -569,6 +569,18 @@
if (error != CSS_OK)
return error;
+ /** \todo We need only intern for the following token types:
+ *
+ * CSS_TOKEN_IDENT, CSS_TOKEN_ATKEYWORD, CSS_TOKEN_STRING,
+ * CSS_TOKEN_INVALID_STRING, CSS_TOKEN_HASH, CSS_TOKEN_URI,
+ * CSS_TOKEN_UNICODE_RANGE?, CSS_TOKEN_FUNCTION
+ *
+ * It would be better if we didn't intern the text for these
+ * token types:
+ *
+ * CSS_TOKEN_NUMBER, CSS_TOKEN_PERCENTAGE, CSS_TOKEN_DIMENSION
+ */
+
if (t->type != CSS_TOKEN_S &&
t->data.data != NULL && t->data.len > 0) {
/* Insert token text into the dictionary */