From d264e721abc7848ae4f82fbaae444245f0e1e2b9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 21 Oct 2012 12:56:50 +0100 Subject: add includes in binding files to allow binding definitions to be split up --- test/data/bindings/htmldocument.bnd | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'test/data/bindings/htmldocument.bnd') diff --git a/test/data/bindings/htmldocument.bnd b/test/data/bindings/htmldocument.bnd index 9b47433..310fc29 100644 --- a/test/data/bindings/htmldocument.bnd +++ b/test/data/bindings/htmldocument.bnd @@ -1,8 +1,7 @@ /* test binding to generate htmldocument */ -webidlfile "eventtarget.idl"; -webidlfile "node.idl"; -webidlfile "document.idl"; +#include "document.bnd" + webidlfile "htmldocument.idl"; hdrcomment "Part of NetSurf Project"; @@ -21,22 +20,15 @@ preamble %{ #include "javascript/jsapi.h" - %} operation write %{ + LOG(("content %p parser %p writing %s", + private->htmlc, private->htmlc->parser, text)); - if (!JS_ConvertArguments(cx, argc, JSAPI_ARGV(cx, vp), "S", &u16_txt)) { - return JS_FALSE; - } - - JSString_to_char(u16_txt, txt, length); - - LOG(("content %p parser %p writing %s", - document->htmlc, document->htmlc->parser, txt)); - if (document->htmlc->parser != NULL) { - dom_hubbub_parser_insert_chunk(document->htmlc->parser, (uint8_t *)txt, length); - } + if (private->htmlc->parser != NULL) { + dom_hubbub_parser_insert_chunk(private->htmlc->parser, (uint8_t *)text, text_len); + } %} binding document { -- cgit v1.2.3