diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-03-11 22:03:28 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-03-11 22:03:28 +0000 |
commit | 04e5f38a5e8e471db41dd010e2c7c0ae9b016601 (patch) | |
tree | 68fae9d93497ab8a697b0b5dc056d40928c96426 /include/hubbub | |
parent | 5b37e1f0bfd10da6720a6587e39d3dee45f77e8d (diff) | |
download | libhubbub-04e5f38a5e8e471db41dd010e2c7c0ae9b016601.tar.gz libhubbub-04e5f38a5e8e471db41dd010e2c7c0ae9b016601.tar.bz2 |
More treebuilder (8.2.4.8)
Make tree_handler a pointer rather than value.
Check for tree_handler's presence in hubbub_treebuilder_token_handler rather than scattering checks all over the treebuilder code.
Add test driver (doesn't actually build a tree but will exercise the core code correctly and verify that the treebuilder code releases all the node references it gains)
Enhance quirks mode reporting to distinguish between standards, limited, and full quirks modes.
svn path=/trunk/hubbub/; revision=3939
Diffstat (limited to 'include/hubbub')
-rw-r--r-- | include/hubbub/functypes.h | 2 | ||||
-rw-r--r-- | include/hubbub/parser.h | 2 | ||||
-rw-r--r-- | include/hubbub/types.h | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/include/hubbub/functypes.h b/include/hubbub/functypes.h index ee8c429..ce95303 100644 --- a/include/hubbub/functypes.h +++ b/include/hubbub/functypes.h @@ -95,7 +95,7 @@ typedef int (*hubbub_tree_clone_node)(void *ctx, void *node, bool deep, /** * Type of tree quirks mode notification function */ -typedef int (*hubbub_tree_set_quirks_mode)(void *ctx, bool quirky); +typedef int (*hubbub_tree_set_quirks_mode)(void *ctx, hubbub_quirks_mode mode); #endif diff --git a/include/hubbub/parser.h b/include/hubbub/parser.h index 5565f63..f7d8e1e 100644 --- a/include/hubbub/parser.h +++ b/include/hubbub/parser.h @@ -52,7 +52,7 @@ typedef union hubbub_parser_optparams { hubbub_content_model model; } content_model; - hubbub_tree_handler tree_handler; + hubbub_tree_handler *tree_handler; void *document_node; } hubbub_parser_optparams; diff --git a/include/hubbub/types.h b/include/hubbub/types.h index 57518ae..922bdbb 100644 --- a/include/hubbub/types.h +++ b/include/hubbub/types.h @@ -33,6 +33,15 @@ typedef enum hubbub_content_model { } hubbub_content_model; /** + * Quirks mode flag + */ +typedef enum hubbub_quirks_mode { + HUBBUB_QUIRKS_MODE_NONE, + HUBBUB_QUIRKS_MODE_LIMITED, + HUBBUB_QUIRKS_MODE_FULL +} hubbub_quirks_mode; + +/** * Type of an emitted token */ typedef enum hubbub_token_type { |