r4848 jmb - in /trunk/libcss: src/parse/parse.c test/data/css/blocks.css test/data/css/malformed.css
by netsurf@semichrome.net
Author: jmb
Date: Thu Jul 31 18:30:59 2008
New Revision: 4848
URL: http://source.netsurf-browser.org?rev=4848&view=rev
Log:
Fix at-rule processing.
Fix malformed selector input to actually result in a terminated block.
Modified:
trunk/libcss/src/parse/parse.c
trunk/libcss/test/data/css/blocks.css
trunk/libcss/test/data/css/malformed.css
Modified: trunk/libcss/src/parse/parse.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/parse.c?rev=4848...
==============================================================================
--- trunk/libcss/src/parse/parse.c (original)
+++ trunk/libcss/src/parse/parse.c Thu Jul 31 18:30:59 2008
@@ -917,9 +917,6 @@
switch (state->substate) {
case Initial:
-#if !defined(NDEBUG) && defined(DEBUG_EVENTS)
- printf("Begin at-rule\n");
-#endif
parserutils_vector_clear(parser->tokens);
error = getToken(parser, &token);
@@ -952,10 +949,6 @@
}
error = getToken(parser, &token);
- if (error != CSS_OK)
- return error;
-
- error = pushBack(parser, token);
if (error != CSS_OK)
return error;
@@ -971,6 +964,10 @@
}
}
+ error = pushBack(parser, token);
+ if (error != CSS_OK)
+ return error;
+
break;
}
@@ -993,6 +990,7 @@
switch (state->substate) {
case Initial:
#if !defined(NDEBUG) && defined(DEBUG_EVENTS)
+ printf("Begin at-rule\n");
parserutils_vector_dump(parser->tokens, __func__, tprinter);
#endif
if (parser->event != NULL) {
Modified: trunk/libcss/test/data/css/blocks.css
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/css/blocks.css?r...
==============================================================================
--- trunk/libcss/test/data/css/blocks.css (original)
+++ trunk/libcss/test/data/css/blocks.css Thu Jul 31 18:30:59 2008
@@ -1,6 +1,10 @@
@charset "UTF-8";
@import "simple.css";
+
+@foo rgb(255,255,255);
+
+@bar (a,b,c);
@media screen
{
Modified: trunk/libcss/test/data/css/malformed.css
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/css/malformed.cs...
==============================================================================
--- trunk/libcss/test/data/css/malformed.css (original)
+++ trunk/libcss/test/data/css/malformed.css Thu Jul 31 18:30:59 2008
@@ -6,7 +6,11 @@
p { color:green; color{;color:maroon} } /* unexpected tokens { } */
p { color:red; color{;color:maroon}; color:green } /* same with recovery */
+@blah <!-- ;
+@foo --> { moose }
+
"Foo bar baz
-p ( { ) color: green }
+p ( { ) color: green } )
p {color:green}
+p { color: green; }
15 years, 4 months
r4847 jmb - in /trunk/libcss: src/parse/parse.c test/data/css/malformed.css
by netsurf@semichrome.net
Author: jmb
Date: Thu Jul 31 13:47:07 2008
New Revision: 4847
URL: http://source.netsurf-browser.org?rev=4847&view=rev
Log:
Something approximating recovery from malformed at-rules.
Modified:
trunk/libcss/src/parse/parse.c
trunk/libcss/test/data/css/malformed.css
Modified: trunk/libcss/src/parse/parse.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/parse.c?rev=4847...
==============================================================================
--- trunk/libcss/src/parse/parse.c (original)
+++ trunk/libcss/src/parse/parse.c Thu Jul 31 13:47:07 2008
@@ -60,7 +60,8 @@
sAny1 = 18,
sAny = 19,
sMalformedDecl = 20,
- sMalformedSelector = 21
+ sMalformedSelector = 21,
+ sMalformedAtRule = 22
};
/**
@@ -136,6 +137,7 @@
static inline css_error parseAny(css_parser *parser);
static inline css_error parseMalformedDeclaration(css_parser *parser);
static inline css_error parseMalformedSelector(css_parser *parser);
+static inline css_error parseMalformedAtRule(css_parser *parser);
/**
* Dispatch table for parsing, indexed by major state number
@@ -162,7 +164,8 @@
parseAny1,
parseAny,
parseMalformedDeclaration,
- parseMalformedSelector
+ parseMalformedSelector,
+ parseMalformedAtRule
};
/**
@@ -942,6 +945,32 @@
return transition(parser, to, subsequent);
}
case AfterAny:
+ if (parser->parseError) {
+ parser_state to = { sMalformedAtRule, Initial };
+
+ return transitionNoRet(parser, to);
+ }
+
+ error = getToken(parser, &token);
+ if (error != CSS_OK)
+ return error;
+
+ error = pushBack(parser, token);
+ if (error != CSS_OK)
+ return error;
+
+ /* Grammar ambiguity: any0 can be followed by '{',';',')',']'.
+ * at-rule can only be followed by '{' and ';'. */
+ if (token->type == CSS_TOKEN_CHAR && token->data.len == 1) {
+ if (token->data.ptr[0] == ')' ||
+ token->data.ptr[0] == ']') {
+ parser_state to = { sAny0, Initial };
+ parser_state subsequent = { sAtRule, AfterAny };
+
+ return transition(parser, to, subsequent);
+ }
+ }
+
break;
}
@@ -970,7 +999,9 @@
if (parser->event(CSS_PARSER_START_ATRULE,
parser->tokens, parser->event_pw) ==
false) {
- /** \todo parse error */
+ parser_state to = { sMalformedAtRule, Initial };
+
+ return transitionNoRet(parser, to);
}
}
@@ -979,7 +1010,7 @@
return error;
if (token->type != CSS_TOKEN_CHAR || token->data.len != 1) {
- /** \todo parse error */
+ /* Should never happen FOLLOW(at-rule) == '{', ';'*/
assert(0 && "Expected { or ;");
}
@@ -993,8 +1024,8 @@
return transition(parser, to, subsequent);
} else if (token->data.ptr[0] != ';') {
- /** \todo parse error */
- assert(0 && "Expected { or ;");
+ /* Again, should never happen */
+ assert(0 && "Expected ;");
}
state->substate = WS;
@@ -2018,6 +2049,110 @@
return done(parser);
}
+css_error parseMalformedAtRule(css_parser *parser)
+{
+ enum { Initial = 0, Go = 1 };
+ parser_state *state = parserutils_stack_get_current(parser->states);
+ const css_token *token = NULL;
+ css_error error;
+
+ /* Malformed at-rule: read everything up to the next ; or the next
+ * block, whichever is first.
+ * We must ensure that pairs of {}, (), [], are balanced */
+
+ switch (state->substate) {
+ case Initial:
+ {
+ /* Clear stack of open items */
+ while (parserutils_stack_pop(parser->open_items, NULL) ==
+ PARSERUTILS_OK)
+ ;
+
+ state->substate = Go;
+ /* Fall through */
+ }
+ case Go:
+ while (1) {
+ error = getToken(parser, &token);
+ if (error != CSS_OK)
+ return error;
+
+ if (token->type == CSS_TOKEN_EOF)
+ break;
+
+ if (token->type != CSS_TOKEN_CHAR ||
+ token->data.len != 1 ||
+ (token->data.ptr[0] != '{' &&
+ token->data.ptr[0] != '}' &&
+ token->data.ptr[0] != '[' &&
+ token->data.ptr[0] != ']' &&
+ token->data.ptr[0] != '(' &&
+ token->data.ptr[0] != ')' &&
+ token->data.ptr[0] != ';'))
+ continue;
+
+ char want;
+ char *match = parserutils_stack_get_current(
+ parser->open_items);
+
+ /* If we have a semicolon, then we're either done or
+ * need to ignore it */
+ if (token->data.ptr[0] == ';') {
+ if (match == NULL)
+ break;
+ else
+ continue;
+ }
+
+ /* Get corresponding start tokens for end tokens */
+ switch (token->data.ptr[0]) {
+ case '}':
+ want = '{';
+ break;
+ case ']':
+ want = '[';
+ break;
+ case ')':
+ want = '(';
+ break;
+ default:
+ want = 0;
+ break;
+ }
+
+ /* Either pop off the stack, if we've matched the
+ * current item, or push the start token on */
+ if (match != NULL && *match == want) {
+ parserutils_stack_pop(
+ parser->open_items, NULL);
+ } else if (want == 0) {
+ parserutils_stack_push(parser->open_items,
+ &token->data.ptr[0]);
+ }
+
+ /* If we encountered a '}', there was data on the stack
+ * before, and the stack's now empty, then we've popped
+ * a '{' off the stack. That means we've found the end
+ * of the block, so we're done here. */
+ if (want == '{' && match != NULL &&
+ parserutils_stack_get_current(
+ parser->open_items) == NULL)
+ break;
+ }
+ }
+
+ /* Consume any trailing whitespace after the at-rule */
+ error = eatWS(parser);
+ if (error != CSS_OK)
+ return error;
+
+ /* Discard the tokens we've read */
+ parserutils_vector_clear(parser->tokens);
+
+ return done(parser);
+}
+
+
#ifndef NDEBUG
#ifdef DEBUG_STACK
static void printer(void *item)
Modified: trunk/libcss/test/data/css/malformed.css
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/css/malformed.cs...
==============================================================================
--- trunk/libcss/test/data/css/malformed.css (original)
+++ trunk/libcss/test/data/css/malformed.css Thu Jul 31 13:47:07 2008
@@ -9,3 +9,4 @@
"Foo bar baz
p ( { ) color: green }
p {color:green}
+
15 years, 4 months
r4846 jmb - in /trunk/libcss: src/parse/parse.c test/data/css/malformed.css
by netsurf@semichrome.net
Author: jmb
Date: Thu Jul 31 13:07:52 2008
New Revision: 4846
URL: http://source.netsurf-browser.org?rev=4846&view=rev
Log:
Improve recovery from malformed declarations
Implement recovery from malformed selectors
Modified:
trunk/libcss/src/parse/parse.c
trunk/libcss/test/data/css/malformed.css
Modified: trunk/libcss/src/parse/parse.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/parse.c?rev=4846...
==============================================================================
--- trunk/libcss/src/parse/parse.c (original)
+++ trunk/libcss/src/parse/parse.c Thu Jul 31 13:07:52 2008
@@ -59,7 +59,8 @@
sAny0 = 17,
sAny1 = 18,
sAny = 19,
- sMalformedDecl = 20
+ sMalformedDecl = 20,
+ sMalformedSelector = 21
};
/**
@@ -93,6 +94,7 @@
const css_token *pushback; /**< Push back buffer */
bool parseError; /**< A parse error has occurred */
+ parserutils_stack *open_items; /**< Stack of open brackets */
uint8_t match_char; /**< Close bracket type for parseAny */
@@ -133,6 +135,7 @@
static inline css_error parseAny1(css_parser *parser);
static inline css_error parseAny(css_parser *parser);
static inline css_error parseMalformedDeclaration(css_parser *parser);
+static inline css_error parseMalformedSelector(css_parser *parser);
/**
* Dispatch table for parsing, indexed by major state number
@@ -158,7 +161,8 @@
parseAny0,
parseAny1,
parseAny,
- parseMalformedDeclaration
+ parseMalformedDeclaration,
+ parseMalformedSelector
};
/**
@@ -229,8 +233,20 @@
return NULL;
}
+ parser->open_items = parserutils_stack_create(sizeof(char),
+ STACK_CHUNK, (parserutils_alloc) alloc, pw);
+ if (parser->open_items == NULL) {
+ parserutils_vector_destroy(parser->tokens);
+ parserutils_stack_destroy(parser->states);
+ css_lexer_destroy(parser->lexer);
+ parserutils_inputstream_destroy(parser->stream);
+ alloc(parser, 0, pw);
+ return NULL;
+ }
+
perror = parserutils_stack_push(parser->states, (void *) &initial);
if (perror != PARSERUTILS_OK) {
+ parserutils_stack_destroy(parser->open_items);
parserutils_vector_destroy(parser->tokens);
parserutils_dict_destroy(parser->dictionary);
parserutils_stack_destroy(parser->states);
@@ -262,6 +278,8 @@
{
if (parser == NULL)
return;
+
+ parserutils_stack_destroy(parser->open_items);
parserutils_vector_destroy(parser->tokens);
@@ -441,6 +459,9 @@
parserutils_stack_dump(parser->states, __func__, printer);
#endif
+ /* Clear the error flag */
+ parser->parseError = false;
+
return CSS_OK;
}
@@ -771,13 +792,29 @@
}
break;
case Brace:
+ if (parser->parseError) {
+ parser_state to = { sMalformedSelector, Initial };
+
+ /* Still need to announce end of ruleset */
+#if !defined(NDEBUG) && defined(DEBUG_EVENTS)
+ printf("End ruleset\n");
+#endif
+ if (parser->event != NULL) {
+ parser->event(CSS_PARSER_END_RULESET,
+ NULL, parser->event_pw);
+ }
+
+ return transitionNoRet(parser, to);
+ }
+
error = getToken(parser, &token);
if (error != CSS_OK)
return error;
if (token->type != CSS_TOKEN_CHAR || token->data.len != 1 ||
token->data.ptr[0] != '{') {
- /** \todo Parse error */
+ /* This should never happen, as FOLLOW(selector)
+ * contains only '{' */
assert(0 && "Expected {");
}
@@ -841,7 +878,8 @@
if (token->type != CSS_TOKEN_CHAR || token->data.len != 1 ||
token->data.ptr[0] != '}') {
- /** \todo parse error */
+ /* This should never happen, as FOLLOW(decl-list)
+ * contains only '}' */
assert(0 && "Expected }");
}
@@ -1204,12 +1242,19 @@
return transition(parser, to, subsequent);
}
case AfterAny1:
+ if (!parser->parseError) {
#if !defined(NDEBUG) && defined(DEBUG_EVENTS)
- parserutils_vector_dump(parser->tokens, __func__, tprinter);
-#endif
- if (parser->event != NULL) {
- parser->event(CSS_PARSER_SELECTOR, parser->tokens,
- parser->event_pw);
+ parserutils_vector_dump(parser->tokens,
+ __func__, tprinter);
+#endif
+ if (parser->event != NULL) {
+ if (parser->event(CSS_PARSER_SELECTOR,
+ parser->tokens,
+ parser->event_pw) == false) {
+ /* parse error */
+ parser->parseError = true;
+ }
+ }
}
break;
@@ -1789,102 +1834,183 @@
css_error parseMalformedDeclaration(css_parser *parser)
{
- enum { Initial = 0 };
+ enum { Initial = 0, Go = 1 };
+ parser_state *state = parserutils_stack_get_current(parser->states);
const css_token *token = NULL;
css_error error;
/* Malformed declaration: read everything up to the next ; or }
* We must ensure that pairs of {}, (), [], are balanced */
- int brackets = 0;
- int braces = 0;
- int parens = 0;
-
- int32_t ctx = 0;
-
- do {
- token = parserutils_vector_iterate(parser->tokens, &ctx);
-
- if (token != NULL && token->type == CSS_TOKEN_CHAR &&
- token->data.len == 1) {
+ switch (state->substate) {
+ case Initial:
+ {
+ /* Clear stack of open items */
+ while (parserutils_stack_pop(parser->open_items, NULL) ==
+ PARSERUTILS_OK)
+ ;
+
+ state->substate = Go;
+ /* Fall through */
+ }
+ case Go:
+ while (1) {
+ error = getToken(parser, &token);
+ if (error != CSS_OK)
+ return error;
+
+ if (token->type == CSS_TOKEN_EOF)
+ break;
+
+ if (token->type != CSS_TOKEN_CHAR ||
+ token->data.len != 1 ||
+ (token->data.ptr[0] != '{' &&
+ token->data.ptr[0] != '}' &&
+ token->data.ptr[0] != '[' &&
+ token->data.ptr[0] != ']' &&
+ token->data.ptr[0] != '(' &&
+ token->data.ptr[0] != ')' &&
+ token->data.ptr[0] != ';'))
+ continue;
+
+ char want;
+ char *match = parserutils_stack_get_current(
+ parser->open_items);
+
+ /* If the stack is empty, then we're done if we've got
+ * either a ';' or '}' */
+ if (match == NULL) {
+ if (token->data.ptr[0] == ';' ||
+ token->data.ptr[0] == '}')
+ break;
+ }
+
+ /* Regardless, if we've got a semicolon, ignore it */
+ if (token->data.ptr[0] == ';')
+ continue;
+
+ /* Get corresponding start tokens for end tokens */
switch (token->data.ptr[0]) {
- case '{':
- brackets++;
- break;
case '}':
- brackets--;
- break;
- case '[':
- braces++;
+ want = '{';
break;
case ']':
- braces--;
- break;
- case '(':
- parens++;
+ want = '[';
break;
case ')':
- parens--;
+ want = '(';
break;
default:
+ want = 0;
break;
}
- }
- } while (token != NULL);
-
- while (1) {
- error = getToken(parser, &token);
- if (error != CSS_OK)
- return error;
-
- if (token->type == CSS_TOKEN_CHAR && token->data.len == 1) {
+
+ /* Either pop off the stack, if we've matched the
+ * current item, or push the start token on */
+ if (match != NULL && *match == want) {
+ parserutils_stack_pop(
+ parser->open_items, NULL);
+ } else if (want == 0) {
+ parserutils_stack_push(parser->open_items,
+ &token->data.ptr[0]);
+ }
+ }
+ }
+
+ /* Push the last token (';', '}' or EOF) back */
+ error = pushBack(parser, token);
+ if (error != CSS_OK)
+ return error;
+
+ /* Discard the tokens we've read */
+ parserutils_vector_clear(parser->tokens);
+
+ return done(parser);
+}
+
+css_error parseMalformedSelector(css_parser *parser)
+{
+ enum { Initial = 0, Go = 1 };
+ parser_state *state = parserutils_stack_get_current(parser->states);
+ const css_token *token;
+ css_error error;
+
+ /* Malformed selector: discard the entirety of the next block,
+ * ensuring we correctly match pairs of {}, [], and (). */
+
+ switch (state->substate) {
+ case Initial:
+ /* Clear the stack of open items */
+ while (parserutils_stack_pop(parser->open_items, NULL) ==
+ PARSERUTILS_OK)
+ ;
+
+ state->substate = Go;
+ /* Fall through */
+ case Go:
+ while (1) {
+ error = getToken(parser, &token);
+ if (error != CSS_OK)
+ return error;
+
+ if (token->type == CSS_TOKEN_EOF)
+ break;
+
+ if (token->type != CSS_TOKEN_CHAR ||
+ token->data.len != 1 ||
+ (token->data.ptr[0] != '{' &&
+ token->data.ptr[0] != '}' &&
+ token->data.ptr[0] != '[' &&
+ token->data.ptr[0] != ']' &&
+ token->data.ptr[0] != '(' &&
+ token->data.ptr[0] != ')'))
+ continue;
+
+ char want;
+ char *match = parserutils_stack_get_current(
+ parser->open_items);
+
+ /* Get corresponding start tokens for end tokens */
switch (token->data.ptr[0]) {
- case '{':
- brackets++;
- break;
case '}':
- brackets--;
- break;
- case '[':
- braces++;
+ want = '{';
break;
case ']':
- braces--;
- break;
- case '(':
- parens++;
+ want = '[';
break;
case ')':
- parens--;
+ want = '(';
break;
default:
+ want = 0;
break;
}
- /* If we've closed enough braces/parens/brackets
- * (too many is fine, too) */
- if (braces <= 0 && parens <= 0 && brackets <= 0) {
- if (token->data.ptr[0] == '}' && brackets < 0) {
- /* then, if this token is a close bracket, and
- * we've closed more brackets than we need to,
- * we're done. */
- error = pushBack(parser, token);
- if (error != CSS_OK)
- return error;
-
- break;
- } else if (token->data.ptr[0] == ';') {
- /* or, if this token is a semicolon,
- * we're done */
- error = pushBack(parser, token);
- if (error != CSS_OK)
- return error;
-
- break;
- }
+ /* Either pop off the stack, if we've matched the
+ * current item, or push the start token on */
+ if (match != NULL && *match == want) {
+ parserutils_stack_pop(
+ parser->open_items, NULL);
+ } else if (want == 0) {
+ parserutils_stack_push(parser->open_items,
+ &token->data.ptr[0]);
}
- }
- }
+
+ /* If we encountered a '}', there was data on the stack
+ * before, and the stack's now empty, then we've popped
+ * a '{' off the stack. That means we've found the end
+ * of the block, so we're done here. */
+ if (want == '{' && match != NULL &&
+ parserutils_stack_get_current(
+ parser->open_items) == NULL)
+ break;
+ }
+ }
+
+ /* Consume any trailing whitespace after the ruleset */
+ error = eatWS(parser);
+ if (error != CSS_OK)
+ return error;
/* Discard the tokens we've read */
parserutils_vector_clear(parser->tokens);
Modified: trunk/libcss/test/data/css/malformed.css
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/css/malformed.cs...
==============================================================================
--- trunk/libcss/test/data/css/malformed.css (original)
+++ trunk/libcss/test/data/css/malformed.css Thu Jul 31 13:07:52 2008
@@ -6,3 +6,6 @@
p { color:green; color{;color:maroon} } /* unexpected tokens { } */
p { color:red; color{;color:maroon}; color:green } /* same with recovery */
+"Foo bar baz
+p ( { ) color: green }
+p {color:green}
15 years, 4 months
r4845 takkaria - in /trunk/hubbub: src/tokeniser/tokeniser.c test/Makefile
by netsurf@semichrome.net
Author: takkaria
Date: Thu Jul 31 10:50:25 2008
New Revision: 4845
URL: http://source.netsurf-browser.org?rev=4845&view=rev
Log:
Fix copy-and-paste error in previous commit.
Modified:
trunk/hubbub/src/tokeniser/tokeniser.c
trunk/hubbub/test/Makefile
Modified: trunk/hubbub/src/tokeniser/tokeniser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/tokeniser/tokeniser.c?...
==============================================================================
--- trunk/hubbub/src/tokeniser/tokeniser.c (original)
+++ trunk/hubbub/src/tokeniser/tokeniser.c Thu Jul 31 10:50:25 2008
@@ -2744,7 +2744,7 @@
&len);
if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
- break;
+ return false;
}
if (tokeniser->context.chars.len > 0) {
Modified: trunk/hubbub/test/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/test/Makefile?rev=4845&r1=...
==============================================================================
--- trunk/hubbub/test/Makefile (original)
+++ trunk/hubbub/test/Makefile Thu Jul 31 10:50:25 2008
@@ -37,6 +37,11 @@
`$(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags json` \
-Wno-unused-parameter
LDFLAGS := $(LDFLAGS) `$(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json`
+
+ifdef PROFILE
+ CFLAGS := $(CFLAGS) -pg -fno-omit-frame-pointer
+ LDFLAGS := $(LDFLAGS) -pg
+endif
# Tests
TESTS_$(d) := csdetect dict entities hubbub parser \
15 years, 4 months
r4844 takkaria - /trunk/hubbub/src/tokeniser/tokeniser.c
by netsurf@semichrome.net
Author: takkaria
Date: Thu Jul 31 10:47:01 2008
New Revision: 4844
URL: http://source.netsurf-browser.org?rev=4844&view=rev
Log:
Handle CRs correctly everwhere.
Modified:
trunk/hubbub/src/tokeniser/tokeniser.c
Modified: trunk/hubbub/src/tokeniser/tokeniser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/tokeniser/tokeniser.c?...
==============================================================================
--- trunk/hubbub/src/tokeniser/tokeniser.c (original)
+++ trunk/hubbub/src/tokeniser/tokeniser.c Thu Jul 31 10:47:01 2008
@@ -1515,6 +1515,22 @@
COLLECT_NOBUF(tokeniser->context.chars, len);
COLLECT_CHAR(ctag->attributes[ctag->n_attributes - 1].value,
u_fffd, sizeof(u_fffd));
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(ctag->attributes[
+ ctag->n_attributes - 1].value,
+ &lf, sizeof(lf));
+ }
+
+ COLLECT_NOBUF(tokeniser->context.chars, len);
} else {
COLLECT_NOBUF(tokeniser->context.chars, len);
COLLECT_MS(ctag->attributes[ctag->n_attributes - 1].value,
@@ -1557,6 +1573,22 @@
COLLECT_NOBUF(tokeniser->context.chars, len);
COLLECT_CHAR(ctag->attributes[ctag->n_attributes - 1].value,
u_fffd, sizeof(u_fffd));
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(ctag->attributes[
+ ctag->n_attributes - 1].value,
+ &lf, sizeof(lf));
+ }
+
+ COLLECT_NOBUF(tokeniser->context.chars, len);
} else {
COLLECT_NOBUF(tokeniser->context.chars, len);
COLLECT_MS(ctag->attributes[ctag->n_attributes - 1].value,
@@ -1767,6 +1799,22 @@
parserutils_buffer_append(tokeniser->buffer,
u_fffd, sizeof(u_fffd));
comment->len += sizeof(u_fffd);
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ parserutils_buffer_append(tokeniser->buffer,
+ &lf, sizeof(lf));
+ comment->len += sizeof(lf);
+ }
+
+ COLLECT_NOBUF(tokeniser->context.chars, len);
} else {
parserutils_buffer_append(tokeniser->buffer,
(uint8_t *)cptr, len);
@@ -1912,7 +1960,7 @@
} else if (c == '\r') {
cptr = parserutils_inputstream_peek(
tokeniser->input,
- tokeniser->context.chars.len + 1,
+ tokeniser->context.chars.len + len,
&len);
if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
return false;
@@ -2234,9 +2282,21 @@
tokeniser->state = STATE_DATA;
} else if (c == '\0') {
if (cdoc->public_id.len == 0) {
- START_BUF(cdoc->name, u_fffd, sizeof(u_fffd));
+ START_BUF(cdoc->public_id, u_fffd, sizeof(u_fffd));
} else {
- COLLECT_CHAR(cdoc->name, u_fffd, sizeof(u_fffd));
+ COLLECT_CHAR(cdoc->public_id, u_fffd, sizeof(u_fffd));
+ }
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(cdoc->public_id, &lf, sizeof(lf));
}
} else {
COLLECT_MS(cdoc->public_id, cptr, len);
@@ -2279,6 +2339,18 @@
COLLECT_CHAR(cdoc->public_id,
u_fffd, sizeof(u_fffd));
}
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(cdoc->public_id, &lf, sizeof(lf));
+ }
} else {
COLLECT_MS(cdoc->public_id, cptr, len);
}
@@ -2444,6 +2516,18 @@
COLLECT_CHAR(cdoc->system_id,
u_fffd, sizeof(u_fffd));
}
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(cdoc->system_id, &lf, sizeof(lf));
+ }
} else {
COLLECT_MS(cdoc->system_id, cptr, len);
}
@@ -2483,6 +2567,18 @@
} else {
COLLECT_CHAR(cdoc->system_id,
u_fffd, sizeof(u_fffd));
+ }
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ return false;
+ } else if (cptr == PARSERUTILS_INPUTSTREAM_EOF ||
+ CHAR(cptr) != '\n') {
+ COLLECT_CHAR(cdoc->system_id, &lf, sizeof(lf));
}
} else {
COLLECT_MS(cdoc->system_id, cptr, len);
@@ -2639,6 +2735,30 @@
/* Perform NUL-byte replacement */
emit_character_token(tokeniser, &u_fffd_str);
+ parserutils_inputstream_advance(tokeniser->input, len);
+ tokeniser->context.match_cdata.end = 0;
+ } else if (c == '\r') {
+ cptr = parserutils_inputstream_peek(
+ tokeniser->input,
+ tokeniser->context.chars.len + len,
+ &len);
+
+ if (cptr == PARSERUTILS_INPUTSTREAM_OOD) {
+ break;
+ }
+
+ if (tokeniser->context.chars.len > 0) {
+ /* Emit any pending characters */
+ emit_current_chars(tokeniser);
+ }
+
+ c = CHAR(cptr);
+ if (c != '\n') {
+ /* Emit newline */
+ emit_character_token(tokeniser, &lf_str);
+ }
+
+ /* Advance over */
parserutils_inputstream_advance(tokeniser->input, len);
tokeniser->context.match_cdata.end = 0;
} else {
15 years, 4 months
r4843 takkaria - /trunk/hubbub/src/tokeniser/tokeniser.c
by netsurf@semichrome.net
Author: takkaria
Date: Thu Jul 31 10:35:28 2008
New Revision: 4843
URL: http://source.netsurf-browser.org?rev=4843&view=rev
Log:
Handle NUL properly everywhere it should be.
Modified:
trunk/hubbub/src/tokeniser/tokeniser.c
Modified: trunk/hubbub/src/tokeniser/tokeniser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/tokeniser/tokeniser.c?...
==============================================================================
--- trunk/hubbub/src/tokeniser/tokeniser.c (original)
+++ trunk/hubbub/src/tokeniser/tokeniser.c Thu Jul 31 10:35:28 2008
@@ -1009,6 +1009,15 @@
ctag->n_attributes = 0;
tokeniser->state = STATE_TAG_NAME;
+ } else if (c == '\0') {
+ COLLECT_NOBUF(tokeniser->context.chars, len);
+ tokeniser->context.current_tag_type =
+ HUBBUB_TOKEN_START_TAG;
+
+ START_BUF(ctag->name, u_fffd, sizeof(u_fffd));
+ ctag->n_attributes = 0;
+
+ tokeniser->state = STATE_TAG_NAME;
} else if (c == '>') {
/** \todo parse error */
@@ -2072,12 +2081,10 @@
FINISH(cdoc->name);
emit_current_doctype(tokeniser, false);
tokeniser->state = STATE_DATA;
+ } else if (c == '\0') {
+ COLLECT_CHAR(cdoc->name, u_fffd, sizeof(u_fffd));
} else {
- if (c == '\0') {
- COLLECT_CHAR(cdoc->name, u_fffd, sizeof(u_fffd));
- } else {
- COLLECT(cdoc->name, cptr, len);
- }
+ COLLECT(cdoc->name, cptr, len);
}
return true;
15 years, 4 months
r4842 takkaria - in /trunk/hubbub/perf: ./ README html5libtest.py hubbub.c libxml2.c makefile
by netsurf@semichrome.net
Author: takkaria
Date: Thu Jul 31 10:11:12 2008
New Revision: 4842
URL: http://source.netsurf-browser.org?rev=4842&view=rev
Log:
Add my cobbled-together perftests.
Added:
trunk/hubbub/perf/
trunk/hubbub/perf/README (with props)
trunk/hubbub/perf/html5libtest.py (with props)
trunk/hubbub/perf/hubbub.c (with props)
trunk/hubbub/perf/libxml2.c (with props)
trunk/hubbub/perf/makefile (with props)
Added: trunk/hubbub/perf/README
URL: http://source.netsurf-browser.org/trunk/hubbub/perf/README?rev=4842&view=...
==============================================================================
--- trunk/hubbub/perf/README (added)
+++ trunk/hubbub/perf/README Thu Jul 31 10:11:12 2008
@@ -1,0 +1,27 @@
+This directory contains some very basic cobbled-together performance tests.
+A makefile is provided for generating the executables from the .c files.
+
+
+html5libtest.py
+---------------
+
+ This tests the Python html5lib project, obtained from:
+ http://code.google.com/p/html5lib/
+
+ This is generally quite a slow parser. :)
+
+
+libxml2.c
+---------
+
+ This tests the GNOME libxml2 HTML parser, using mmap(). It doesn't do
+ anything with the resulting tree, just generates one.
+
+
+hubbub.c
+--------
+
+ This tests hubbub, using mmap(), and a modified version of the test
+ treebuilder. It could certainly be made more efficient (it's based on
+ an old version of the tree construction testrunner) so should not be
+ compared too harshly against the libxml2 results.
Propchange: trunk/hubbub/perf/README
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/hubbub/perf/html5libtest.py
URL: http://source.netsurf-browser.org/trunk/hubbub/perf/html5libtest.py?rev=4...
==============================================================================
--- trunk/hubbub/perf/html5libtest.py (added)
+++ trunk/hubbub/perf/html5libtest.py Thu Jul 31 10:11:12 2008
@@ -1,0 +1,12 @@
+#!/usr/bin/python
+
+import sys
+import html5lib
+
+if len(sys.argv) != 2:
+ print "Usage: %s <file>" % sys.argv[0]
+ sys.exit(1)
+
+f = open(sys.argv[1])
+parser = html5lib.HTMLParser()
+document = parser.parse(f)
Propchange: trunk/hubbub/perf/html5libtest.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/hubbub/perf/html5libtest.py
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/hubbub/perf/hubbub.c
URL: http://source.netsurf-browser.org/trunk/hubbub/perf/hubbub.c?rev=4842&vie...
==============================================================================
--- trunk/hubbub/perf/hubbub.c (added)
+++ trunk/hubbub/perf/hubbub.c Thu Jul 31 10:11:12 2008
@@ -1,0 +1,492 @@
+#define _GNU_SOURCE
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/fcntl.h>
+#include <sys/mman.h>
+
+#include <hubbub/hubbub.h>
+#include <hubbub/parser.h>
+#include <hubbub/tree.h>
+
+typedef struct attr_t attr_t;
+typedef struct node_t node_t;
+typedef struct buf_t buf_t;
+
+struct attr_t {
+ hubbub_ns ns;
+ char *name;
+ char *value;
+};
+
+struct node_t {
+ enum { DOCTYPE, COMMENT, ELEMENT, CHARACTER } type;
+
+ union {
+ struct {
+ char *name;
+ char *public_id;
+ char *system_id;
+ } doctype;
+
+ struct {
+ hubbub_ns ns;
+ char *name;
+ attr_t *attrs;
+ size_t n_attrs;
+ } element;
+
+ char *content; /**< For comments, characters **/
+ } data;
+
+ node_t *next;
+ node_t *prev;
+
+ node_t *child;
+ node_t *parent;
+};
+
+struct buf_t {
+ char *buf;
+ size_t len;
+ size_t pos;
+};
+
+
+#define NUM_NAMESPACES 7
+const char const *ns_names[NUM_NAMESPACES] =
+ { NULL, NULL /*html*/, "math", "svg", "xlink", "xml", "xmlns" };
+
+
+node_t *Document;
+
+
+
+static void node_print(buf_t *buf, node_t *node, unsigned depth);
+
+static int create_comment(void *ctx, const hubbub_string *data, void **result);
+static int create_doctype(void *ctx, const hubbub_doctype *doctype,
+ void **result);
+static int create_element(void *ctx, const hubbub_tag *tag, void **result);
+static int create_text(void *ctx, const hubbub_string *data, void **result);
+static int ref_node(void *ctx, void *node);
+static int unref_node(void *ctx, void *node);
+static int append_child(void *ctx, void *parent, void *child, void **result);
+static int insert_before(void *ctx, void *parent, void *child, void *ref_child,
+ void **result);
+static int remove_child(void *ctx, void *parent, void *child, void **result);
+static int clone_node(void *ctx, void *node, bool deep, void **result);
+static int reparent_children(void *ctx, void *node, void *new_parent);
+static int get_parent(void *ctx, void *node, bool element_only, void **result);
+static int has_children(void *ctx, void *node, bool *result);
+static int form_associate(void *ctx, void *form, void *node);
+static int add_attributes(void *ctx, void *node,
+ const hubbub_attribute *attributes, uint32_t n_attributes);
+static int set_quirks_mode(void *ctx, hubbub_quirks_mode mode);
+
+static hubbub_tree_handler tree_handler = {
+ create_comment,
+ create_doctype,
+ create_element,
+ create_text,
+ ref_node,
+ unref_node,
+ append_child,
+ insert_before,
+ remove_child,
+ clone_node,
+ reparent_children,
+ get_parent,
+ has_children,
+ form_associate,
+ add_attributes,
+ set_quirks_mode,
+ NULL
+};
+
+static void *myrealloc(void *ptr, size_t len, void *pw)
+{
+ return realloc(ptr, len);
+}
+
+
+
+int main(int argc, char **argv)
+{
+ hubbub_parser *parser;
+ hubbub_parser_optparams params;
+
+ struct stat info;
+ int fd;
+ uint8_t *file;
+
+ if (argc != 3) {
+ printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ return 1;
+ }
+
+ /* Initialise library */
+ assert(hubbub_initialise(argv[1], myrealloc, NULL) == HUBBUB_OK);
+
+ parser = hubbub_parser_create("UTF-8", "UTF-8", myrealloc, NULL);
+ assert(parser != NULL);
+
+ params.tree_handler = &tree_handler;
+ assert(hubbub_parser_setopt(parser, HUBBUB_PARSER_TREE_HANDLER,
+ ¶ms) == HUBBUB_OK);
+
+ params.document_node = (void *)1;
+ assert(hubbub_parser_setopt(parser, HUBBUB_PARSER_DOCUMENT_NODE,
+ ¶ms) == HUBBUB_OK);
+
+ stat(argv[2], &info);
+ fd = open(argv[2], 0);
+ file = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0);
+
+ assert(hubbub_parser_parse_chunk(parser, file, info.st_size)
+ == HUBBUB_OK);
+
+ assert(hubbub_finalise(myrealloc, NULL) == HUBBUB_OK);
+
+ return 0;
+}
+
+
+/*** Tree construction functions ***/
+
+int create_comment(void *ctx, const hubbub_string *data, void **result)
+{
+ node_t *node = calloc(1, sizeof *node);
+
+ node->type = COMMENT;
+ node->data.content = strndup((const char *) data->ptr, data->len);
+
+ *result = node;
+
+ return 0;
+}
+
+int create_doctype(void *ctx, const hubbub_doctype *doctype, void **result)
+{
+ node_t *node = calloc(1, sizeof *node);
+
+ node->type = DOCTYPE;
+ node->data.doctype.name = strndup(
+ (const char *) doctype->name.ptr,
+ doctype->name.len);
+
+ if (!doctype->public_missing) {
+ node->data.doctype.public_id = strndup(
+ (const char *) doctype->public_id.ptr,
+ doctype->public_id.len);
+ }
+
+ if (!doctype->system_missing) {
+ node->data.doctype.system_id = strndup(
+ (const char *) doctype->system_id.ptr,
+ doctype->system_id.len);
+ }
+
+ *result = node;
+
+ return 0;
+}
+
+int create_element(void *ctx, const hubbub_tag *tag, void **result)
+{
+ node_t *node = calloc(1, sizeof *node);
+
+ assert(tag->ns < NUM_NAMESPACES);
+
+ node->type = ELEMENT;
+ node->data.element.ns = tag->ns;
+ node->data.element.name = strndup(
+ (const char *) tag->name.ptr,
+ tag->name.len);
+ node->data.element.n_attrs = tag->n_attributes;
+
+ node->data.element.attrs = calloc(node->data.element.n_attrs,
+ sizeof *node->data.element.attrs);
+
+ for (size_t i = 0; i < tag->n_attributes; i++) {
+ attr_t *attr = &node->data.element.attrs[i];
+
+ assert(tag->attributes[i].ns < NUM_NAMESPACES);
+
+ attr->ns = tag->attributes[i].ns;
+
+ attr->name = strndup(
+ (const char *) tag->attributes[i].name.ptr,
+ tag->attributes[i].name.len);
+
+ attr->value = strndup(
+ (const char *) tag->attributes[i].value.ptr,
+ tag->attributes[i].value.len);
+ }
+
+ *result = node;
+
+ return 0;
+}
+
+int create_text(void *ctx, const hubbub_string *data, void **result)
+{
+ node_t *node = calloc(1, sizeof *node);
+
+ node->type = CHARACTER;
+ node->data.content = strndup((const char *) data->ptr, data->len);
+
+ *result = node;
+
+ return 0;
+}
+
+int ref_node(void *ctx, void *node)
+{
+ return 0;
+}
+
+int unref_node(void *ctx, void *node)
+{
+ return 0;
+}
+
+int append_child(void *ctx, void *parent, void *child, void **result)
+{
+ node_t *tparent = parent;
+ node_t *tchild = child;
+
+ node_t *insert = NULL;
+
+ tchild->parent = tparent;
+ tchild->next = tchild->prev = NULL;
+
+ *result = child;
+
+ if (parent == (void *)1) {
+ if (Document) {
+ insert = Document;
+ } else {
+ Document = tchild;
+ }
+ } else {
+ if (tparent->child == NULL) {
+ tparent->child = tchild;
+ } else {
+ insert = tparent->child;
+ }
+ }
+
+ if (insert) {
+ while (insert->next != NULL) {
+ insert = insert->next;
+ }
+
+ if (tchild->type == CHARACTER && insert->type == CHARACTER) {
+ insert->data.content = realloc(insert->data.content,
+ strlen(insert->data.content) +
+ strlen(tchild->data.content) + 1);
+ strcat(insert->data.content, tchild->data.content);
+ *result = insert;
+ } else {
+ insert->next = tchild;
+ tchild->prev = insert;
+ }
+ }
+
+ return 0;
+}
+
+/* insert 'child' before 'ref_child', under 'parent' */
+int insert_before(void *ctx, void *parent, void *child, void *ref_child,
+ void **result)
+{
+ node_t *tparent = parent;
+ node_t *tchild = child;
+ node_t *tref = ref_child;
+
+ if (tchild->type == CHARACTER && tref->prev &&
+ tref->prev->type == CHARACTER) {
+ node_t *insert = tref->prev;
+
+ insert->data.content = realloc(insert->data.content,
+ strlen(insert->data.content) +
+ strlen(tchild->data.content) + 1);
+ strcat(insert->data.content, tchild->data.content);
+
+ *result = insert;
+ } else {
+ tchild->parent = parent;
+
+ tchild->prev = tref->prev;
+ tchild->next = tref;
+ tref->prev = tchild;
+
+ if (tchild->prev)
+ tchild->prev->next = tchild;
+ else
+ tparent->child = tchild;
+
+ *result = child;
+ }
+
+ return 0;
+}
+
+int remove_child(void *ctx, void *parent, void *child, void **result)
+{
+ node_t *tparent = parent;
+ node_t *tchild = child;
+
+ assert(tparent->child);
+ assert(tchild->parent == tparent);
+
+ if (tchild->parent->child == tchild) {
+ tchild->parent->child = tchild->next;
+ }
+
+ if (tchild->prev)
+ tchild->prev->next = tchild->next;
+
+ if (tchild->next)
+ tchild->next->prev = tchild->prev;
+
+ /* now reset all the child's pointers */
+ tchild->next = tchild->prev = tchild->parent = NULL;
+
+ *result = child;
+
+ return 0;
+}
+
+int clone_node(void *ctx, void *node, bool deep, void **result)
+{
+ node_t *old_node = node;
+ node_t *new_node = calloc(1, sizeof *new_node);
+
+ *new_node = *old_node;
+ *result = new_node;
+
+ new_node->child = new_node->parent =
+ new_node->next = new_node->prev =
+ NULL;
+
+ if (deep == false)
+ return 0;
+
+ if (old_node->next) {
+ void *n;
+
+ clone_node(ctx, old_node->next, true, &n);
+
+ new_node->next = n;
+ new_node->next->prev = new_node;
+ }
+
+ if (old_node->child) {
+ void *n;
+
+ clone_node(ctx, old_node->child, true, &n);
+
+ new_node->child = n;
+ new_node->child->parent = new_node;
+ }
+
+ return 0;
+}
+
+/* Take all of the child nodes of "node" and append them to "new_parent" */
+int reparent_children(void *ctx, void *node, void *new_parent)
+{
+ node_t *parent = new_parent;
+ node_t *old_parent = node;
+
+ node_t *insert;
+ node_t *kids;
+
+ kids = old_parent->child;
+ if (!kids) return 0;
+
+ old_parent->child = NULL;
+
+ insert = parent->child;
+ if (!insert) {
+ parent->child = kids;
+ } else {
+ while (insert->next != NULL) {
+ insert = insert->next;
+ }
+
+ insert->next = kids;
+ kids->prev = insert;
+ }
+
+ while (kids) {
+ kids->parent = parent;
+ kids = kids->next;
+ }
+
+ return 0;
+}
+
+int get_parent(void *ctx, void *node, bool element_only, void **result)
+{
+ *result = ((node_t *)node)->parent;
+
+ return 0;
+}
+
+int has_children(void *ctx, void *node, bool *result)
+{
+ *result = ((node_t *)node)->child ? true : false;
+
+ return 0;
+}
+
+int form_associate(void *ctx, void *form, void *node)
+{
+ return 0;
+}
+
+int add_attributes(void *ctx, void *vnode,
+ const hubbub_attribute *attributes, uint32_t n_attributes)
+{
+ node_t *node = vnode;
+ size_t old_elems = node->data.element.n_attrs;
+
+ node->data.element.n_attrs += n_attributes;
+
+ node->data.element.attrs = realloc(node->data.element.attrs,
+ node->data.element.n_attrs *
+ sizeof *node->data.element.attrs);
+
+ for (size_t i = 0; i < n_attributes; i++) {
+ attr_t *attr = &node->data.element.attrs[old_elems + i];
+
+ assert(attributes[i].ns < NUM_NAMESPACES);
+
+ attr->ns = attributes[i].ns;
+
+ attr->name = strndup(
+ (const char *) attributes[i].name.ptr,
+ attributes[i].name.len);
+
+ attr->value = strndup(
+ (const char *) attributes[i].value.ptr,
+ attributes[i].value.len);
+ }
+
+
+ return 0;
+}
+
+int set_quirks_mode(void *ctx, hubbub_quirks_mode mode)
+{
+ return 0;
+}
Propchange: trunk/hubbub/perf/hubbub.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/hubbub/perf/libxml2.c
URL: http://source.netsurf-browser.org/trunk/hubbub/perf/libxml2.c?rev=4842&vi...
==============================================================================
--- trunk/hubbub/perf/libxml2.c (added)
+++ trunk/hubbub/perf/libxml2.c Thu Jul 31 10:11:12 2008
@@ -1,0 +1,52 @@
+#include <stdio.h>
+#include <assert.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/fcntl.h>
+#include <sys/mman.h>
+
+#include <libxml/HTMLparser.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+int main(int argc, char **argv)
+{
+ htmlDocPtr doc;
+
+ struct stat info;
+ int fd;
+ char *file;
+
+ if (argc != 2) {
+ printf("Usage: %s <file>\n", argv[0]);
+ return 1;
+ }
+
+ /* libxml hack */
+ LIBXML_TEST_VERSION
+
+
+ stat(argv[1], &info);
+ fd = open(argv[1], 0);
+ file = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0);
+
+ doc = htmlReadMemory(file, info.st_size, NULL, NULL,
+ HTML_PARSE_RECOVER | HTML_PARSE_NOERROR |
+ HTML_PARSE_NOWARNING);
+#if 0
+ doc = htmlReadFile(argv[1], NULL, HTML_PARSE_RECOVER |
+ HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING);
+#endif
+ if (!doc) {
+ printf("FAIL\n");
+ return 1;
+ }
+
+ xmlFreeDoc(doc);
+
+ xmlCleanupParser();
+
+ return 0;
+}
+
Propchange: trunk/hubbub/perf/libxml2.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/hubbub/perf/makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/perf/makefile?rev=4842&vie...
==============================================================================
--- trunk/hubbub/perf/makefile (added)
+++ trunk/hubbub/perf/makefile Thu Jul 31 10:11:12 2008
@@ -1,0 +1,17 @@
+all: libxml2 hubbub
+
+CC = gcc
+CFLAGS = -W -Wall --std=c99
+
+LIBXML2_OBJS = libxml2.o
+libxml2: libxml2.c
+libxml2: CFLAGS += `pkg-config libxml-2.0 --cflags`
+libxml2: $(LIBXML2_OBJS)
+ gcc -o libxml2 $(LIBXML2_OBJS) `pkg-config libxml-2.0 --libs`
+
+
+HUBBUB_OBJS = hubbub.o
+hubbub: hubbub.c
+hubbub: CFLAGS += `pkg-config --cflags libparserutils libhubbub`
+hubbub: $(HUBBUB_OBJS)
+ gcc -o hubbub $(HUBBUB_OBJS) `pkg-config --libs libhubbub libparserutils`
Propchange: trunk/hubbub/perf/makefile
------------------------------------------------------------------------------
svn:eol-style = native
15 years, 4 months
r4841 takkaria - in /trunk/hubbub: README json/
by netsurf@semichrome.net
Author: takkaria
Date: Thu Jul 31 10:02:18 2008
New Revision: 4841
URL: http://source.netsurf-browser.org?rev=4841&view=rev
Log:
Remove the json/ directory, and update compilation instructions to mention Hubbub's modified version and also libparserutils.
Removed:
trunk/hubbub/json/
Modified:
trunk/hubbub/README
Modified: trunk/hubbub/README
URL: http://source.netsurf-browser.org/trunk/hubbub/README?rev=4841&r1=4840&r2...
==============================================================================
--- trunk/hubbub/README (original)
+++ trunk/hubbub/README Thu Jul 31 10:02:18 2008
@@ -22,7 +22,8 @@
Hubbub also requires the following libraries to be installed:
+ An iconv implementation (e.g. libiconv)
- + JSON-C (for the testcases) -- see json/README for further information
+ + LibParserUtils -- see below for further information
+ + JSON-C (for the testcases) -- see below for further information
Hubbub can make use of the following, for debugging and testing purposes:
@@ -31,6 +32,18 @@
Compilation
-----------
+
+ In order to compile Hubbub, you will need LibParserUtils. This can be
+ obtained from SVN:
+ $ svn co svn://svn.netsurf-browser.org/trunk/libparserutils/
+
+ In order to run tests, you will need JSON-C. You can obtain the version
+ that Hubbub needs from SVN:
+ $ svn co svn://svn.netsurf-browser.org/trunk/json-c/json-c/
+
+
+ Compile and install both of these before trying to make Hubbub.
+
If necessary, modify the toolchain settings in the Makefile.
Invoke make:
15 years, 4 months
r4840 jmb - /trunk/hubbub/test/Makefile
by netsurf@semichrome.net
Author: jmb
Date: Thu Jul 31 09:44:04 2008
New Revision: 4840
URL: http://source.netsurf-browser.org?rev=4840&view=rev
Log:
Lose Mac-induced Makefile breakage
Modified:
trunk/hubbub/test/Makefile
Modified: trunk/hubbub/test/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/test/Makefile?rev=4840&r1=...
==============================================================================
--- trunk/hubbub/test/Makefile (original)
+++ trunk/hubbub/test/Makefile Thu Jul 31 09:44:04 2008
@@ -36,7 +36,7 @@
CFLAGS := $(CFLAGS) -I$(TOP)/src/ -I$(d) \
`$(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags json` \
-Wno-unused-parameter
-LDFLAGS := $(LDFLAGS) `$(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json` -liconv
+LDFLAGS := $(LDFLAGS) `$(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json`
# Tests
TESTS_$(d) := csdetect dict entities hubbub parser \
15 years, 4 months
r4839 jmb - in /trunk/hubbub: ./ docs/ include/hubbub/ src/ src/charset/ src/input/ src/tokeniser/ src/treebuilder/ src/utils/ test/ test/data/cscodec/ test/data/csdetect/ test/data/tree-construction/ test/regression/
by netsurf@semichrome.net
Author: jmb
Date: Thu Jul 31 09:43:32 2008
New Revision: 4839
URL: http://source.netsurf-browser.org?rev=4839&view=rev
Log:
Merged revisions 4631-4838 via svnmerge from
svn://source.netsurf-browser.org/branches/takkaria/hubbub-parserutils
........
r4631 | takkaria | 2008-07-13 12:54:30 +0100 (Sun, 13 Jul 2008) | 2 lines
Initial hatchet job moving to libparserutils (search and replace and a bit of cleaning up). This doesn't compile.
........
r4632 | takkaria | 2008-07-13 15:28:52 +0100 (Sun, 13 Jul 2008) | 2 lines
libparserutilize everything up to the "before attribute name" state. (Not compiling)
........
r4633 | takkaria | 2008-07-13 15:32:14 +0100 (Sun, 13 Jul 2008) | 2 lines
Replace all uses of "current_{comment|chars}" with just "chars".
........
r4634 | takkaria | 2008-07-13 16:12:06 +0100 (Sun, 13 Jul 2008) | 2 lines
Fix lots of compile errors, lpuise "before attribute name" state.
........
r4636 | takkaria | 2008-07-13 17:23:17 +0100 (Sun, 13 Jul 2008) | 2 lines
Finish lpuising the tag states, apart from character references.
........
r4637 | takkaria | 2008-07-13 19:58:52 +0100 (Sun, 13 Jul 2008) | 2 lines
lpuise the comment states.
........
r4638 | takkaria | 2008-07-13 20:04:31 +0100 (Sun, 13 Jul 2008) | 2 lines
Switch to setting hubbub_string::len to 0 instead of hubbub_string::ptr to NULL to indicate an empty buffer, as it was previously.
........
r4639 | takkaria | 2008-07-13 21:02:11 +0100 (Sun, 13 Jul 2008) | 2 lines
"lpu up" about half of the DOCTYPE handling stages.
........
r4640 | takkaria | 2008-07-13 21:23:00 +0100 (Sun, 13 Jul 2008) | 2 lines
Finish off LPUing the doctype modes.
........
r4641 | takkaria | 2008-07-13 21:37:33 +0100 (Sun, 13 Jul 2008) | 2 lines
The tokeniser uses lpu apart from the entity matcher, now.
........
r4643 | takkaria | 2008-07-14 01:20:36 +0100 (Mon, 14 Jul 2008) | 2 lines
Fix up the character reference matching stuff--still not properly dealt with, but compiles futher.
........
r4644 | takkaria | 2008-07-14 01:24:49 +0100 (Mon, 14 Jul 2008) | 2 lines
Get the tokeniser compiling in its LPU'd form.
........
r4645 | takkaria | 2008-07-14 01:26:34 +0100 (Mon, 14 Jul 2008) | 2 lines
Remember to advance the stream position after emitting tokens.
........
r4646 | takkaria | 2008-07-14 01:34:36 +0100 (Mon, 14 Jul 2008) | 2 lines
Nuke the src/input directory and start work on the treebuilder.
........
r4647 | takkaria | 2008-07-14 01:56:27 +0100 (Mon, 14 Jul 2008) | 2 lines
Get hubbub building in its LPU'd form.
........
r4648 | takkaria | 2008-07-14 02:41:03 +0100 (Mon, 14 Jul 2008) | 2 lines
Get the tokeniser2 testrunner working.
........
r4649 | takkaria | 2008-07-14 02:48:55 +0100 (Mon, 14 Jul 2008) | 2 lines
Fix test LDFLAGS so things link properly.
........
r4650 | takkaria | 2008-07-14 16:25:51 +0100 (Mon, 14 Jul 2008) | 2 lines
Get testcases compiling, remove ones now covered by libparserutils.
........
r4651 | takkaria | 2008-07-14 16:37:09 +0100 (Mon, 14 Jul 2008) | 2 lines
Remove more tests covered by libpu.
........
r4652 | takkaria | 2008-07-14 17:53:18 +0100 (Mon, 14 Jul 2008) | 2 lines
Fix up the tokeniser a bit.
........
r4653 | takkaria | 2008-07-14 19:02:15 +0100 (Mon, 14 Jul 2008) | 3 lines
- Remove the buffer_handler stuff from hubbub
- Add the basics of a buffer for attribute values and text.
........
r4654 | takkaria | 2008-07-14 20:00:45 +0100 (Mon, 14 Jul 2008) | 2 lines
Get character references working in attribute values, start trying to make them work in character tokens.
........
r4656 | takkaria | 2008-07-14 23:28:52 +0100 (Mon, 14 Jul 2008) | 2 lines
Get entities working a bit better.
........
r4657 | takkaria | 2008-07-14 23:37:16 +0100 (Mon, 14 Jul 2008) | 2 lines
Get entities working properly. (!)
........
r4658 | takkaria | 2008-07-14 23:56:10 +0100 (Mon, 14 Jul 2008) | 2 lines
Make doctypes work a bit better.
........
r4659 | takkaria | 2008-07-15 00:18:49 +0100 (Tue, 15 Jul 2008) | 2 lines
Get DOCTYPEs working.
........
r4660 | takkaria | 2008-07-15 00:26:36 +0100 (Tue, 15 Jul 2008) | 2 lines
Fix CDATA sections.
........
r4661 | takkaria | 2008-07-15 01:01:16 +0100 (Tue, 15 Jul 2008) | 2 lines
Get comments working again.
........
r4662 | takkaria | 2008-07-15 01:14:19 +0100 (Tue, 15 Jul 2008) | 2 lines
Fix EOF in "after attribute name" state.
........
r4664 | takkaria | 2008-07-15 01:30:27 +0100 (Tue, 15 Jul 2008) | 2 lines
Put the tests in better order, remove one now superceded with libpu.
........
r4665 | takkaria | 2008-07-15 01:46:29 +0100 (Tue, 15 Jul 2008) | 2 lines
Remove a lot of now-redunant clearings of the current stream offset.
........
r4667 | jmb | 2008-07-15 11:56:54 +0100 (Tue, 15 Jul 2008) | 2 lines
Completely purge charset stuff from hubbub. Parserutils handles this now.
........
r4677 | takkaria | 2008-07-15 21:03:42 +0100 (Tue, 15 Jul 2008) | 2 lines
Get more tests passing, handle NUL bytes in data state.
........
r4694 | takkaria | 2008-07-18 17:55:44 +0100 (Fri, 18 Jul 2008) | 3 lines
- Handle CRs correctly in some token states.
- Handle NULs correctly in the CDATA state.
........
r4706 | takkaria | 2008-07-19 14:58:48 +0100 (Sat, 19 Jul 2008) | 2 lines
Improve the tokeniser2 output a bit.
........
r4721 | takkaria | 2008-07-21 20:57:29 +0100 (Mon, 21 Jul 2008) | 2 lines
Get a better framework in place to allow switching to using a buffer mid-collect. This fails a couple of testcases and doesn't implement proper CR or NUL support yet.
........
r4725 | takkaria | 2008-07-23 17:20:07 +0100 (Wed, 23 Jul 2008) | 2 lines
Make comment tokens in tokeniser2 display both expected and actual output.
........
r4726 | takkaria | 2008-07-23 19:10:23 +0100 (Wed, 23 Jul 2008) | 4 lines
- Add FINISH() macro which stops using buffered character collection.
- Make the encoding U+FFFD in UTF-8 a global varabile, for sanity
- Make the bogus comment state deal with NULs correctly.
........
r4730 | takkaria | 2008-07-24 00:35:16 +0100 (Thu, 24 Jul 2008) | 2 lines
Try to get NUL bytes handled as the spec says.
........
r4731 | takkaria | 2008-07-24 00:40:59 +0100 (Thu, 24 Jul 2008) | 2 lines
Get CRs working in the data state.
........
r4732 | takkaria | 2008-07-24 00:47:45 +0100 (Thu, 24 Jul 2008) | 2 lines
Set force-quirks correctly when failing to match PUBLIC or SYSTEM in DOCTYPEs.
........
r4773 | takkaria | 2008-07-28 15:34:41 +0100 (Mon, 28 Jul 2008) | 2 lines
Fix up the tokeniser, finally.
........
r4801 | takkaria | 2008-07-29 15:59:31 +0100 (Tue, 29 Jul 2008) | 2 lines
Refactor macros a bit.
........
r4802 | takkaria | 2008-07-29 16:04:17 +0100 (Tue, 29 Jul 2008) | 2 lines
Do s/HUBBUB_TOKENISER_STATE_/STATE_/, for shorter line lengths.
........
r4805 | takkaria | 2008-07-29 16:58:37 +0100 (Tue, 29 Jul 2008) | 4 lines
Start cleaning up the hubbub tokeniser;
- refactor to use new inline emit_character_token() and emit_current_tag() functions; makes code clearer
- check EOF before using the CHAR() macro, so eventually it can be removed.
........
r4806 | takkaria | 2008-07-29 17:45:36 +0100 (Tue, 29 Jul 2008) | 2 lines
More cleanup like the previous commit.
........
r4807 | takkaria | 2008-07-29 19:48:44 +0100 (Tue, 29 Jul 2008) | 2 lines
Rewrite comment-handling code to be just the one function, whilst updating it to handle CRs and NULs properly. (All comments now always use the buffer.)
........
r4820 | takkaria | 2008-07-30 14:14:49 +0100 (Wed, 30 Jul 2008) | 2 lines
Finish off the first sweep of cleaning up and refactoring the tokeniser.
........
r4821 | takkaria | 2008-07-30 15:12:22 +0100 (Wed, 30 Jul 2008) | 2 lines
Add copyright statement.
........
r4822 | takkaria | 2008-07-30 17:23:01 +0100 (Wed, 30 Jul 2008) | 2 lines
Apply changes made to tokeniser2 to tokeniser3.
........
r4829 | takkaria | 2008-07-31 01:59:07 +0100 (Thu, 31 Jul 2008) | 4 lines
- Make the tokeniser save everything into the buffer, at least for now.
- Fix logic errors introduced in refactoring
- Avoid emitting more tokens than we have to (e.g. instead of emitting "<>" and switching back to the data state, just switch back to the data state and let it take care of it)
........
r4830 | takkaria | 2008-07-31 02:03:08 +0100 (Thu, 31 Jul 2008) | 2 lines
Small treebuilder <isindex> fix.
........
r4831 | takkaria | 2008-07-31 02:32:29 +0100 (Thu, 31 Jul 2008) | 2 lines
Stop holding on to pointers to character data across treebuilder calls.
........
r4832 | takkaria | 2008-07-31 02:45:09 +0100 (Thu, 31 Jul 2008) | 18 lines
Merge revisions 4620-4831 from trunk hubbub to libinputstream hubbub, modulo one change to test/Makefile which makes the linker choke when linking tests.
------------------------------------------------------------------------
r4666 | jmb | 2008-07-15 11:52:13 +0100 (Tue, 15 Jul 2008) | 3 lines
Make tree2 perform reference counting.
Fix bits of the treebuilder to perform reference counting correctly in the face of *result not pointing to the same object as the node passed in to the treebuilder client callbacks.
------------------------------------------------------------------------
r4668 | jmb | 2008-07-15 12:37:30 +0100 (Tue, 15 Jul 2008) | 2 lines
Fully document treebuilder callbacks.
------------------------------------------------------------------------
r4675 | takkaria | 2008-07-15 21:01:03 +0100 (Tue, 15 Jul 2008) | 2 lines
Fix memory leak in tokeniser2.
------------------------------------------------------------------------
........
r4834 | jmb | 2008-07-31 09:57:51 +0100 (Thu, 31 Jul 2008) | 2 lines
Fix infinite loop in charset detector
........
r4835 | jmb | 2008-07-31 13:01:24 +0100 (Thu, 31 Jul 2008) | 2 lines
Actually store namespaces on formatting list. Otherwise we read uninitialised memory. Add some semblance of filling allocations with junk to myrealloc().
........
r4836 | jmb | 2008-07-31 13:06:07 +0100 (Thu, 31 Jul 2008) | 2 lines
Lose debug again
........
r4837 | jmb | 2008-07-31 15:09:19 +0100 (Thu, 31 Jul 2008) | 2 lines
Lose obsolete testdata (this is now part of lpu)
........
Added:
trunk/hubbub/docs/Macros
- copied unchanged from r4837, branches/takkaria/hubbub-parserutils/docs/Macros
trunk/hubbub/test/data/csdetect/regression.dat
- copied unchanged from r4837, branches/takkaria/hubbub-parserutils/test/data/csdetect/regression.dat
trunk/hubbub/test/data/tree-construction/regression.dat
- copied unchanged from r4837, branches/takkaria/hubbub-parserutils/test/data/tree-construction/regression.dat
Removed:
trunk/hubbub/src/charset/aliases.c
trunk/hubbub/src/charset/aliases.h
trunk/hubbub/src/charset/codec.c
trunk/hubbub/src/charset/codec.h
trunk/hubbub/src/charset/codec_iconv.c
trunk/hubbub/src/charset/codec_impl.h
trunk/hubbub/src/charset/codec_utf16.c
trunk/hubbub/src/charset/codec_utf8.c
trunk/hubbub/src/input/
trunk/hubbub/src/utils/utf16.c
trunk/hubbub/src/utils/utf16.h
trunk/hubbub/src/utils/utf8.c
trunk/hubbub/src/utils/utf8.h
trunk/hubbub/test/aliases.c
trunk/hubbub/test/cscodec.c
trunk/hubbub/test/data/cscodec/
trunk/hubbub/test/filter.c
trunk/hubbub/test/inputstream.c
trunk/hubbub/test/parser-utf16.c
trunk/hubbub/test/regression/cscodec-segv.c
trunk/hubbub/test/regression/filter-segv.c
trunk/hubbub/test/regression/stream-nomem.c
Modified:
trunk/hubbub/ (props changed)
trunk/hubbub/include/hubbub/functypes.h
trunk/hubbub/include/hubbub/parser.h
trunk/hubbub/include/hubbub/types.h
trunk/hubbub/src/Makefile
trunk/hubbub/src/charset/Makefile
trunk/hubbub/src/charset/detect.c
trunk/hubbub/src/charset/detect.h
trunk/hubbub/src/hubbub.c
trunk/hubbub/src/parser.c
trunk/hubbub/src/tokeniser/tokeniser.c
trunk/hubbub/src/tokeniser/tokeniser.h
trunk/hubbub/src/treebuilder/after_body.c
trunk/hubbub/src/treebuilder/after_head.c
trunk/hubbub/src/treebuilder/before_head.c
trunk/hubbub/src/treebuilder/before_html.c
trunk/hubbub/src/treebuilder/generic_rcdata.c
trunk/hubbub/src/treebuilder/in_body.c
trunk/hubbub/src/treebuilder/in_foreign_content.c
trunk/hubbub/src/treebuilder/in_head.c
trunk/hubbub/src/treebuilder/in_row.c
trunk/hubbub/src/treebuilder/in_table.c
trunk/hubbub/src/treebuilder/in_table_body.c
trunk/hubbub/src/treebuilder/initial.c
trunk/hubbub/src/treebuilder/internal.h
trunk/hubbub/src/treebuilder/script_collect.c
trunk/hubbub/src/treebuilder/treebuilder.c
trunk/hubbub/src/treebuilder/treebuilder.h
trunk/hubbub/src/utils/Makefile
trunk/hubbub/test/INDEX
trunk/hubbub/test/Makefile
trunk/hubbub/test/csdetect.c
trunk/hubbub/test/data/csdetect/INDEX
trunk/hubbub/test/data/tree-construction/INDEX
trunk/hubbub/test/parser.c
trunk/hubbub/test/tokeniser.c
trunk/hubbub/test/tokeniser2.c
trunk/hubbub/test/tokeniser3.c
trunk/hubbub/test/tree.c
trunk/hubbub/test/tree2.c
[This mail would be too long, it was shortened to contain the URLs only.]
Modified: trunk/hubbub/include/hubbub/functypes.h
URL: http://source.netsurf-browser.org/trunk/hubbub/include/hubbub/functypes.h...
Modified: trunk/hubbub/include/hubbub/parser.h
URL: http://source.netsurf-browser.org/trunk/hubbub/include/hubbub/parser.h?re...
Modified: trunk/hubbub/include/hubbub/types.h
URL: http://source.netsurf-browser.org/trunk/hubbub/include/hubbub/types.h?rev...
Modified: trunk/hubbub/src/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/src/Makefile?rev=4839&r1=4...
Modified: trunk/hubbub/src/charset/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/Makefile?rev=4...
Removed: trunk/hubbub/src/charset/aliases.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/aliases.c?rev=...
Removed: trunk/hubbub/src/charset/aliases.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/aliases.h?rev=...
Removed: trunk/hubbub/src/charset/codec.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec.c?rev=48...
Removed: trunk/hubbub/src/charset/codec.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec.h?rev=48...
Removed: trunk/hubbub/src/charset/codec_iconv.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec_iconv.c?...
Removed: trunk/hubbub/src/charset/codec_impl.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec_impl.h?r...
Removed: trunk/hubbub/src/charset/codec_utf16.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec_utf16.c?...
Removed: trunk/hubbub/src/charset/codec_utf8.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/codec_utf8.c?r...
Modified: trunk/hubbub/src/charset/detect.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/detect.c?rev=4...
Modified: trunk/hubbub/src/charset/detect.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/charset/detect.h?rev=4...
Modified: trunk/hubbub/src/hubbub.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/hubbub.c?rev=4839&r1=4...
Modified: trunk/hubbub/src/parser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/parser.c?rev=4839&r1=4...
Modified: trunk/hubbub/src/tokeniser/tokeniser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/tokeniser/tokeniser.c?...
Modified: trunk/hubbub/src/tokeniser/tokeniser.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/tokeniser/tokeniser.h?...
Modified: trunk/hubbub/src/treebuilder/after_body.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/after_body...
Modified: trunk/hubbub/src/treebuilder/after_head.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/after_head...
Modified: trunk/hubbub/src/treebuilder/before_head.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/before_hea...
Modified: trunk/hubbub/src/treebuilder/before_html.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/before_htm...
Modified: trunk/hubbub/src/treebuilder/generic_rcdata.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/generic_rc...
Modified: trunk/hubbub/src/treebuilder/in_body.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_body.c?...
Modified: trunk/hubbub/src/treebuilder/in_foreign_content.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_foreign...
Modified: trunk/hubbub/src/treebuilder/in_head.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_head.c?...
Modified: trunk/hubbub/src/treebuilder/in_row.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_row.c?r...
Modified: trunk/hubbub/src/treebuilder/in_table.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_table.c...
Modified: trunk/hubbub/src/treebuilder/in_table_body.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/in_table_b...
Modified: trunk/hubbub/src/treebuilder/initial.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/initial.c?...
Modified: trunk/hubbub/src/treebuilder/internal.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/internal.h...
Modified: trunk/hubbub/src/treebuilder/script_collect.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/script_col...
Modified: trunk/hubbub/src/treebuilder/treebuilder.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/treebuilde...
Modified: trunk/hubbub/src/treebuilder/treebuilder.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/treebuilde...
Modified: trunk/hubbub/src/utils/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/src/utils/Makefile?rev=483...
Removed: trunk/hubbub/src/utils/utf16.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/utils/utf16.c?rev=4838...
Removed: trunk/hubbub/src/utils/utf16.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/utils/utf16.h?rev=4838...
Removed: trunk/hubbub/src/utils/utf8.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/utils/utf8.c?rev=4838&...
Removed: trunk/hubbub/src/utils/utf8.h
URL: http://source.netsurf-browser.org/trunk/hubbub/src/utils/utf8.h?rev=4838&...
Modified: trunk/hubbub/test/INDEX
URL: http://source.netsurf-browser.org/trunk/hubbub/test/INDEX?rev=4839&r1=483...
Modified: trunk/hubbub/test/Makefile
URL: http://source.netsurf-browser.org/trunk/hubbub/test/Makefile?rev=4839&r1=...
Removed: trunk/hubbub/test/aliases.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/aliases.c?rev=4838&vi...
Removed: trunk/hubbub/test/cscodec.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/cscodec.c?rev=4838&vi...
Modified: trunk/hubbub/test/csdetect.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/csdetect.c?rev=4839&r...
Modified: trunk/hubbub/test/data/csdetect/INDEX
URL: http://source.netsurf-browser.org/trunk/hubbub/test/data/csdetect/INDEX?r...
Modified: trunk/hubbub/test/data/tree-construction/INDEX
URL: http://source.netsurf-browser.org/trunk/hubbub/test/data/tree-constructio...
Removed: trunk/hubbub/test/filter.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/filter.c?rev=4838&vie...
Removed: trunk/hubbub/test/inputstream.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/inputstream.c?rev=483...
Removed: trunk/hubbub/test/parser-utf16.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/parser-utf16.c?rev=48...
Modified: trunk/hubbub/test/parser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/parser.c?rev=4839&r1=...
Removed: trunk/hubbub/test/regression/cscodec-segv.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/regression/cscodec-se...
Removed: trunk/hubbub/test/regression/filter-segv.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/regression/filter-seg...
Removed: trunk/hubbub/test/regression/stream-nomem.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/regression/stream-nom...
Modified: trunk/hubbub/test/tokeniser.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/tokeniser.c?rev=4839&...
Modified: trunk/hubbub/test/tokeniser2.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/tokeniser2.c?rev=4839...
Modified: trunk/hubbub/test/tokeniser3.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/tokeniser3.c?rev=4839...
Modified: trunk/hubbub/test/tree.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/tree.c?rev=4839&r1=48...
Modified: trunk/hubbub/test/tree2.c
URL: http://source.netsurf-browser.org/trunk/hubbub/test/tree2.c?rev=4839&r1=4...
15 years, 4 months