summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-09-19 14:06:09 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-09-19 14:06:09 +0100
commitd621b4cc86289f23b11f2050d5dcfbf025a3218f (patch)
treed43a13ad6c765c00ff32759d5995d460afad54d2
parent83ace96a3046ec0f6bdbd258280b50292a4e8caf (diff)
parent55e606196f97c2b2ded75933f7643d3acf57033f (diff)
downloadlibdom-d621b4cc86289f23b11f2050d5dcfbf025a3218f.tar.gz
libdom-d621b4cc86289f23b11f2050d5dcfbf025a3218f.tar.bz2
Merge branch 'tlsa/selectstuff'
Conflicts: include/dom/html/html_select_element.h src/html/html_select_element.c src/html/html_select_element.h
-rw-r--r--Makefile2
-rw-r--r--bindings/hubbub/parser.c12
-rw-r--r--include/dom/dom.h2
-rw-r--r--include/dom/html/html_option_element.h52
-rw-r--r--include/dom/html/html_select_element.h55
-rw-r--r--src/html/Makefile4
-rw-r--r--src/html/html_collection.c4
-rw-r--r--src/html/html_document.c8
-rw-r--r--src/html/html_document_strings.h7
-rw-r--r--src/html/html_option_element.c359
-rw-r--r--src/html/html_option_element.h49
-rw-r--r--src/html/html_options_collection.c68
-rw-r--r--src/html/html_select_element.c412
-rw-r--r--src/html/html_select_element.h9
-rw-r--r--test/DOMTSHandler.pm7
-rw-r--r--test/INDEX628
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement01.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement02.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement03.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement04.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement06.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement07.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement08.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLOptionElement09.xml (renamed from test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement01.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement02.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement03.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement04.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement05.xml.int-broken (renamed from test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement06.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement07.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement08.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement09.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement10.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement11.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement12.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement13.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement14.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement15.xml (renamed from test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail)0
-rw-r--r--test/testcases/tests/level1/html/HTMLSelectElement17.xml.int-broken (renamed from test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail)0
-rw-r--r--test/testutils/foreach.c26
-rw-r--r--test/testutils/foreach.h4
42 files changed, 1625 insertions, 83 deletions
diff --git a/Makefile b/Makefile
index 6918bb7..b9e1d8b 100644
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,9 @@ INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_meta_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_form_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_button_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_input_element.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_select_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_text_area_element.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_option_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_opt_group_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index 6174823..8296fe8 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -26,6 +26,7 @@
#include "html/html_document.h"
#include "html/html_button_element.h"
#include "html/html_input_element.h"
+#include "html/html_select_element.h"
#include "html/html_text_area_element.h"
#include <libwapcaplet/libwapcaplet.h>
@@ -496,6 +497,15 @@ static hubbub_error form_associate(void *parser, void *form, void *node)
return HUBBUB_UNKNOWN;
}
} else if (dom_string_caseless_isequal(ele->name,
+ doc->memoised[hds_SELECT])) {
+ err = _dom_html_select_element_set_form(
+ (dom_html_select_element *)node, form_ele);
+ if (err != DOM_NO_ERR) {
+ dom_parser->msg(DOM_MSG_CRITICAL, dom_parser->mctx,
+ "Error in form_associate");
+ return HUBBUB_UNKNOWN;
+ }
+ } else if (dom_string_caseless_isequal(ele->name,
doc->memoised[hds_TEXTAREA])) {
err = _dom_html_text_area_element_set_form(
(dom_html_text_area_element *)node, form_ele);
@@ -505,7 +515,7 @@ static hubbub_error form_associate(void *parser, void *form, void *node)
return HUBBUB_UNKNOWN;
}
}
-
+
return HUBBUB_OK;
}
diff --git a/include/dom/dom.h b/include/dom/dom.h
index b68085a..f9d8817 100644
--- a/include/dom/dom.h
+++ b/include/dom/dom.h
@@ -52,6 +52,8 @@
#include <dom/html/html_button_element.h>
#include <dom/html/html_text_area_element.h>
#include <dom/html/html_opt_group_element.h>
+#include <dom/html/html_option_element.h>
+#include <dom/html/html_select_element.h>
/* DOM Events header */
#include <dom/events/events.h>
diff --git a/include/dom/html/html_option_element.h b/include/dom/html/html_option_element.h
index 2e182d5..53ba286 100644
--- a/include/dom/html/html_option_element.h
+++ b/include/dom/html/html_option_element.h
@@ -2,6 +2,56 @@
* This file is part of libdom.
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
- * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2012 John-Mark Bell <jmb@netsurf-browser.org>
*/
+#ifndef dom_html_option_element_h_
+#define dom_html_option_element_h_
+
+#include <stdbool.h>
+#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
+#include <dom/html/html_form_element.h>
+
+typedef struct dom_html_option_element dom_html_option_element;
+
+dom_exception dom_html_option_element_get_form(
+ dom_html_option_element *option, dom_html_form_element **form);
+
+dom_exception dom_html_option_element_get_default_selected(
+ dom_html_option_element *option, bool *default_selected);
+
+dom_exception dom_html_option_element_set_default_selected(
+ dom_html_option_element *option, bool default_selected);
+
+dom_exception dom_html_option_element_get_text(
+ dom_html_option_element *option, dom_string **text);
+
+dom_exception dom_html_option_element_get_index(
+ dom_html_option_element *option, unsigned long *index);
+
+dom_exception dom_html_option_element_get_disabled(
+ dom_html_option_element *option, bool *disabled);
+
+dom_exception dom_html_option_element_set_disabled(
+ dom_html_option_element *option, bool disabled);
+
+dom_exception dom_html_option_element_get_label(
+ dom_html_option_element *option, dom_string **label);
+
+dom_exception dom_html_option_element_set_label(
+ dom_html_option_element *option, dom_string *label);
+
+dom_exception dom_html_option_element_get_selected(
+ dom_html_option_element *option, bool *selected);
+
+dom_exception dom_html_option_element_set_selected(
+ dom_html_option_element *option, bool selected);
+
+dom_exception dom_html_option_element_get_value(
+ dom_html_option_element *option, dom_string **value);
+
+dom_exception dom_html_option_element_set_value(
+ dom_html_option_element *option, dom_string *value);
+
+#endif
diff --git a/include/dom/html/html_select_element.h b/include/dom/html/html_select_element.h
index a052be1..6999368 100644
--- a/include/dom/html/html_select_element.h
+++ b/include/dom/html/html_select_element.h
@@ -12,44 +12,77 @@
#include <dom/core/exceptions.h>
+#include <dom/html/html_form_element.h>
+
typedef struct dom_html_select_element dom_html_select_element;
struct dom_html_options_collection;
struct dom_html_element;
+dom_exception dom_html_select_element_get_type(
+ dom_html_select_element *ele, dom_string **type);
+
dom_exception dom_html_select_element_get_selected_index(
- dom_html_select_element *ele, uint32_t *index);
+ dom_html_select_element *ele, int32_t *index);
dom_exception dom_html_select_element_set_selected_index(
- dom_html_select_element *ele, uint32_t index);
+ dom_html_select_element *ele, int32_t index);
+
+dom_exception dom_html_select_element_get_value(
+ dom_html_select_element *ele, dom_string **value);
+dom_exception dom_html_select_element_set_value(
+ dom_html_select_element *ele, dom_string *value);
+
dom_exception dom_html_select_element_get_length(
dom_html_select_element *ele, uint32_t *len);
dom_exception dom_html_select_element_set_length(
dom_html_select_element *ele, uint32_t len);
-dom_exception dom_html_select_element_get_options(
+
+dom_exception dom_html_select_element_get_form(
+ dom_html_select_element *ele, dom_html_form_element **form);
+
+dom_exception dom__html_select_element_get_options(
dom_html_select_element *ele,
struct dom_html_options_collection **col);
+#define dom_html_select_element_get_options(e, c) \
+ dom__html_select_element_get_options((dom_html_select_element *) (e), \
+ (struct dom_html_options_collection **) (c))
+
dom_exception dom_html_select_element_get_disabled(
dom_html_select_element *ele, bool *disabled);
dom_exception dom_html_select_element_set_disabled(
dom_html_select_element *ele, bool disabled);
+
dom_exception dom_html_select_element_get_multiple(
dom_html_select_element *ele, bool *multiple);
dom_exception dom_html_select_element_set_multiple(
dom_html_select_element *ele, bool multiple);
+
+dom_exception dom_html_select_element_get_name(
+ dom_html_select_element *ele, dom_string **name);
+dom_exception dom_html_select_element_set_name(
+ dom_html_select_element *ele, dom_string *name);
+
dom_exception dom_html_select_element_get_size(
- dom_html_select_element *ele, uint32_t *size);
+ dom_html_select_element *ele, int32_t *size);
dom_exception dom_html_select_element_set_size(
- dom_html_select_element *ele, uint32_t size);
+ dom_html_select_element *ele, int32_t size);
+
dom_exception dom_html_select_element_get_tab_index(
- dom_html_select_element *ele, uint32_t *tab_index);
+ dom_html_select_element *ele, int32_t *tab_index);
dom_exception dom_html_select_element_set_tab_index(
- dom_html_select_element *ele, uint32_t tab_index);
+ dom_html_select_element *ele, int32_t tab_index);
/* Functions */
-dom_exception dom_html_select_element_add(struct dom_html_element *ele,
- struct dom_html_element *before);
-dom_exception dom_html_element_blur(struct dom_html_select_element *ele);
-dom_exception dom_html_element_focus(struct dom_html_select_element *ele);
+dom_exception dom__html_select_element_add(dom_html_select_element *select,
+ struct dom_html_element *ele, struct dom_html_element *before);
+#define dom_html_select_element_add(s, e, b) \
+ dom__html_select_element_add((dom_html_select_element *) (s), \
+ (struct dom_html_element *) (e), \
+ (struct dom_html_element *) (b))
+dom_exception dom_html_select_element_remove(dom_html_select_element *ele,
+ long index);
+dom_exception dom_html_select_element_blur(struct dom_html_select_element *ele);
+dom_exception dom_html_select_element_focus(struct dom_html_select_element *ele);
#endif
diff --git a/src/html/Makefile b/src/html/Makefile
index 3001c59..4e1b4c4 100644
--- a/src/html/Makefile
+++ b/src/html/Makefile
@@ -6,9 +6,9 @@ DIR_SOURCES := \
html_base_element.c html_isindex_element.c html_style_element.c \
html_body_element.c html_form_element.c html_select_element.c \
html_button_element.c html_input_element.c html_text_area_element.c \
- html_opt_group_element.c
+ html_opt_group_element.c html_option_element.c
-UNINMPLEMENTED_SOURCES := html_option_element.c \
+UNINMPLEMENTED_SOURCES := \
html_label_element.c html_fieldset_element.c \
html_legend_element.c html_ulist_element.c html_olist_element.c \
html_dlist_element.c html_directory_element.c html_menu_element.c \
diff --git a/src/html/html_collection.c b/src/html/html_collection.c
index 704d384..a99297f 100644
--- a/src/html/html_collection.c
+++ b/src/html/html_collection.c
@@ -214,9 +214,7 @@ dom_exception dom_html_collection_named_item(dom_html_collection *col,
struct dom_node_internal *n = col->root;
dom_exception err;
- while (*node != NULL) {
- assert(n != NULL);
-
+ while (n != NULL) {
if (n->type == DOM_ELEMENT_NODE &&
col->ic(n, col->ctx) == true) {
dom_string *id = NULL;
diff --git a/src/html/html_document.c b/src/html/html_document.c
index 1b238e9..a27fcaa 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -22,6 +22,8 @@
#include "html/html_input_element.h"
#include "html/html_text_area_element.h"
#include "html/html_opt_group_element.h"
+#include "html/html_option_element.h"
+#include "html/html_select_element.h"
#include "core/string.h"
#include "utils/namespace.h"
@@ -210,6 +212,12 @@ _dom_html_document_create_element_internal(dom_html_document *html,
} else if (dom_string_caseless_isequal(tag_name, html->memoised[hds_OPTGROUP])) {
exc = _dom_html_opt_group_element_create(html, namespace, prefix,
(dom_html_opt_group_element **) result);
+ } else if (dom_string_caseless_isequal(tag_name, html->memoised[hds_OPTION])) {
+ exc = _dom_html_option_element_create(html, namespace, prefix,
+ (dom_html_option_element **) result);
+ } else if (dom_string_caseless_isequal(tag_name, html->memoised[hds_SELECT])) {
+ exc = _dom_html_select_element_create(html, namespace, prefix,
+ (dom_html_select_element **) result);
} else {
exc = _dom_html_element_create(html, tag_name, namespace,
prefix, result);
diff --git a/src/html/html_document_strings.h b/src/html/html_document_strings.h
index bd33866..fa9c4e4 100644
--- a/src/html/html_document_strings.h
+++ b/src/html/html_document_strings.h
@@ -88,6 +88,13 @@ HTML_DOCUMENT_STRINGS_ACTION(use_map,usemap)
HTML_DOCUMENT_STRINGS_ACTION1(textarea)
/* HTMLOptGroupElement attributes */
HTML_DOCUMENT_STRINGS_ACTION1(label)
+/* HTMLOptionElement attributes */
+/* HTML_DOCUMENT_STRINGS_ACTION1(label) */
+HTML_DOCUMENT_STRINGS_ACTION1(selected)
+/* HTML_DOCUMENT_STRINGS_ACTION1(value) */
+/* HTMLSelectElement strings */
+HTML_DOCUMENT_STRINGS_ACTION(select_multiple,select-multiple)
+HTML_DOCUMENT_STRINGS_ACTION(select_one,select-one)
/* Names for elements which get specialised. */
HTML_DOCUMENT_STRINGS_ACTION1(HTML)
HTML_DOCUMENT_STRINGS_ACTION1(HEAD)
diff --git a/src/html/html_option_element.c b/src/html/html_option_element.c
index 2e182d5..1584bac 100644
--- a/src/html/html_option_element.c
+++ b/src/html/html_option_element.c
@@ -2,6 +2,363 @@
* This file is part of libdom.
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
- * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2012 John-Mark Bell <jmb@netsurf-browser.org>
*/
+#include <assert.h>
+#include <stdlib.h>
+
+#include <dom/html/html_option_element.h>
+#include <dom/html/html_select_element.h>
+
+#include "html/html_document.h"
+#include "html/html_option_element.h"
+
+#include "core/node.h"
+#include "core/attr.h"
+#include "utils/utils.h"
+
+static struct dom_element_protected_vtable _protect_vtable = {
+ {
+ DOM_NODE_PROTECT_VTABLE_HTML_OPTION_ELEMENT
+ },
+ DOM_HTML_OPTION_ELEMENT_PROTECT_VTABLE
+};
+
+/**
+ * Create a dom_html_option_element object
+ *
+ * \param doc The document object
+ * \param ele The returned element object
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_option_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_option_element **ele)
+{
+ struct dom_node_internal *node;
+
+ *ele = malloc(sizeof(dom_html_option_element));
+ if (*ele == NULL)
+ return DOM_NO_MEM_ERR;
+
+ /* Set up vtables */
+ node = (struct dom_node_internal *) *ele;
+ node->base.vtable = &_dom_html_element_vtable;
+ node->vtable = &_protect_vtable;
+
+ return _dom_html_option_element_initialise(doc, namespace, prefix, *ele);
+}
+
+/**
+ * Initialise a dom_html_option_element object
+ *
+ * \param doc The document object
+ * \param ele The dom_html_option_element object
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception _dom_html_option_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_option_element *ele)
+{
+ ele->default_selected = false;
+ ele->default_selected_set = false;
+
+ return _dom_html_element_initialise(doc, &ele->base,
+ doc->memoised[hds_OPTION],
+ namespace, prefix);
+}
+
+/**
+ * Finalise a dom_html_option_element object
+ *
+ * \param ele The dom_html_option_element object
+ */
+void _dom_html_option_element_finalise(struct dom_html_option_element *ele)
+{
+ _dom_html_element_finalise(&ele->base);
+}
+
+/**
+ * Destroy a dom_html_option_element object
+ *
+ * \param ele The dom_html_option_element object
+ */
+void _dom_html_option_element_destroy(struct dom_html_option_element *ele)
+{
+ _dom_html_option_element_finalise(ele);
+ free(ele);
+}
+
+/*-----------------------------------------------------------------------*/
+/* Public APIs */
+
+dom_exception dom_html_option_element_get_form(
+ dom_html_option_element *option, dom_html_form_element **form)
+{
+ dom_html_document *doc;
+ dom_node_internal *select = ((dom_node_internal *) option)->parent;
+
+ doc = (dom_html_document *) ((dom_node_internal *) option)->owner;
+
+ /* Search ancestor chain for SELECT element */
+ while (select != NULL) {
+ if (select->type == DOM_ELEMENT_NODE &&
+ dom_string_caseless_isequal(select->name,
+ doc->memoised[hds_SELECT]))
+ break;
+
+ select = select->parent;
+ }
+
+ if (select != NULL) {
+ return dom_html_select_element_get_form((dom_html_select_element *) select,
+ form);
+ }
+
+ *form = NULL;
+
+ return DOM_NO_ERR;
+}
+
+/**
+ * Get the defaultSelected property
+ *
+ * \param option The dom_html_option_element object
+ * \param default_selected Pointer to location to receive value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_get_default_selected(
+ dom_html_option_element *option, bool *default_selected)
+{
+ *default_selected = option->default_selected;
+
+ return DOM_NO_ERR;
+}
+
+/**
+ * Set the defaultSelected property
+ *
+ * \param option The dom_html_option_element object
+ * \param default_selected New value for property
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_set_default_selected(
+ dom_html_option_element *option, bool default_selected)
+{
+ option->default_selected = default_selected;
+ option->default_selected_set = true;
+
+ return DOM_NO_ERR;
+}
+
+/**
+ * Get the text contained in the option
+ *
+ * \param option The dom_html_option_element object
+ * \param text Pointer to location to receive text
+ * \return DOM_NO_ERR on success, appropriate error otherwise
+ */
+dom_exception dom_html_option_element_get_text(
+ dom_html_option_element *option, dom_string **text)
+{
+ return dom_node_get_text_content(option, text);
+}
+
+/**
+ * Obtain the index of this option in its parent
+ *
+ * \param option The dom_html_option_element object
+ * \param index Pointer to receive zero-based index
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_get_index(
+ dom_html_option_element *option, unsigned long *index)
+{
+ UNUSED(option);
+ UNUSED(index);
+
+ /** \todo Implement */
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Get the disabled property
+ *
+ * \param ele The dom_html_option_element object
+ * \param disabled The returned status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_option_element_get_disabled(dom_html_option_element *ele,
+ bool *disabled)
+{
+ return dom_html_element_get_bool_property(&ele->base, "disabled",
+ SLEN("disabled"), disabled);
+}
+
+/**
+ * Set the disabled property
+ *
+ * \param ele The dom_html_option_element object
+ * \param disabled The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_option_element_set_disabled(dom_html_option_element *ele,
+ bool disabled)
+{
+ return dom_html_element_set_bool_property(&ele->base, "disabled",
+ SLEN("disabled"), disabled);
+}
+
+/**
+ * Get the label property
+ *
+ * \param option The dom_html_option_element object
+ * \param label Pointer to location to receive label
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_get_label(
+ dom_html_option_element *option, dom_string **label)
+{
+ dom_html_document *doc;
+
+ doc = (dom_html_document *) ((dom_node_internal *) option)->owner;
+
+ return dom_element_get_attribute(option,
+ doc->memoised[hds_label], label);
+}
+
+/**
+ * Set the label property
+ *
+ * \param option The dom_html_option_element object
+ * \param label Label value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_set_label(
+ dom_html_option_element *option, dom_string *label)
+{
+ dom_html_document *doc;
+
+ doc = (dom_html_document *) ((dom_node_internal *) option)->owner;
+
+ return dom_element_set_attribute(option,
+ doc->memoised[hds_label], label);
+}
+
+/**
+ * Get the selected property
+ *
+ * \param ele The dom_html_option_element object
+ * \param selected The returned status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_option_element_get_selected(dom_html_option_element *ele,
+ bool *selected)
+{
+ return dom_html_element_get_bool_property(&ele->base, "selected",
+ SLEN("selected"), selected);
+}
+
+/**
+ * Set the selected property
+ *
+ * \param ele The dom_html_option_element object
+ * \param selected The status
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_option_element_set_selected(dom_html_option_element *ele,
+ bool selected)
+{
+ return dom_html_element_set_bool_property(&ele->base, "selected",
+ SLEN("selected"), selected);
+}
+
+/**
+ * Get the value property
+ *
+ * \param option The dom_html_option_element object
+ * \param value Pointer to location to receive property value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_get_value(
+ dom_html_option_element *option, dom_string **value)
+{
+ dom_html_document *doc;
+ bool has_value = false;
+ dom_exception err;
+
+ doc = (dom_html_document *) ((dom_node_internal *) option)->owner;
+
+ err = dom_element_has_attribute(option,
+ doc->memoised[hds_value], &has_value);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ if (has_value) {
+ return dom_element_get_attribute(option,
+ doc->memoised[hds_value], value);
+ }
+
+ return dom_html_option_element_get_text(option, value);
+}
+
+/**
+ * Set the value property
+ *
+ * \param option The dom_html_option_element object
+ * \param value Property value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_option_element_set_value(
+ dom_html_option_element *option, dom_string *value)
+{
+ dom_html_document *doc;
+
+ doc = (dom_html_document *) ((dom_node_internal *) option)->owner;
+
+ return dom_element_set_attribute(option,
+ doc->memoised[hds_value], value);
+}
+
+/*------------------------------------------------------------------------*/
+/* The protected virtual functions */
+
+/* The virtual function used to parse attribute value, see src/core/element.c
+ * for detail */
+dom_exception _dom_html_option_element_parse_attribute(dom_element *ele,
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
+{
+ dom_html_option_element *option = (dom_html_option_element *)ele;
+ dom_html_document *html = (dom_html_document *)(ele->base.owner);
+
+ /** \todo Find some way to do the equiv for default_selected to be
+ * false instead of true. Some end-tag hook in the binding perhaps?
+ */
+ if (dom_string_caseless_isequal(name, html->memoised[hds_selected])) {
+ if (option->default_selected_set == false) {
+ option->default_selected = true;
+ option->default_selected_set = true;
+ }
+ }
+
+ dom_string_ref(value);
+ *parsed = value;
+
+ return DOM_NO_ERR;
+}
+
+/* The virtual destroy function, see src/core/node.c for detail */
+void _dom_virtual_html_option_element_destroy(dom_node_internal *node)
+{
+ _dom_html_option_element_destroy((struct dom_html_option_element *) node);
+}
+
+/* The virtual copy function, see src/core/node.c for detail */
+dom_exception _dom_html_option_element_copy(dom_node_internal *old,
+ dom_node_internal **copy)
+{
+ return _dom_html_element_copy(old, copy);
+}
+
diff --git a/src/html/html_option_element.h b/src/html/html_option_element.h
index 2e182d5..bc8ff6f 100644
--- a/src/html/html_option_element.h
+++ b/src/html/html_option_element.h
@@ -2,6 +2,53 @@
* This file is part of libdom.
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
- * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ * Copyright 2012 John-Mark Bell <jmb@netsurf-browser.org>
*/
+#ifndef dom_internal_html_option_element_h_
+#define dom_internal_html_option_element_h_
+
+#include <dom/html/html_option_element.h>
+
+#include "html/html_element.h"
+
+struct dom_html_option_element {
+ struct dom_html_element base;
+ /**< The base class */
+ bool default_selected; /**< Initial selected value */
+ bool default_selected_set; /**< Whether default_selected has been set */
+};
+
+/* Create a dom_html_option_element object */
+dom_exception _dom_html_option_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_option_element **ele);
+
+/* Initialise a dom_html_option_element object */
+dom_exception _dom_html_option_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
+ struct dom_html_option_element *ele);
+
+/* Finalise a dom_html_option_element object */
+void _dom_html_option_element_finalise(struct dom_html_option_element *ele);
+
+/* Destroy a dom_html_option_element object */
+void _dom_html_option_element_destroy(struct dom_html_option_element *ele);
+
+/* The protected virtual functions */
+dom_exception _dom_html_option_element_parse_attribute(dom_element *ele,
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
+void _dom_virtual_html_option_element_destroy(dom_node_internal *node);
+dom_exception _dom_html_option_element_copy(dom_node_internal *old,
+ dom_node_internal **copy);
+
+#define DOM_HTML_OPTION_ELEMENT_PROTECT_VTABLE \
+ _dom_html_option_element_parse_attribute
+
+#define DOM_NODE_PROTECT_VTABLE_HTML_OPTION_ELEMENT \
+ _dom_virtual_html_option_element_destroy, \
+ _dom_html_option_element_copy
+
+#endif
+
diff --git a/src/html/html_options_collection.c b/src/html/html_options_collection.c
index 0583d9c..85001ad 100644
--- a/src/html/html_options_collection.c
+++ b/src/html/html_options_collection.c
@@ -142,7 +142,73 @@ dom_exception dom_html_options_collection_item(dom_html_options_collection *col,
dom_exception dom_html_options_collection_named_item(dom_html_options_collection *col,
dom_string *name, struct dom_node **node)
{
- return dom_html_collection_named_item(&col->base, name, node);
+ struct dom_node_internal *n = col->base.root;
+ dom_string *kname;
+ dom_exception err;
+
+ /* Search for an element with an appropriate ID */
+ err = dom_html_collection_named_item(&col->base, name, node);
+ if (err == DOM_NO_ERR && *node != NULL)
+ return err;
+
+ /* Didn't find one, so consider name attribute */
+ err = dom_string_create_interned((const uint8_t *) "name", SLEN("name"),
+ &kname);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ while (n != NULL) {
+ if (n->type == DOM_ELEMENT_NODE &&
+ col->base.ic(n, col->base.ctx) == true) {
+ dom_string *nval = NULL;
+
+ err = dom_element_get_attribute(n, kname, &nval);
+ if (err != DOM_NO_ERR) {
+ dom_string_unref(kname);
+ return err;
+ }
+
+ if (nval != NULL && dom_string_isequal(name, nval)) {
+ *node = (struct dom_node *) n;
+ dom_node_ref(n);
+ dom_string_unref(nval);
+ dom_string_unref(kname);
+
+ return DOM_NO_ERR;
+ }
+
+ if (nval != NULL)
+ dom_string_unref(nval);
+ }
+
+ /* Depth first iterating */
+ if (n->first_child != NULL) {
+ n = n->first_child;
+ } else if (n->next != NULL) {
+ n = n->next;
+ } else {
+ /* No children and siblings */
+ struct dom_node_internal *parent = n->parent;
+
+ while (parent != col->base.root &&
+ n == parent->last_child) {
+ n = parent;
+ parent = parent->parent;
+ }
+
+ if (parent == col->base.root)
+ n = NULL;
+ else
+ n = n->next;
+ }
+ }
+
+ dom_string_unref(kname);
+
+ /* Not found the target node */
+ *node = NULL;
+
+ return DOM_NO_ERR;
}
/**
diff --git a/src/html/html_select_element.c b/src/html/html_select_element.c
index 58c08bc..4efffb9 100644
--- a/src/html/html_select_element.c
+++ b/src/html/html_select_element.c
@@ -8,6 +8,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <dom/html/html_option_element.h>
+#include <dom/html/html_options_collection.h>
+
#include "html/html_document.h"
#include "html/html_select_element.h"
@@ -31,6 +34,7 @@ static bool is_option(struct dom_node_internal *node, void *ctx);
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_html_select_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
struct dom_html_select_element **ele)
{
struct dom_node_internal *node;
@@ -44,7 +48,7 @@ dom_exception _dom_html_select_element_create(struct dom_html_document *doc,
node->base.vtable = &_dom_html_element_vtable;
node->vtable = &_protect_vtable;
- return _dom_html_select_element_initialise(doc, *ele);
+ return _dom_html_select_element_initialise(doc, namespace, prefix, *ele);
}
/**
@@ -55,23 +59,15 @@ dom_exception _dom_html_select_element_create(struct dom_html_document *doc,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_html_select_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
struct dom_html_select_element *ele)
{
- dom_string *name = NULL;
- dom_exception err;
-
- err = dom_string_create((const uint8_t *) "SELECT", SLEN("SELECT"),
- &name);
- if (err != DOM_NO_ERR)
- return err;
-
- err = _dom_html_element_initialise(doc, &ele->base, name, NULL, NULL);
- dom_string_unref(name);
-
- ele->selected = -1;
+ ele->form = NULL;
ele->options = NULL;
- return err;
+ return _dom_html_element_initialise(doc, &ele->base,
+ doc->memoised[hds_SELECT],
+ namespace, prefix);
}
/**
@@ -81,6 +77,9 @@ dom_exception _dom_html_select_element_initialise(struct dom_html_document *doc,
*/
void _dom_html_select_element_finalise(struct dom_html_select_element *ele)
{
+ if (ele->options != NULL)
+ dom_html_options_collection_unref(ele->options);
+
_dom_html_element_finalise(&ele->base);
}
@@ -129,6 +128,51 @@ dom_exception _dom_html_select_element_copy(dom_node_internal *old,
/*-----------------------------------------------------------------------*/
/* Public APIs */
+static dom_exception _dom_html_select_element_ensure_collection(
+ dom_html_select_element *ele)
+{
+ dom_exception err;
+ dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
+
+ assert(doc != NULL);
+
+ if (ele->options == NULL) {
+ err = _dom_html_options_collection_create(doc,
+ (dom_node_internal *) ele,
+ is_option, ele, &ele->options);
+ if (err != DOM_NO_ERR)
+ return err;
+ }
+
+ return DOM_NO_ERR;
+}
+
+/**
+ * Get the type of selection control
+ *
+ * \param ele The Select element
+ * \param type Pointer to location to receive type
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_get_type(
+ dom_html_select_element *ele, dom_string **type)
+{
+ dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
+ dom_exception err;
+ bool multiple;
+
+ err = dom_html_select_element_get_multiple(ele, &multiple);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ if (multiple)
+ *type = dom_string_ref(doc->memoised[hds_select_multiple]);
+ else
+ *type = dom_string_ref(doc->memoised[hds_select_one]);
+
+ return DOM_NO_ERR;
+}
+
/**
* Get the ordinal index of the selected option
*
@@ -137,9 +181,38 @@ dom_exception _dom_html_select_element_copy(dom_node_internal *old,
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_select_element_get_selected_index(
- dom_html_select_element *ele, uint32_t *index)
+ dom_html_select_element *ele, int32_t *index)
{
- *index = ele->selected;
+ dom_exception err;
+ uint32_t idx, len;
+ dom_node *option;
+ bool selected;
+
+ err = dom_html_select_element_get_length(ele, &len);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ for (idx = 0; idx < len; idx++) {
+ err = dom_html_options_collection_item(ele->options,
+ idx, &option);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ err = dom_html_option_element_get_selected(
+ (dom_html_option_element *) option, &selected);
+
+ dom_node_unref(option);
+
+ if (err != DOM_NO_ERR)
+ return err;
+
+ if (selected) {
+ *index = idx;
+ return DOM_NO_ERR;
+ }
+ }
+
+ *index = -1;
return DOM_NO_ERR;
}
@@ -152,14 +225,81 @@ dom_exception dom_html_select_element_get_selected_index(
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_select_element_set_selected_index(
- dom_html_select_element *ele, uint32_t index)
+ dom_html_select_element *ele, int32_t index)
{
- ele->selected = index;
+ UNUSED(ele);
+ UNUSED(index);
+
+ /** \todo Implement */
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Get the value of this form control
+ *
+ * \param ele The select element
+ * \param value Pointer to location to receive value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_get_value(
+ dom_html_select_element *ele, dom_string **value)
+{
+ dom_exception err;
+ uint32_t idx, len;
+ dom_node *option;
+ bool selected;
+
+ err = dom_html_select_element_get_length(ele, &len);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ for (idx = 0; idx < len; idx++) {
+ err = dom_html_options_collection_item(ele->options,
+ idx, &option);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ err = dom_html_option_element_get_selected(
+ (dom_html_option_element *) option, &selected);
+ if (err != DOM_NO_ERR) {
+ dom_node_unref(option);
+ return err;
+ }
+
+ if (selected) {
+ err = dom_html_option_element_get_value(
+ (dom_html_option_element *) option,
+ value);
+
+ dom_node_unref(option);
+
+ return err;
+ }
+ }
+
+ *value = NULL;
return DOM_NO_ERR;
}
/**
+ * Set the value of this form control
+ *
+ * \param ele The select element
+ * \param value New value
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_set_value(
+ dom_html_select_element *ele, dom_string *value)
+{
+ UNUSED(ele);
+ UNUSED(value);
+
+ /** \todo Implement */
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
* Get the number of options in this select element
*
* \param ele The element object
@@ -170,16 +310,10 @@ dom_exception dom_html_select_element_get_length(
dom_html_select_element *ele, uint32_t *len)
{
dom_exception err;
- dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
- assert(doc != NULL);
- if (ele->options == NULL) {
- err = _dom_html_options_collection_create(doc,
- (dom_node_internal *) ele,
- is_option, NULL, &ele->options);
- if (err != DOM_NO_ERR)
- return err;
- }
+ err = _dom_html_select_element_ensure_collection(ele);
+ if (err != DOM_NO_ERR)
+ return err;
return dom_html_options_collection_get_length(ele->options, len);
}
@@ -203,30 +337,39 @@ dom_exception dom_html_select_element_set_length(
}
/**
+ * Get the form associated with a select
+ *
+ * \param select The dom_html_select_element object
+ * \param form Pointer to location to receive form
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_get_form(
+ dom_html_select_element *select, dom_html_form_element **form)
+{
+ *form = select->form;
+
+ if (*form != NULL)
+ dom_node_ref(*form);
+
+ return DOM_NO_ERR;
+}
+
+/**
* The collection of OPTION elements of this element
*
* \param ele The element object
* \param col THe returned collection object
* \return DOM_NO_ERR on success.
*/
-dom_exception dom_html_select_element_get_options(
+dom_exception dom__html_select_element_get_options(
dom_html_select_element *ele,
struct dom_html_options_collection **col)
{
dom_exception err;
- dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
- assert(doc != NULL);
- if (ele->options == NULL) {
- err = _dom_html_options_collection_create(doc,
- (dom_node_internal *) ele,
- is_option, NULL, &ele->options);
- if (err != DOM_NO_ERR)
- return err;
-
- *col = ele->options;
- return DOM_NO_ERR;
- }
+ err = _dom_html_select_element_ensure_collection(ele);
+ if (err != DOM_NO_ERR)
+ return err;
dom_html_options_collection_ref(ele->options);
*col = ele->options;
@@ -290,20 +433,166 @@ dom_exception dom_html_select_element_set_multiple(
"multiple", SLEN("multiple"), multiple);
}
+/**
+ * Get the name property
+ *
+ * \param ele The select element
+ * \param name Pointer to location to receive name
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_get_name(
+ dom_html_select_element *ele, dom_string **name)
+{
+ dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
+
+ return dom_element_get_attribute(ele,
+ doc->memoised[hds_name], name);
+}
+
+/**
+ * Set the name property
+ *
+ * \param ele The select element
+ * \param name New name
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
+dom_exception dom_html_select_element_set_name(
+ dom_html_select_element *ele, dom_string *name)
+{
+ dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
+
+ return dom_element_set_attribute(ele,
+ doc->memoised[hds_name], name);
+
+}
+
+/**
+ * Get the size property
+ *
+ * \param ele The select element
+ * \param size Pointer to location to receive size
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
dom_exception dom_html_select_element_get_size(
- dom_html_select_element *ele, uint32_t *size);
+ dom_html_select_element *ele, int32_t *size)
+{
+ return dom_html_element_get_int32_t_property(&ele->base, "size",
+ SLEN("size"), size);
+}
+
+/**
+ * Set the size property
+ *
+ * \param ele The select element
+ * \param size New size
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
dom_exception dom_html_select_element_set_size(
- dom_html_select_element *ele, uint32_t size);
+ dom_html_select_element *ele, int32_t size)
+{
+ return dom_html_element_set_int32_t_property(&ele->base, "size",
+ SLEN("size"), size);
+}
+
+/**
+ * Get the tabindex property
+ *
+ * \param ele The select element
+ * \param tab_index Pointer to location to receive tab index
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
dom_exception dom_html_select_element_get_tab_index(
- dom_html_select_element *ele, uint32_t *tab_index);
+ dom_html_select_element *ele, int32_t *tab_index)
+{
+ return dom_html_element_get_int32_t_property(&ele->base, "tabindex",
+ SLEN("tabindex"), tab_index);
+}
+
+/**
+ * Set the tabindex property
+ *
+ * \param ele The select element
+ * \param tab_index New tab index
+ * \return DOM_NO_ERR on success, appropriate error otherwise.
+ */
dom_exception dom_html_select_element_set_tab_index(
- dom_html_select_element *ele, uint32_t tab_index);
+ dom_html_select_element *ele, int32_t tab_index)
+{
+ return dom_html_element_set_int32_t_property(&ele->base, "tabindex",
+ SLEN("tabindex"), tab_index);
+}
+
/* Functions */
-dom_exception dom_html_select_element_add(struct dom_html_element *ele,
- struct dom_html_element *before);
-dom_exception dom_html_element_blur(struct dom_html_select_element *ele);
-dom_exception dom_html_element_focus(struct dom_html_select_element *ele);
+dom_exception dom__html_select_element_add(dom_html_select_element *select,
+ struct dom_html_element *ele, struct dom_html_element *before)
+{
+ UNUSED(select);
+ UNUSED(ele);
+ UNUSED(before);
+
+ /** \todo Implement */
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+dom_exception dom_html_select_element_remove(dom_html_select_element *ele,
+ long index)
+{
+ dom_exception err;
+ uint32_t len;
+ dom_node *option;
+
+ err = dom_html_select_element_get_length(ele, &len);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ /* Ensure index is in range */
+ if (index >= len)
+ return DOM_NO_ERR;
+
+ err = dom_html_options_collection_item(ele->options, index, &option);
+ if (err != DOM_NO_ERR)
+ return err;
+
+ /** \todo What does remove mean? Remove option from tree and destroy it? */
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Blur this control
+ *
+ * \param ele Element to blur
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_select_element_blur(struct dom_html_select_element *ele)
+{
+ struct dom_document *doc = dom_node_get_owner(ele);
+ bool success = false;
+ assert(doc != NULL);
+
+ /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */
+ return _dom_dispatch_generic_event(doc, (dom_event_target *) ele,
+ (const uint8_t *) "blur", SLEN("blur"), true,
+ true, &success);
+}
+
+/**
+ * Focus this control
+ *
+ * \param ele Element to focus
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ */
+dom_exception dom_html_select_element_focus(struct dom_html_select_element *ele)
+{
+ struct dom_document *doc = dom_node_get_owner(ele);
+ bool success = false;
+ assert(doc != NULL);
+
+ /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */
+ return _dom_dispatch_generic_event(doc, (dom_event_target *) ele,
+ (const uint8_t *) "focus", SLEN("focus"), true,
+ true, &success);
+}
/*-----------------------------------------------------------------------*/
@@ -312,21 +601,20 @@ dom_exception dom_html_element_focus(struct dom_html_select_element *ele);
/* Test whether certain node is an option node */
bool is_option(struct dom_node_internal *node, void *ctx)
{
- dom_string *name = NULL;
- bool ret = false;
- dom_exception err;
-
- UNUSED(ctx);
+ dom_html_select_element *ele = ctx;
+ dom_html_document *doc = (dom_html_document *) dom_node_get_owner(ele);
- err = dom_string_create((const uint8_t *) "OPTION", SLEN("OPTION"),
- &name);
- if (err != DOM_NO_ERR)
- return false;
+ if (dom_string_isequal(node->name, doc->memoised[hds_OPTION]))
+ return true;
- if (dom_string_isequal(name, node->name))
- ret = true;
-
- dom_string_unref(name);
+ return false;
+}
+
+dom_exception _dom_html_select_element_set_form(
+ dom_html_select_element *select, dom_html_form_element *form)
+{
+ select->form = form;
- return ret;
+ return DOM_NO_ERR;
}
+
diff --git a/src/html/html_select_element.h b/src/html/html_select_element.h
index ae5c7dd..bd45614 100644
--- a/src/html/html_select_element.h
+++ b/src/html/html_select_element.h
@@ -18,16 +18,20 @@ struct dom_html_select_element {
/**< The base class */
int32_t selected;
/**< The selected element's index */
+ dom_html_form_element *form;
+ /**< The form associated with select */
dom_html_options_collection *options;
/**< The options objects */
};
/* Create a dom_html_select_element object */
dom_exception _dom_html_select_element_create(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
struct dom_html_select_element **ele);
/* Initialise a dom_html_select_element object */
dom_exception _dom_html_select_element_initialise(struct dom_html_document *doc,
+ dom_string *namespace, dom_string *prefix,
struct dom_html_select_element *ele);
/* Finalise a dom_html_select_element object */
@@ -51,5 +55,10 @@ dom_exception _dom_html_select_element_copy(dom_node_internal *old,
_dom_virtual_html_select_element_destroy, \
_dom_html_select_element_copy
+/* Internal function for bindings */
+
+dom_exception _dom_html_select_element_set_form(
+ dom_html_select_element *select, dom_html_form_element *form);
+
#endif
diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm
index 5d11b62..22fb418 100644
--- a/test/DOMTSHandler.pm
+++ b/test/DOMTSHandler.pm
@@ -1244,6 +1244,13 @@ sub generate_control_statement {
print "foreach_initialise_domnamednodemap($coll, \&iterator$iterator_index);\n";
print "while(get_next_domnamednodemap($coll, \&iterator$iterator_index, \&$member)) {\n";
}
+
+ if ($self->{"var"}->{$coll} eq "HTMLCollection") {
+ $iterator_index++;
+ print "unsigned int iterator$iterator_index = 0;";
+ print "foreach_initialise_domhtmlcollection($coll, \&iterator$iterator_index);\n";
+ print "while(get_next_domhtmlcollection($coll, \&iterator$iterator_index, \&$member)) {\n";
+ }
}
}
diff --git a/test/INDEX b/test/INDEX
new file mode 100644
index 0000000..b3b14bc
--- /dev/null
+++ b/test/INDEX
@@ -0,0 +1,628 @@
+#test desc dir
+level1_core_attrcreatedocumentfragment level1_core_attrcreatedocumentfragment
+level1_core_attrcreatetextnode level1_core_attrcreatetextnode
+level1_core_attrcreatetextnode2 level1_core_attrcreatetextnode2
+level1_core_attrdefaultvalue level1_core_attrdefaultvalue
+level1_core_attreffectivevalue level1_core_attreffectivevalue
+level1_core_attrname level1_core_attrname
+level1_core_attrnextsiblingnull level1_core_attrnextsiblingnull
+level1_core_attrparentnodenull level1_core_attrparentnodenull
+level1_core_attrprevioussiblingnull level1_core_attrprevioussiblingnull
+level1_core_attrspecifiedvalue level1_core_attrspecifiedvalue
+level1_core_attrspecifiedvaluechanged level1_core_attrspecifiedvaluechanged
+level1_core_cdatasectiongetdata level1_core_cdatasectiongetdata
+level1_core_characterdataappenddata level1_core_characterdataappenddata
+level1_core_characterdataappenddatagetdata level1_core_characterdataappenddatagetdata
+level1_core_characterdatadeletedatabegining level1_core_characterdatadeletedatabegining
+level1_core_characterdatadeletedataend level1_core_characterdatadeletedataend
+level1_core_characterdatadeletedataexceedslength level1_core_characterdatadeletedataexceedslength
+level1_core_characterdatadeletedatagetlengthanddata level1_core_characterdatadeletedatagetlengthanddata
+level1_core_characterdatadeletedatamiddle level1_core_characterdatadeletedatamiddle
+level1_core_characterdatagetdata level1_core_characterdatagetdata
+level1_core_characterdatagetlength level1_core_characterdatagetlength
+level1_core_characterdataindexsizeerrdeletedatacountnegative level1_core_characterdataindexsizeerrdeletedatacountnegative
+level1_core_characterdataindexsizeerrdeletedataoffsetgreater level1_core_characterdataindexsizeerrdeletedataoffsetgreater
+level1_core_characterdataindexsizeerrdeletedataoffsetnegative level1_core_characterdataindexsizeerrdeletedataoffsetnegative
+level1_core_characterdataindexsizeerrinsertdataoffsetgreater level1_core_characterdataindexsizeerrinsertdataoffsetgreater
+level1_core_characterdataindexsizeerrinsertdataoffsetnegative level1_core_characterdataindexsizeerrinsertdataoffsetnegative
+level1_core_characterdataindexsizeerrreplacedatacountnegative level1_core_characterdataindexsizeerrreplacedatacountnegative
+level1_core_characterdataindexsizeerrreplacedataoffsetgreater level1_core_characterdataindexsizeerrreplacedataoffsetgreater
+level1_core_characterdataindexsizeerrreplacedataoffsetnegative level1_core_characterdataindexsizeerrreplacedataoffsetnegative
+level1_core_characterdataindexsizeerrsubstringcountnegative level1_core_characterdataindexsizeerrsubstringcountnegative
+level1_core_characterdataindexsizeerrsubstringnegativeoffset level1_core_characterdataindexsizeerrsubstringnegativeoffset
+level1_core_characterdataindexsizeerrsubstringoffsetgreater level1_core_characterdataindexsizeerrsubstringoffsetgreater
+level1_core_characterdatainsertdatabeginning level1_core_characterdatainsertdatabeginning
+level1_core_characterdatainsertdataend level1_core_characterdatainsertdataend
+level1_core_characterdatainsertdatamiddle level1_core_characterdatainsertdatamiddle
+level1_core_characterdatareplacedatabegining level1_core_characterdatareplacedatabegining
+level1_core_characterdatareplacedataexceedslengthofarg level1_core_characterdatareplacedataexceedslengthofarg
+level1_core_characterdatasetnodevalue level1_core_characterdatasetnodevalue
+level1_core_characterdatasubstringexceedsvalue level1_core_characterdatasubstringexceedsvalue
+level1_core_characterdatasubstringvalue level1_core_characterdatasubstringvalue
+level1_core_commentgetcomment level1_core_commentgetcomment
+level1_core_documentcreateattribute level1_core_documentcreateattribute
+level1_core_documentcreatecdatasection level1_core_documentcreatecdatasection
+level1_core_documentcreatecomment level1_core_documentcreatecomment
+level1_core_documentcreateelement level1_core_documentcreateelement
+level1_core_documentcreateelementcasesensitive level1_core_documentcreateelementcasesensitive
+level1_core_documentcreateentityreference level1_core_documentcreateentityreference
+level1_core_documentcreateprocessinginstruction level1_core_documentcreateprocessinginstruction
+level1_core_documentcreatetextnode level1_core_documentcreatetextnode
+level1_core_documentgetdoctype level1_core_documentgetdoctype
+level1_core_documentgetdoctypenodtd level1_core_documentgetdoctypenodtd
+level1_core_documentgetelementsbytagnamelength level1_core_documentgetelementsbytagnamelength
+level1_core_documentgetelementsbytagnametotallength level1_core_documentgetelementsbytagnametotallength
+level1_core_documentgetelementsbytagnamevalue level1_core_documentgetelementsbytagnamevalue
+level1_core_documentgetrootnode level1_core_documentgetrootnode
+level1_core_documentinvalidcharacterexceptioncreateattribute level1_core_documentinvalidcharacterexceptioncreateattribute
+level1_core_documentinvalidcharacterexceptioncreateelement level1_core_documentinvalidcharacterexceptioncreateelement
+level1_core_documentinvalidcharacterexceptioncreateentref level1_core_documentinvalidcharacterexceptioncreateentref
+level1_core_documentinvalidcharacterexceptioncreateentref1 level1_core_documentinvalidcharacterexceptioncreateentref1
+level1_core_documentinvalidcharacterexceptioncreatepi level1_core_documentinvalidcharacterexceptioncreatepi
+level1_core_documentinvalidcharacterexceptioncreatepi1 level1_core_documentinvalidcharacterexceptioncreatepi1
+level1_core_documenttypegetdoctype level1_core_documenttypegetdoctype
+level1_core_elementaddnewattribute level1_core_elementaddnewattribute
+level1_core_elementassociatedattribute level1_core_elementassociatedattribute
+level1_core_elementchangeattributevalue level1_core_elementchangeattributevalue
+level1_core_elementcreatenewattribute level1_core_elementcreatenewattribute
+level1_core_elementgetattributenode level1_core_elementgetattributenode
+level1_core_elementgetattributenodenull level1_core_elementgetattributenodenull
+level1_core_elementgetelementempty level1_core_elementgetelementempty
+level1_core_elementgetelementsbytagname level1_core_elementgetelementsbytagname
+level1_core_elementgetelementsbytagnameaccessnodelist level1_core_elementgetelementsbytagnameaccessnodelist
+level1_core_elementgetelementsbytagnamenomatch level1_core_elementgetelementsbytagnamenomatch
+level1_core_elementgetelementsbytagnamespecialvalue level1_core_elementgetelementsbytagnamespecialvalue
+level1_core_elementgettagname level1_core_elementgettagname
+level1_core_elementinuseattributeerr level1_core_elementinuseattributeerr
+level1_core_elementinvalidcharacterexception level1_core_elementinvalidcharacterexception
+level1_core_elementnotfounderr level1_core_elementnotfounderr
+level1_core_elementremoveattributeaftercreate level1_core_elementremoveattributeaftercreate
+level1_core_elementremoveattributenode level1_core_elementremoveattributenode
+level1_core_elementreplaceattributewithself level1_core_elementreplaceattributewithself
+level1_core_elementreplaceexistingattribute level1_core_elementreplaceexistingattribute
+level1_core_elementreplaceexistingattributegevalue level1_core_elementreplaceexistingattributegevalue
+level1_core_elementretrieveallattributes level1_core_elementretrieveallattributes
+level1_core_elementretrieveattrvalue level1_core_elementretrieveattrvalue
+level1_core_elementretrievetagname level1_core_elementretrievetagname
+level1_core_elementsetattributenodenull level1_core_elementsetattributenodenull
+level1_core_elementwrongdocumenterr level1_core_elementwrongdocumenterr
+level1_core_hc_attrappendchild1 level1_core_hc_attrappendchild1
+level1_core_hc_attrappendchild2 level1_core_hc_attrappendchild2
+level1_core_hc_attrappendchild3 level1_core_hc_attrappendchild3
+level1_core_hc_attrappendchild4 level1_core_hc_attrappendchild4
+level1_core_hc_attrappendchild5 level1_core_hc_attrappendchild5
+level1_core_hc_attrappendchild6 level1_core_hc_attrappendchild6
+level1_core_hc_attrchildnodes1 level1_core_hc_attrchildnodes1
+level1_core_hc_attrchildnodes2 level1_core_hc_attrchildnodes2
+level1_core_hc_attrclonenode1 level1_core_hc_attrclonenode1
+level1_core_hc_attrcreatedocumentfragment level1_core_hc_attrcreatedocumentfragment
+level1_core_hc_attrcreatetextnode level1_core_hc_attrcreatetextnode
+level1_core_hc_attrcreatetextnode2 level1_core_hc_attrcreatetextnode2
+level1_core_hc_attreffectivevalue level1_core_hc_attreffectivevalue
+level1_core_hc_attrfirstchild level1_core_hc_attrfirstchild
+level1_core_hc_attrgetvalue1 level1_core_hc_attrgetvalue1
+level1_core_hc_attrhaschildnodes level1_core_hc_attrhaschildnodes
+level1_core_hc_attrinsertbefore1 level1_core_hc_attrinsertbefore1
+level1_core_hc_attrinsertbefore2 level1_core_hc_attrinsertbefore2
+level1_core_hc_attrinsertbefore3 level1_core_hc_attrinsertbefore3
+level1_core_hc_attrinsertbefore4 level1_core_hc_attrinsertbefore4
+level1_core_hc_attrinsertbefore5 level1_core_hc_attrinsertbefore5
+level1_core_hc_attrinsertbefore6 level1_core_hc_attrinsertbefore6
+level1_core_hc_attrinsertbefore7 level1_core_hc_attrinsertbefore7
+level1_core_hc_attrlastchild level1_core_hc_attrlastchild
+level1_core_hc_attrname level1_core_hc_attrname
+level1_core_hc_attrnextsiblingnull level1_core_hc_attrnextsiblingnull
+level1_core_hc_attrparentnodenull level1_core_hc_attrparentnodenull
+level1_core_hc_attrprevioussiblingnull level1_core_hc_attrprevioussiblingnull
+level1_core_hc_attrremovechild1 level1_core_hc_attrremovechild1
+level1_core_hc_attrremovechild2 level1_core_hc_attrremovechild2
+level1_core_hc_attrreplacechild1 level1_core_hc_attrreplacechild1
+level1_core_hc_attrreplacechild2 level1_core_hc_attrreplacechild2
+level1_core_hc_attrsetvalue1 level1_core_hc_attrsetvalue1
+level1_core_hc_attrsetvalue2 level1_core_hc_attrsetvalue2
+level1_core_hc_attrspecifiedvalue level1_core_hc_attrspecifiedvalue
+level1_core_hc_attrspecifiedvaluechanged level1_core_hc_attrspecifiedvaluechanged
+level1_core_hc_characterdataappenddata level1_core_hc_characterdataappenddata
+level1_core_hc_characterdataappenddatagetdata level1_core_hc_characterdataappenddatagetdata
+level1_core_hc_characterdatagetdata level1_core_hc_characterdatagetdata
+level1_core_hc_characterdatagetlength level1_core_hc_characterdatagetlength
+level1_core_hc_characterdataindexsizeerrdeletedatacountnegative level1_core_hc_characterdataindexsizeerrdeletedatacountnegative
+level1_core_hc_characterdataindexsizeerrdeletedataoffsetgreater level1_core_hc_characterdataindexsizeerrdeletedataoffsetgreater
+level1_core_hc_characterdataindexsizeerrdeletedataoffsetnegative level1_core_hc_characterdataindexsizeerrdeletedataoffsetnegative
+level1_core_hc_characterdataindexsizeerrinsertdataoffsetgreater level1_core_hc_characterdataindexsizeerrinsertdataoffsetgreater
+level1_core_hc_characterdataindexsizeerrinsertdataoffsetnegative level1_core_hc_characterdataindexsizeerrinsertdataoffsetnegative
+level1_core_hc_characterdataindexsizeerrreplacedatacountnegative level1_core_hc_characterdataindexsizeerrreplacedatacountnegative
+level1_core_hc_characterdataindexsizeerrreplacedataoffsetgreater level1_core_hc_characterdataindexsizeerrreplacedataoffsetgreater
+level1_core_hc_characterdataindexsizeerrreplacedataoffsetnegative level1_core_hc_characterdataindexsizeerrreplacedataoffsetnegative
+level1_core_hc_characterdataindexsizeerrsubstringcountnegative level1_core_hc_characterdataindexsizeerrsubstringcountnegative
+level1_core_hc_characterdataindexsizeerrsubstringnegativeoffset level1_core_hc_characterdataindexsizeerrsubstringnegativeoffset
+level1_core_hc_characterdataindexsizeerrsubstringoffsetgreater level1_core_hc_characterdataindexsizeerrsubstringoffsetgreater
+level1_core_hc_characterdatainsertdatabeginning level1_core_hc_characterdatainsertdatabeginning
+level1_core_hc_characterdatainsertdataend level1_core_hc_characterdatainsertdataend
+level1_core_hc_characterdatainsertdatamiddle level1_core_hc_characterdatainsertdatamiddle
+level1_core_hc_characterdatareplacedatabegining level1_core_hc_characterdatareplacedatabegining
+level1_core_hc_characterdatareplacedataexceedslengthofarg level1_core_hc_characterdatareplacedataexceedslengthofarg
+level1_core_hc_characterdatasetnodevalue level1_core_hc_characterdatasetnodevalue
+level1_core_hc_characterdatasubstringexceedsvalue level1_core_hc_characterdatasubstringexceedsvalue
+level1_core_hc_characterdatasubstringvalue level1_core_hc_characterdatasubstringvalue
+level1_core_hc_commentgetcomment level1_core_hc_commentgetcomment
+level1_core_hc_documentcreateattribute level1_core_hc_documentcreateattribute
+level1_core_hc_documentcreatecomment level1_core_hc_documentcreatecomment
+level1_core_hc_documentcreateelement level1_core_hc_documentcreateelement
+level1_core_hc_documentcreateelementcasesensitive level1_core_hc_documentcreateelementcasesensitive
+level1_core_hc_documentcreatetextnode level1_core_hc_documentcreatetextnode
+level1_core_hc_documentgetdoctype level1_core_hc_documentgetdoctype
+level1_core_hc_documentgetelementsbytagnamelength level1_core_hc_documentgetelementsbytagnamelength
+level1_core_hc_documentgetelementsbytagnametotallength level1_core_hc_documentgetelementsbytagnametotallength
+level1_core_hc_documentgetelementsbytagnamevalue level1_core_hc_documentgetelementsbytagnamevalue
+level1_core_hc_documentgetrootnode level1_core_hc_documentgetrootnode
+level1_core_hc_documentinvalidcharacterexceptioncreateattribute level1_core_hc_documentinvalidcharacterexceptioncreateattribute
+level1_core_hc_documentinvalidcharacterexceptioncreateattribute1 level1_core_hc_documentinvalidcharacterexceptioncreateattribute1
+level1_core_hc_documentinvalidcharacterexceptioncreateelement level1_core_hc_documentinvalidcharacterexceptioncreateelement
+level1_core_hc_documentinvalidcharacterexceptioncreateelement1 level1_core_hc_documentinvalidcharacterexceptioncreateelement1
+level1_core_hc_elementaddnewattribute level1_core_hc_elementaddnewattribute
+level1_core_hc_elementassociatedattribute level1_core_hc_elementassociatedattribute
+level1_core_hc_elementchangeattributevalue level1_core_hc_elementchangeattributevalue
+level1_core_hc_elementcreatenewattribute level1_core_hc_elementcreatenewattribute
+level1_core_hc_elementgetattributenode level1_core_hc_elementgetattributenode
+level1_core_hc_elementgetattributenodenull level1_core_hc_elementgetattributenodenull
+level1_core_hc_elementgetelementempty level1_core_hc_elementgetelementempty
+level1_core_hc_elementgetelementsbytagname level1_core_hc_elementgetelementsbytagname
+level1_core_hc_elementgetelementsbytagnameaccessnodelist level1_core_hc_elementgetelementsbytagnameaccessnodelist
+level1_core_hc_elementgetelementsbytagnamenomatch level1_core_hc_elementgetelementsbytagnamenomatch
+level1_core_hc_elementgetelementsbytagnamespecialvalue level1_core_hc_elementgetelementsbytagnamespecialvalue
+level1_core_hc_elementgettagname level1_core_hc_elementgettagname
+level1_core_hc_elementinuseattributeerr level1_core_hc_elementinuseattributeerr
+level1_core_hc_elementinvalidcharacterexception level1_core_hc_elementinvalidcharacterexception
+level1_core_hc_elementinvalidcharacterexception1 level1_core_hc_elementinvalidcharacterexception1
+level1_core_hc_elementnotfounderr level1_core_hc_elementnotfounderr
+level1_core_hc_elementremoveattribute level1_core_hc_elementremoveattribute
+level1_core_hc_elementremoveattributeaftercreate level1_core_hc_elementremoveattributeaftercreate
+level1_core_hc_elementremoveattributenode level1_core_hc_elementremoveattributenode
+level1_core_hc_elementreplaceattributewithself level1_core_hc_elementreplaceattributewithself
+level1_core_hc_elementreplaceexistingattribute level1_core_hc_elementreplaceexistingattribute
+level1_core_hc_elementreplaceexistingattributegevalue level1_core_hc_elementreplaceexistingattributegevalue
+level1_core_hc_elementretrieveattrvalue level1_core_hc_elementretrieveattrvalue
+level1_core_hc_elementretrievetagname level1_core_hc_elementretrievetagname
+level1_core_hc_elementsetattributenodenull level1_core_hc_elementsetattributenodenull
+level1_core_hc_elementwrongdocumenterr level1_core_hc_elementwrongdocumenterr
+level1_core_hc_namednodemapgetnameditem level1_core_hc_namednodemapgetnameditem
+level1_core_hc_namednodemapnotfounderr level1_core_hc_namednodemapnotfounderr
+level1_core_hc_namednodemapremovenameditem level1_core_hc_namednodemapremovenameditem
+level1_core_hc_namednodemapreturnnull level1_core_hc_namednodemapreturnnull
+level1_core_hc_namednodemapsetnameditem level1_core_hc_namednodemapsetnameditem
+level1_core_hc_namednodemapsetnameditemreturnvalue level1_core_hc_namednodemapsetnameditemreturnvalue
+level1_core_hc_namednodemapsetnameditemthatexists level1_core_hc_namednodemapsetnameditemthatexists
+level1_core_hc_namednodemapsetnameditemwithnewvalue level1_core_hc_namednodemapsetnameditemwithnewvalue
+level1_core_hc_namednodemapwrongdocumenterr level1_core_hc_namednodemapwrongdocumenterr
+level1_core_hc_nodeappendchild level1_core_hc_nodeappendchild
+level1_core_hc_nodeappendchildchildexists level1_core_hc_nodeappendchildchildexists
+level1_core_hc_nodeappendchilddocfragment level1_core_hc_nodeappendchilddocfragment
+level1_core_hc_nodeappendchildgetnodename level1_core_hc_nodeappendchildgetnodename
+level1_core_hc_nodeappendchildinvalidnodetype level1_core_hc_nodeappendchildinvalidnodetype
+level1_core_hc_nodeappendchildnewchilddiffdocument level1_core_hc_nodeappendchildnewchilddiffdocument
+level1_core_hc_nodeappendchildnodeancestor level1_core_hc_nodeappendchildnodeancestor
+level1_core_hc_nodeattributenodeattribute level1_core_hc_nodeattributenodeattribute
+level1_core_hc_nodeattributenodename level1_core_hc_nodeattributenodename
+level1_core_hc_nodeattributenodetype level1_core_hc_nodeattributenodetype
+level1_core_hc_nodeattributenodevalue level1_core_hc_nodeattributenodevalue
+level1_core_hc_nodechildnodes level1_core_hc_nodechildnodes
+level1_core_hc_nodechildnodesappendchild level1_core_hc_nodechildnodesappendchild
+level1_core_hc_nodeclonefalsenocopytext level1_core_hc_nodeclonefalsenocopytext
+level1_core_hc_nodeclonegetparentnull level1_core_hc_nodeclonegetparentnull
+level1_core_hc_nodeclonetruecopytext level1_core_hc_nodeclonetruecopytext
+level1_core_hc_nodecommentnodeattributes level1_core_hc_nodecommentnodeattributes
+level1_core_hc_nodecommentnodename level1_core_hc_nodecommentnodename
+level1_core_hc_nodecommentnodetype level1_core_hc_nodecommentnodetype
+level1_core_hc_nodecommentnodevalue level1_core_hc_nodecommentnodevalue
+level1_core_hc_nodedocumentfragmentnodename level1_core_hc_nodedocumentfragmentnodename
+level1_core_hc_nodedocumentfragmentnodetype level1_core_hc_nodedocumentfragmentnodetype
+level1_core_hc_nodedocumentfragmentnodevalue level1_core_hc_nodedocumentfragmentnodevalue
+level1_core_hc_nodedocumentnodeattribute level1_core_hc_nodedocumentnodeattribute
+level1_core_hc_nodedocumentnodename level1_core_hc_nodedocumentnodename
+level1_core_hc_nodedocumentnodetype level1_core_hc_nodedocumentnodetype
+level1_core_hc_nodedocumentnodevalue level1_core_hc_nodedocumentnodevalue
+level1_core_hc_nodeelementnodename level1_core_hc_nodeelementnodename
+level1_core_hc_nodeelementnodetype level1_core_hc_nodeelementnodetype
+level1_core_hc_nodeelementnodevalue level1_core_hc_nodeelementnodevalue
+level1_core_hc_nodegetfirstchild level1_core_hc_nodegetfirstchild
+level1_core_hc_nodegetfirstchildnull level1_core_hc_nodegetfirstchildnull
+level1_core_hc_nodegetlastchild level1_core_hc_nodegetlastchild
+level1_core_hc_nodegetlastchildnull level1_core_hc_nodegetlastchildnull
+level1_core_hc_nodegetnextsibling level1_core_hc_nodegetnextsibling
+level1_core_hc_nodegetnextsiblingnull level1_core_hc_nodegetnextsiblingnull
+level1_core_hc_nodegetownerdocument level1_core_hc_nodegetownerdocument
+level1_core_hc_nodegetownerdocumentnull level1_core_hc_nodegetownerdocumentnull
+level1_core_hc_nodegetprevioussibling level1_core_hc_nodegetprevioussibling
+level1_core_hc_nodegetprevioussiblingnull level1_core_hc_nodegetprevioussiblingnull
+level1_core_hc_nodehaschildnodes level1_core_hc_nodehaschildnodes
+level1_core_hc_nodehaschildnodesfalse level1_core_hc_nodehaschildnodesfalse
+level1_core_hc_nodeinsertbefore level1_core_hc_nodeinsertbefore
+level1_core_hc_nodeinsertbeforedocfragment level1_core_hc_nodeinsertbeforedocfragment
+level1_core_hc_nodeinsertbeforeinvalidnodetype level1_core_hc_nodeinsertbeforeinvalidnodetype
+level1_core_hc_nodeinsertbeforenewchilddiffdocument level1_core_hc_nodeinsertbeforenewchilddiffdocument
+level1_core_hc_nodeinsertbeforenewchildexists level1_core_hc_nodeinsertbeforenewchildexists
+level1_core_hc_nodeinsertbeforenodeancestor level1_core_hc_nodeinsertbeforenodeancestor
+level1_core_hc_nodeinsertbeforenodename level1_core_hc_nodeinsertbeforenodename
+level1_core_hc_nodeinsertbeforerefchildnonexistent level1_core_hc_nodeinsertbeforerefchildnonexistent
+level1_core_hc_nodeinsertbeforerefchildnull level1_core_hc_nodeinsertbeforerefchildnull
+level1_core_hc_nodelistindexnotzero level1_core_hc_nodelistindexnotzero
+level1_core_hc_nodelistreturnfirstitem level1_core_hc_nodelistreturnfirstitem
+level1_core_hc_nodelisttraverselist level1_core_hc_nodelisttraverselist
+level1_core_hc_nodeparentnode level1_core_hc_nodeparentnode
+level1_core_hc_nodeparentnodenull level1_core_hc_nodeparentnodenull
+level1_core_hc_noderemovechild level1_core_hc_noderemovechild
+level1_core_hc_noderemovechildgetnodename level1_core_hc_noderemovechildgetnodename
+level1_core_hc_noderemovechildnode level1_core_hc_noderemovechildnode
+level1_core_hc_noderemovechildoldchildnonexistent level1_core_hc_noderemovechildoldchildnonexistent
+level1_core_hc_nodereplacechild level1_core_hc_nodereplacechild
+level1_core_hc_nodereplacechildinvalidnodetype level1_core_hc_nodereplacechildinvalidnodetype
+level1_core_hc_nodereplacechildnewchilddiffdocument level1_core_hc_nodereplacechildnewchilddiffdocument
+level1_core_hc_nodereplacechildnewchildexists level1_core_hc_nodereplacechildnewchildexists
+level1_core_hc_nodereplacechildnodeancestor level1_core_hc_nodereplacechildnodeancestor
+level1_core_hc_nodereplacechildnodename level1_core_hc_nodereplacechildnodename
+level1_core_hc_nodereplacechildoldchildnonexistent level1_core_hc_nodereplacechildoldchildnonexistent
+level1_core_hc_nodetextnodeattribute level1_core_hc_nodetextnodeattribute
+level1_core_hc_nodetextnodename level1_core_hc_nodetextnodename
+level1_core_hc_nodetextnodetype level1_core_hc_nodetextnodetype
+level1_core_hc_nodetextnodevalue level1_core_hc_nodetextnodevalue
+level1_core_hc_nodevalue01 level1_core_hc_nodevalue01
+level1_core_hc_nodevalue02 level1_core_hc_nodevalue02
+level1_core_hc_nodevalue03 level1_core_hc_nodevalue03
+level1_core_hc_nodevalue04 level1_core_hc_nodevalue04
+level1_core_hc_nodevalue05 level1_core_hc_nodevalue05
+level1_core_hc_nodevalue06 level1_core_hc_nodevalue06
+level1_core_hc_textindexsizeerrnegativeoffset level1_core_hc_textindexsizeerrnegativeoffset
+level1_core_hc_textindexsizeerroffsetoutofbounds level1_core_hc_textindexsizeerroffsetoutofbounds
+level1_core_hc_textwithnomarkup level1_core_hc_textwithnomarkup
+level1_core_namednodemapgetnameditem level1_core_namednodemapgetnameditem
+level1_core_namednodemapnotfounderr level1_core_namednodemapnotfounderr
+level1_core_namednodemapremovenameditemreturnnodevalue level1_core_namednodemapremovenameditemreturnnodevalue
+level1_core_namednodemapreturnfirstitem level1_core_namednodemapreturnfirstitem
+level1_core_namednodemapreturnlastitem level1_core_namednodemapreturnlastitem
+level1_core_namednodemapreturnnull level1_core_namednodemapreturnnull
+level1_core_namednodemapsetnameditem level1_core_namednodemapsetnameditem
+level1_core_namednodemapsetnameditemreturnvalue level1_core_namednodemapsetnameditemreturnvalue
+level1_core_namednodemapsetnameditemthatexists level1_core_namednodemapsetnameditemthatexists
+level1_core_namednodemapsetnameditemwithnewvalue level1_core_namednodemapsetnameditemwithnewvalue
+level1_core_namednodemapwrongdocumenterr level1_core_namednodemapwrongdocumenterr
+level1_core_nodeappendchild level1_core_nodeappendchild
+level1_core_nodeappendchildchildexists level1_core_nodeappendchildchildexists
+level1_core_nodeappendchilddocfragment level1_core_nodeappendchilddocfragment
+level1_core_nodeappendchildgetnodename level1_core_nodeappendchildgetnodename
+level1_core_nodeappendchildinvalidnodetype level1_core_nodeappendchildinvalidnodetype
+level1_core_nodeappendchildnewchilddiffdocument level1_core_nodeappendchildnewchilddiffdocument
+level1_core_nodeappendchildnodeancestor level1_core_nodeappendchildnodeancestor
+level1_core_nodeappendchildnomodificationallowederrEE level1_core_nodeappendchildnomodificationallowederrEE
+level1_core_nodeattributenodeattribute level1_core_nodeattributenodeattribute
+level1_core_nodeattributenodename level1_core_nodeattributenodename
+level1_core_nodeattributenodetype level1_core_nodeattributenodetype
+level1_core_nodeattributenodevalue level1_core_nodeattributenodevalue
+level1_core_nodecdatasectionnodeattribute level1_core_nodecdatasectionnodeattribute
+level1_core_nodecdatasectionnodename level1_core_nodecdatasectionnodename
+level1_core_nodecdatasectionnodetype level1_core_nodecdatasectionnodetype
+level1_core_nodecdatasectionnodevalue level1_core_nodecdatasectionnodevalue
+level1_core_nodechildnodes level1_core_nodechildnodes
+level1_core_nodechildnodesempty level1_core_nodechildnodesempty
+level1_core_nodeclonefalsenocopytext level1_core_nodeclonefalsenocopytext
+level1_core_nodeclonegetparentnull level1_core_nodeclonegetparentnull
+level1_core_nodeclonetruecopytext level1_core_nodeclonetruecopytext
+level1_core_nodecommentnodeattributes level1_core_nodecommentnodeattributes
+level1_core_nodecommentnodename level1_core_nodecommentnodename
+level1_core_nodecommentnodetype level1_core_nodecommentnodetype
+level1_core_nodecommentnodevalue level1_core_nodecommentnodevalue
+level1_core_nodedocumentfragmentnodename level1_core_nodedocumentfragmentnodename
+level1_core_nodedocumentfragmentnodetype level1_core_nodedocumentfragmentnodetype
+level1_core_nodedocumentfragmentnodevalue level1_core_nodedocumentfragmentnodevalue
+level1_core_nodedocumentnodeattribute level1_core_nodedocumentnodeattribute
+level1_core_nodedocumentnodename level1_core_nodedocumentnodename
+level1_core_nodedocumentnodetype level1_core_nodedocumentnodetype
+level1_core_nodedocumentnodevalue level1_core_nodedocumentnodevalue
+level1_core_nodedocumenttypenodename level1_core_nodedocumenttypenodename
+level1_core_nodedocumenttypenodetype level1_core_nodedocumenttypenodetype
+level1_core_nodedocumenttypenodevalue level1_core_nodedocumenttypenodevalue
+level1_core_nodeelementnodeattributes level1_core_nodeelementnodeattributes
+level1_core_nodeelementnodename level1_core_nodeelementnodename
+level1_core_nodeelementnodetype level1_core_nodeelementnodetype
+level1_core_nodeelementnodevalue level1_core_nodeelementnodevalue
+level1_core_nodeentityreferencenodeattributes level1_core_nodeentityreferencenodeattributes
+level1_core_nodeentityreferencenodename level1_core_nodeentityreferencenodename
+level1_core_nodeentityreferencenodetype level1_core_nodeentityreferencenodetype
+level1_core_nodeentityreferencenodevalue level1_core_nodeentityreferencenodevalue
+level1_core_nodegetfirstchild level1_core_nodegetfirstchild
+level1_core_nodegetfirstchildnull level1_core_nodegetfirstchildnull
+level1_core_nodegetlastchild level1_core_nodegetlastchild
+level1_core_nodegetlastchildnull level1_core_nodegetlastchildnull
+level1_core_nodegetnextsibling level1_core_nodegetnextsibling
+level1_core_nodegetnextsiblingnull level1_core_nodegetnextsiblingnull
+level1_core_nodegetownerdocument level1_core_nodegetownerdocument
+level1_core_nodegetownerdocumentnull level1_core_nodegetownerdocumentnull
+level1_core_nodegetprevioussibling level1_core_nodegetprevioussibling
+level1_core_nodegetprevioussiblingnull level1_core_nodegetprevioussiblingnull
+level1_core_nodehaschildnodes level1_core_nodehaschildnodes
+level1_core_nodehaschildnodesfalse level1_core_nodehaschildnodesfalse
+level1_core_nodeinsertbeforedocfragment level1_core_nodeinsertbeforedocfragment
+level1_core_nodeinsertbeforeinvalidnodetype level1_core_nodeinsertbeforeinvalidnodetype
+level1_core_nodeinsertbeforenewchilddiffdocument level1_core_nodeinsertbeforenewchilddiffdocument
+level1_core_nodeinsertbeforenodeancestor level1_core_nodeinsertbeforenodeancestor
+level1_core_nodeinsertbeforenodename level1_core_nodeinsertbeforenodename
+level1_core_nodeinsertbeforenomodificationallowederrEE level1_core_nodeinsertbeforenomodificationallowederrEE
+level1_core_nodeinsertbeforerefchildnonexistent level1_core_nodeinsertbeforerefchildnonexistent
+level1_core_nodeinsertbeforerefchildnull level1_core_nodeinsertbeforerefchildnull
+level1_core_nodelistindexequalzero level1_core_nodelistindexequalzero
+level1_core_nodelistindexgetlengthofemptylist level1_core_nodelistindexgetlengthofemptylist
+level1_core_nodeparentnode level1_core_nodeparentnode
+level1_core_nodeparentnodenull level1_core_nodeparentnodenull
+level1_core_nodeprocessinginstructionnodeattributes level1_core_nodeprocessinginstructionnodeattributes
+level1_core_noderemovechild level1_core_noderemovechild
+level1_core_noderemovechildoldchildnonexistent level1_core_noderemovechildoldchildnonexistent
+level1_core_nodereplacechild level1_core_nodereplacechild
+level1_core_nodereplacechildinvalidnodetype level1_core_nodereplacechildinvalidnodetype
+level1_core_nodereplacechildnewchilddiffdocument level1_core_nodereplacechildnewchilddiffdocument
+level1_core_nodereplacechildnodeancestor level1_core_nodereplacechildnodeancestor
+level1_core_nodereplacechildnomodificationallowederr level1_core_nodereplacechildnomodificationallowederr
+level1_core_nodereplacechildnomodificationallowederrEE level1_core_nodereplacechildnomodificationallowederrEE
+level1_core_nodereplacechildoldchildnonexistent level1_core_nodereplacechildoldchildnonexistent
+level1_core_nodetextnodeattribute level1_core_nodetextnodeattribute
+level1_core_nodetextnodename level1_core_nodetextnodename
+level1_core_nodetextnodetype level1_core_nodetextnodetype
+level1_core_nodetextnodevalue level1_core_nodetextnodevalue
+level1_core_nodevalue01 level1_core_nodevalue01
+level1_core_nodevalue02 level1_core_nodevalue02
+level1_core_nodevalue03 level1_core_nodevalue03
+level1_core_nodevalue04 level1_core_nodevalue04
+level1_core_nodevalue05 level1_core_nodevalue05
+level1_core_nodevalue06 level1_core_nodevalue06
+level1_core_nodevalue09 level1_core_nodevalue09
+level1_core_textindexsizeerrnegativeoffset level1_core_textindexsizeerrnegativeoffset
+level1_core_textindexsizeerroffsetoutofbounds level1_core_textindexsizeerroffsetoutofbounds
+level1_core_textwithnomarkup level1_core_textwithnomarkup
+level1_html_HTMLBodyElement01 level1_html_HTMLBodyElement01
+level1_html_HTMLBodyElement02 level1_html_HTMLBodyElement02
+level1_html_HTMLBodyElement03 level1_html_HTMLBodyElement03
+level1_html_HTMLBodyElement04 level1_html_HTMLBodyElement04
+level1_html_HTMLBodyElement05 level1_html_HTMLBodyElement05
+level1_html_HTMLBodyElement06 level1_html_HTMLBodyElement06
+level1_html_HTMLButtonElement01 level1_html_HTMLButtonElement01
+level1_html_HTMLButtonElement02 level1_html_HTMLButtonElement02
+level1_html_HTMLButtonElement03 level1_html_HTMLButtonElement03
+level1_html_HTMLButtonElement04 level1_html_HTMLButtonElement04
+level1_html_HTMLButtonElement05 level1_html_HTMLButtonElement05
+level1_html_HTMLButtonElement06 level1_html_HTMLButtonElement06
+level1_html_HTMLButtonElement07 level1_html_HTMLButtonElement07
+level1_html_HTMLButtonElement08 level1_html_HTMLButtonElement08
+level1_html_HTMLCollection12 level1_html_HTMLCollection12
+level1_html_HTMLDocument01 level1_html_HTMLDocument01
+level1_html_HTMLDocument02 level1_html_HTMLDocument02
+level1_html_HTMLDocument03 level1_html_HTMLDocument03
+level1_html_HTMLElement01 level1_html_HTMLElement01
+level1_html_HTMLElement02 level1_html_HTMLElement02
+level1_html_HTMLElement03 level1_html_HTMLElement03
+level1_html_HTMLElement04 level1_html_HTMLElement04
+level1_html_HTMLElement05 level1_html_HTMLElement05
+level1_html_HTMLElement06 level1_html_HTMLElement06
+level1_html_HTMLElement07 level1_html_HTMLElement07
+level1_html_HTMLElement08 level1_html_HTMLElement08
+level1_html_HTMLElement09 level1_html_HTMLElement09
+level1_html_HTMLElement10 level1_html_HTMLElement10
+level1_html_HTMLElement100 level1_html_HTMLElement100
+level1_html_HTMLElement101 level1_html_HTMLElement101
+level1_html_HTMLElement102 level1_html_HTMLElement102
+level1_html_HTMLElement103 level1_html_HTMLElement103
+level1_html_HTMLElement104 level1_html_HTMLElement104
+level1_html_HTMLElement105 level1_html_HTMLElement105
+level1_html_HTMLElement106 level1_html_HTMLElement106
+level1_html_HTMLElement107 level1_html_HTMLElement107
+level1_html_HTMLElement108 level1_html_HTMLElement108
+level1_html_HTMLElement109 level1_html_HTMLElement109
+level1_html_HTMLElement11 level1_html_HTMLElement11
+level1_html_HTMLElement110 level1_html_HTMLElement110
+level1_html_HTMLElement111 level1_html_HTMLElement111
+level1_html_HTMLElement112 level1_html_HTMLElement112
+level1_html_HTMLElement113 level1_html_HTMLElement113
+level1_html_HTMLElement114 level1_html_HTMLElement114
+level1_html_HTMLElement115 level1_html_HTMLElement115
+level1_html_HTMLElement116 level1_html_HTMLElement116
+level1_html_HTMLElement117 level1_html_HTMLElement117
+level1_html_HTMLElement118 level1_html_HTMLElement118
+level1_html_HTMLElement119 level1_html_HTMLElement119
+level1_html_HTMLElement12 level1_html_HTMLElement12
+level1_html_HTMLElement120 level1_html_HTMLElement120
+level1_html_HTMLElement121 level1_html_HTMLElement121
+level1_html_HTMLElement122 level1_html_HTMLElement122
+level1_html_HTMLElement123 level1_html_HTMLElement123
+level1_html_HTMLElement124 level1_html_HTMLElement124
+level1_html_HTMLElement125 level1_html_HTMLElement125
+level1_html_HTMLElement126 level1_html_HTMLElement126
+level1_html_HTMLElement127 level1_html_HTMLElement127
+level1_html_HTMLElement128 level1_html_HTMLElement128
+level1_html_HTMLElement129 level1_html_HTMLElement129
+level1_html_HTMLElement13 level1_html_HTMLElement13
+level1_html_HTMLElement130 level1_html_HTMLElement130
+level1_html_HTMLElement131 level1_html_HTMLElement131
+level1_html_HTMLElement132 level1_html_HTMLElement132
+level1_html_HTMLElement133 level1_html_HTMLElement133
+level1_html_HTMLElement134 level1_html_HTMLElement134
+level1_html_HTMLElement135 level1_html_HTMLElement135
+level1_html_HTMLElement136 level1_html_HTMLElement136
+level1_html_HTMLElement137 level1_html_HTMLElement137
+level1_html_HTMLElement138 level1_html_HTMLElement138
+level1_html_HTMLElement139 level1_html_HTMLElement139
+level1_html_HTMLElement14 level1_html_HTMLElement14
+level1_html_HTMLElement140 level1_html_HTMLElement140
+level1_html_HTMLElement141 level1_html_HTMLElement141
+level1_html_HTMLElement142 level1_html_HTMLElement142
+level1_html_HTMLElement143 level1_html_HTMLElement143
+level1_html_HTMLElement144 level1_html_HTMLElement144
+level1_html_HTMLElement145 level1_html_HTMLElement145
+level1_html_HTMLElement15 level1_html_HTMLElement15
+level1_html_HTMLElement16 level1_html_HTMLElement16
+level1_html_HTMLElement17 level1_html_HTMLElement17
+level1_html_HTMLElement18 level1_html_HTMLElement18
+level1_html_HTMLElement19 level1_html_HTMLElement19
+level1_html_HTMLElement20 level1_html_HTMLElement20
+level1_html_HTMLElement21 level1_html_HTMLElement21
+level1_html_HTMLElement22 level1_html_HTMLElement22
+level1_html_HTMLElement23 level1_html_HTMLElement23
+level1_html_HTMLElement24 level1_html_HTMLElement24
+level1_html_HTMLElement25 level1_html_HTMLElement25
+level1_html_HTMLElement26 level1_html_HTMLElement26
+level1_html_HTMLElement27 level1_html_HTMLElement27
+level1_html_HTMLElement28 level1_html_HTMLElement28
+level1_html_HTMLElement29 level1_html_HTMLElement29
+level1_html_HTMLElement30 level1_html_HTMLElement30
+level1_html_HTMLElement31 level1_html_HTMLElement31
+level1_html_HTMLElement32 level1_html_HTMLElement32
+level1_html_HTMLElement33 level1_html_HTMLElement33
+level1_html_HTMLElement34 level1_html_HTMLElement34
+level1_html_HTMLElement35 level1_html_HTMLElement35
+level1_html_HTMLElement36 level1_html_HTMLElement36
+level1_html_HTMLElement37 level1_html_HTMLElement37
+level1_html_HTMLElement38 level1_html_HTMLElement38
+level1_html_HTMLElement39 level1_html_HTMLElement39
+level1_html_HTMLElement40 level1_html_HTMLElement40
+level1_html_HTMLElement41 level1_html_HTMLElement41
+level1_html_HTMLElement42 level1_html_HTMLElement42
+level1_html_HTMLElement43 level1_html_HTMLElement43
+level1_html_HTMLElement44 level1_html_HTMLElement44
+level1_html_HTMLElement45 level1_html_HTMLElement45
+level1_html_HTMLElement46 level1_html_HTMLElement46
+level1_html_HTMLElement47 level1_html_HTMLElement47
+level1_html_HTMLElement48 level1_html_HTMLElement48
+level1_html_HTMLElement49 level1_html_HTMLElement49
+level1_html_HTMLElement50 level1_html_HTMLElement50
+level1_html_HTMLElement51 level1_html_HTMLElement51
+level1_html_HTMLElement52 level1_html_HTMLElement52
+level1_html_HTMLElement53 level1_html_HTMLElement53
+level1_html_HTMLElement54 level1_html_HTMLElement54
+level1_html_HTMLElement55 level1_html_HTMLElement55
+level1_html_HTMLElement56 level1_html_HTMLElement56
+level1_html_HTMLElement57 level1_html_HTMLElement57
+level1_html_HTMLElement58 level1_html_HTMLElement58
+level1_html_HTMLElement59 level1_html_HTMLElement59
+level1_html_HTMLElement60 level1_html_HTMLElement60
+level1_html_HTMLElement61 level1_html_HTMLElement61
+level1_html_HTMLElement62 level1_html_HTMLElement62
+level1_html_HTMLElement63 level1_html_HTMLElement63
+level1_html_HTMLElement64 level1_html_HTMLElement64
+level1_html_HTMLElement65 level1_html_HTMLElement65
+level1_html_HTMLElement66 level1_html_HTMLElement66
+level1_html_HTMLElement67 level1_html_HTMLElement67
+level1_html_HTMLElement68 level1_html_HTMLElement68
+level1_html_HTMLElement69 level1_html_HTMLElement69
+level1_html_HTMLElement70 level1_html_HTMLElement70
+level1_html_HTMLElement71 level1_html_HTMLElement71
+level1_html_HTMLElement72 level1_html_HTMLElement72
+level1_html_HTMLElement73 level1_html_HTMLElement73
+level1_html_HTMLElement74 level1_html_HTMLElement74
+level1_html_HTMLElement75 level1_html_HTMLElement75
+level1_html_HTMLElement76 level1_html_HTMLElement76
+level1_html_HTMLElement77 level1_html_HTMLElement77
+level1_html_HTMLElement78 level1_html_HTMLElement78
+level1_html_HTMLElement79 level1_html_HTMLElement79
+level1_html_HTMLElement80 level1_html_HTMLElement80
+level1_html_HTMLElement81 level1_html_HTMLElement81
+level1_html_HTMLElement82 level1_html_HTMLElement82
+level1_html_HTMLElement83 level1_html_HTMLElement83
+level1_html_HTMLElement84 level1_html_HTMLElement84
+level1_html_HTMLElement85 level1_html_HTMLElement85
+level1_html_HTMLElement86 level1_html_HTMLElement86
+level1_html_HTMLElement87 level1_html_HTMLElement87
+level1_html_HTMLElement88 level1_html_HTMLElement88
+level1_html_HTMLElement89 level1_html_HTMLElement89
+level1_html_HTMLElement90 level1_html_HTMLElement90
+level1_html_HTMLElement91 level1_html_HTMLElement91
+level1_html_HTMLElement92 level1_html_HTMLElement92
+level1_html_HTMLElement93 level1_html_HTMLElement93
+level1_html_HTMLElement94 level1_html_HTMLElement94
+level1_html_HTMLElement95 level1_html_HTMLElement95
+level1_html_HTMLElement96 level1_html_HTMLElement96
+level1_html_HTMLElement97 level1_html_HTMLElement97
+level1_html_HTMLElement98 level1_html_HTMLElement98
+level1_html_HTMLElement99 level1_html_HTMLElement99
+level1_html_HTMLFormElement03 level1_html_HTMLFormElement03
+level1_html_HTMLFormElement04 level1_html_HTMLFormElement04
+level1_html_HTMLFormElement05 level1_html_HTMLFormElement05
+level1_html_HTMLFormElement06 level1_html_HTMLFormElement06
+level1_html_HTMLFormElement07 level1_html_HTMLFormElement07
+level1_html_HTMLFormElement08 level1_html_HTMLFormElement08
+level1_html_HTMLFormElement09 level1_html_HTMLFormElement09
+level1_html_HTMLFormElement10 level1_html_HTMLFormElement10
+level1_html_HTMLHeadElement01 level1_html_HTMLHeadElement01
+level1_html_HTMLHtmlElement01 level1_html_HTMLHtmlElement01
+level1_html_HTMLInputElement01 level1_html_HTMLInputElement01
+level1_html_HTMLInputElement02 level1_html_HTMLInputElement02
+level1_html_HTMLInputElement03 level1_html_HTMLInputElement03
+level1_html_HTMLInputElement04 level1_html_HTMLInputElement04
+level1_html_HTMLInputElement05 level1_html_HTMLInputElement05
+level1_html_HTMLInputElement06 level1_html_HTMLInputElement06
+level1_html_HTMLInputElement07 level1_html_HTMLInputElement07
+level1_html_HTMLInputElement08 level1_html_HTMLInputElement08
+level1_html_HTMLInputElement09 level1_html_HTMLInputElement09
+level1_html_HTMLInputElement10 level1_html_HTMLInputElement10
+level1_html_HTMLInputElement11 level1_html_HTMLInputElement11
+level1_html_HTMLInputElement12 level1_html_HTMLInputElement12
+level1_html_HTMLInputElement14 level1_html_HTMLInputElement14
+level1_html_HTMLInputElement15 level1_html_HTMLInputElement15
+level1_html_HTMLInputElement16 level1_html_HTMLInputElement16
+level1_html_HTMLInputElement17 level1_html_HTMLInputElement17
+level1_html_HTMLInputElement18 level1_html_HTMLInputElement18
+level1_html_HTMLInputElement19 level1_html_HTMLInputElement19
+level1_html_HTMLInputElement20 level1_html_HTMLInputElement20
+level1_html_HTMLInputElement22 level1_html_HTMLInputElement22
+level1_html_HTMLLinkElement01 level1_html_HTMLLinkElement01
+level1_html_HTMLLinkElement02 level1_html_HTMLLinkElement02
+level1_html_HTMLLinkElement03 level1_html_HTMLLinkElement03
+level1_html_HTMLLinkElement04 level1_html_HTMLLinkElement04
+level1_html_HTMLLinkElement05 level1_html_HTMLLinkElement05
+level1_html_HTMLLinkElement06 level1_html_HTMLLinkElement06
+level1_html_HTMLLinkElement07 level1_html_HTMLLinkElement07
+level1_html_HTMLLinkElement08 level1_html_HTMLLinkElement08
+level1_html_HTMLLinkElement09 level1_html_HTMLLinkElement09
+level1_html_HTMLMetaElement01 level1_html_HTMLMetaElement01
+level1_html_HTMLMetaElement02 level1_html_HTMLMetaElement02
+level1_html_HTMLMetaElement03 level1_html_HTMLMetaElement03
+level1_html_HTMLMetaElement04 level1_html_HTMLMetaElement04
+level1_html_HTMLOptGroupElement01 level1_html_HTMLOptGroupElement01
+level1_html_HTMLOptGroupElement02 level1_html_HTMLOptGroupElement02
+level1_html_HTMLOptionElement01 level1_html_HTMLOptionElement01
+level1_html_HTMLOptionElement02 level1_html_HTMLOptionElement02
+level1_html_HTMLOptionElement03 level1_html_HTMLOptionElement03
+level1_html_HTMLOptionElement04 level1_html_HTMLOptionElement04
+level1_html_HTMLOptionElement06 level1_html_HTMLOptionElement06
+level1_html_HTMLOptionElement07 level1_html_HTMLOptionElement07
+level1_html_HTMLOptionElement08 level1_html_HTMLOptionElement08
+level1_html_HTMLOptionElement09 level1_html_HTMLOptionElement09
+level1_html_HTMLSelectElement01 level1_html_HTMLSelectElement01
+level1_html_HTMLSelectElement02 level1_html_HTMLSelectElement02
+level1_html_HTMLSelectElement03 level1_html_HTMLSelectElement03
+level1_html_HTMLSelectElement04 level1_html_HTMLSelectElement04
+level1_html_HTMLSelectElement06 level1_html_HTMLSelectElement06
+level1_html_HTMLSelectElement07 level1_html_HTMLSelectElement07
+level1_html_HTMLSelectElement08 level1_html_HTMLSelectElement08
+level1_html_HTMLSelectElement09 level1_html_HTMLSelectElement09
+level1_html_HTMLSelectElement10 level1_html_HTMLSelectElement10
+level1_html_HTMLSelectElement11 level1_html_HTMLSelectElement11
+level1_html_HTMLSelectElement12 level1_html_HTMLSelectElement12
+level1_html_HTMLSelectElement13 level1_html_HTMLSelectElement13
+level1_html_HTMLSelectElement14 level1_html_HTMLSelectElement14
+level1_html_HTMLSelectElement15 level1_html_HTMLSelectElement15
+level1_html_HTMLTextAreaElement01 level1_html_HTMLTextAreaElement01
+level1_html_HTMLTextAreaElement02 level1_html_HTMLTextAreaElement02
+level1_html_HTMLTextAreaElement03 level1_html_HTMLTextAreaElement03
+level1_html_HTMLTextAreaElement04 level1_html_HTMLTextAreaElement04
+level1_html_HTMLTextAreaElement05 level1_html_HTMLTextAreaElement05
+level1_html_HTMLTextAreaElement06 level1_html_HTMLTextAreaElement06
+level1_html_HTMLTextAreaElement07 level1_html_HTMLTextAreaElement07
+level1_html_HTMLTextAreaElement08 level1_html_HTMLTextAreaElement08
+level1_html_HTMLTextAreaElement09 level1_html_HTMLTextAreaElement09
+level1_html_HTMLTextAreaElement10 level1_html_HTMLTextAreaElement10
+level1_html_HTMLTextAreaElement11 level1_html_HTMLTextAreaElement11
+level1_html_HTMLTextAreaElement12 level1_html_HTMLTextAreaElement12
+level1_html_HTMLTextAreaElement13 level1_html_HTMLTextAreaElement13
+level1_html_HTMLTextAreaElement14 level1_html_HTMLTextAreaElement14
+level1_html_HTMLTextAreaElement15 level1_html_HTMLTextAreaElement15
+level1_html_HTMLTitleElement01 level1_html_HTMLTitleElement01
+level2_core_documentgetelementbyid01 level2_core_documentgetelementbyid01
+level2_core_documentgetelementsbytagnameNS02 level2_core_documentgetelementsbytagnameNS02
+level2_core_getElementById02 level2_core_getElementById02
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement01.xml
index d07454c..d07454c 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement01.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement02.xml
index bbf3153..bbf3153 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement02.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement03.xml
index 9cee3c4..9cee3c4 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement03.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement04.xml
index 1923dd3..1923dd3 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement04.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement06.xml
index 2c00da4..2c00da4 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement06.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement07.xml
index 9218070..9218070 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement07.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement08.xml
index c5c6640..c5c6640 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement08.xml
diff --git a/test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement09.xml
index 064ccbe..064ccbe 100644
--- a/test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLOptionElement09.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement01.xml
index 3b08881..3b08881 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement01.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement02.xml
index f9e865d..f9e865d 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement02.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement03.xml
index 97d217c..97d217c 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement03.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement04.xml
index 11ff6ee..11ff6ee 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement04.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement05.xml.int-broken
index 16c78e1..16c78e1 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement05.xml.int-broken
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement06.xml
index 8ff66a0..8ff66a0 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement06.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement07.xml
index 218b9d6..218b9d6 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement07.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement08.xml
index 12593fe..12593fe 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement08.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement09.xml
index 382510d..382510d 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement09.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement10.xml
index b9f5762..b9f5762 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement10.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement11.xml
index ebb4d1b..ebb4d1b 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement11.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement12.xml
index 5559f5d..5559f5d 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement12.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement13.xml
index 2c0aafb..2c0aafb 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement13.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement14.xml
index df22987..df22987 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement14.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement15.xml
index dcc2f6d..dcc2f6d 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement15.xml
diff --git a/test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement17.xml.int-broken
index 03549ff..03549ff 100644
--- a/test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail
+++ b/test/testcases/tests/level1/html/HTMLSelectElement17.xml.int-broken
diff --git a/test/testutils/foreach.c b/test/testutils/foreach.c
index e068201..05d7f2a 100644
--- a/test/testutils/foreach.c
+++ b/test/testutils/foreach.c
@@ -34,6 +34,11 @@ void foreach_initialise_domnamednodemap(dom_namednodemap *map, unsigned int *ite
*iterator = 0;
}
+void foreach_initialise_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator)
+{
+ (void)coll;
+ *iterator = 0;
+}
bool _get_next_domnodelist(dom_nodelist *list, unsigned int *iterator, dom_node **ret)
{
@@ -97,3 +102,24 @@ bool _get_next_domnamednodemap(dom_namednodemap *map, unsigned int *iterator, do
return true;
}
+
+bool _get_next_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator, dom_node **ret)
+{
+ dom_exception err;
+ uint32_t len;
+
+ err = dom_html_collection_get_length(coll, &len);
+ if (err != DOM_NO_ERR)
+ return false;
+
+ if (*iterator >= len)
+ return false;
+
+ err = dom_html_collection_item(coll, (*iterator), ret);
+ if (err != DOM_NO_ERR)
+ return false;
+
+ (*iterator)++;
+
+ return true;
+}
diff --git a/test/testutils/foreach.h b/test/testutils/foreach.h
index 75874bc..aa9543d 100644
--- a/test/testutils/foreach.h
+++ b/test/testutils/foreach.h
@@ -26,6 +26,7 @@
void foreach_initialise_domnodelist(dom_nodelist *list, unsigned int *iterator);
void foreach_initialise_list(list *list, unsigned int *iterator);
void foreach_initialise_domnamednodemap(dom_namednodemap *map, unsigned int *iterator);
+void foreach_initialise_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator);
bool _get_next_domnodelist(dom_nodelist *list, unsigned int *iterator, dom_node **ret);
#define get_next_domnodelist(l, i, r) _get_next_domnodelist( \
@@ -37,5 +38,8 @@ bool _get_next_domnamednodemap(dom_namednodemap *map, unsigned int *iterator, do
#define get_next_domnamednodemap(m, i, r) _get_next_domnamednodemap( \
(dom_namednodemap *) (m), (unsigned int *) (i), (dom_node **) (r))
+bool _get_next_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator, dom_node **ret);
+#define get_next_domhtmlcollection(c, i, r) _get_next_domhtmlcollection( \
+ (dom_html_collection *) (c), (unsigned int *) (i), (dom_node **) (r))
#endif