From bab3f35ff01a5825034d23424b8e3866cb6376e7 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 28 Jan 2016 14:14:34 +0000 Subject: Simplified consistant interface to HTMLElement creation. Also fixes STYLE element not getting the correct namespace or prefix. --- src/html/html_heading_element.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'src/html/html_heading_element.c') diff --git a/src/html/html_heading_element.c b/src/html/html_heading_element.c index ce298fb..b81c55d 100644 --- a/src/html/html_heading_element.c +++ b/src/html/html_heading_element.c @@ -27,13 +27,13 @@ static struct dom_element_protected_vtable _protect_vtable = { /** * Create a dom_html_heading_element object * - * \param doc The document object - * \param ele The returned element object + * \param params The html element creation parameters + * \param ele The returned element object * \return DOM_NO_ERR on success, appropriate dom_exception on failure. */ -dom_exception _dom_html_heading_element_create(struct dom_html_document *doc, - dom_string *tag_name, dom_string *namespace, - dom_string *prefix, struct dom_html_heading_element **ele) +dom_exception _dom_html_heading_element_create( + struct dom_html_element_create_params *params, + struct dom_html_heading_element **ele) { struct dom_node_internal *node; @@ -46,24 +46,21 @@ dom_exception _dom_html_heading_element_create(struct dom_html_document *doc, node->base.vtable = &_dom_html_element_vtable; node->vtable = &_protect_vtable; - return _dom_html_heading_element_initialise(doc, - tag_name, namespace, - prefix, *ele); + return _dom_html_heading_element_initialise(params, *ele); } /** * Initialise a dom_html_heading_element object * - * \param doc The document object - * \param ele The dom_html_heading_element object + * \param params The html element creation parameters + * \param ele The dom_html_heading_element object * \return DOM_NO_ERR on success, appropriate dom_exception on failure. */ -dom_exception _dom_html_heading_element_initialise(struct dom_html_document *doc, - dom_string *tag_name, dom_string *namespace, - dom_string *prefix, struct dom_html_heading_element *ele) +dom_exception _dom_html_heading_element_initialise( + struct dom_html_element_create_params *params, + struct dom_html_heading_element *ele) { - return _dom_html_element_initialise(doc, &ele->base, - tag_name, namespace, prefix); + return _dom_html_element_initialise(params, &ele->base); } /** -- cgit v1.2.3