summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-12-06 19:31:17 (GMT)
committer Vincent Sanders <vince@netsurf-browser.org>2012-12-06 19:31:17 (GMT)
commit44a1b75fe3664687238929c61e58399940d3f862 (patch)
treeec0da0fba736611431718031db93f7770025b441
parent2f8d84b8961315d3531608b2d3d36b23979d3e15 (diff)
downloadlibdom-44a1b75fe3664687238929c61e58399940d3f862.tar.gz
libdom-44a1b75fe3664687238929c61e58399940d3f862.tar.bz2
add default action fetcher to binding parameters
-rw-r--r--bindings/hubbub/parser.c11
-rw-r--r--bindings/hubbub/parser.h3
-rw-r--r--test/testutils/load.c1
3 files changed, 10 insertions, 5 deletions
diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index 947c6f3..0c80a65 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -788,12 +788,13 @@ dom_hubbub_parser_create(dom_hubbub_parser_params *params,
return (DOM_HUBBUB_HUBBUB_ERR | error);
}
- /* TODO: Just pass the dom_events_default_action_fetcher a NULL,
- * we should pass the real function when we integrate libDOM with
- * NetSurf */
+ /* create DOM document */
err = dom_implementation_create_document(DOM_IMPLEMENTATION_HTML,
- NULL, NULL, NULL,
- NULL, &binding->doc);
+ NULL,
+ NULL,
+ NULL,
+ params->daf,
+ &binding->doc);
if (err != DOM_NO_ERR) {
hubbub_parser_destroy(binding->parser);
free(binding);
diff --git a/bindings/hubbub/parser.h b/bindings/hubbub/parser.h
index 132cc86..54ad0c8 100644
--- a/bindings/hubbub/parser.h
+++ b/bindings/hubbub/parser.h
@@ -60,6 +60,9 @@ typedef struct dom_hubbub_parser_params {
dom_msg msg; /**< Informational message function */
void *ctx; /**< Pointer to client-specific private data */
+
+ /** default action fetcher function */
+ dom_events_default_action_fetcher daf;
} dom_hubbub_parser_params;
/* Create a Hubbub parser instance */
diff --git a/test/testutils/load.c b/test/testutils/load.c
index da22870..eba4cb0 100644
--- a/test/testutils/load.c
+++ b/test/testutils/load.c
@@ -113,6 +113,7 @@ dom_document *load_html(const char *file, bool willBeModified)
params.msg = mymsg;
params.script = NULL;
params.ctx = NULL;
+ params.daf = NULL;
error = dom_hubbub_parser_create(&params, &parser, &ret);
if (error != DOM_HUBBUB_OK) {