summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsk1994 <rsk1coder99@gmail.com>2014-06-03 05:23:17 (GMT)
committer Rupinder Singh Khokhar <rsk1coder99@gmail.com>2014-06-10 22:57:12 (GMT)
commit862b8be1defce10068f3876aaaa8de8edf65b4ed (patch)
treeb1c21e4e15055cd38a8d714f1492a9bb160025c3
parentac0a6be4a62b2fa9830184def0652a499df1398b (diff)
downloadlibdom-862b8be1defce10068f3876aaaa8de8edf65b4ed.tar.gz
libdom-862b8be1defce10068f3876aaaa8de8edf65b4ed.tar.bz2
changing size attribute of Input Element to be of type int
-rw-r--r--include/dom/html/html_input_element.h4
-rw-r--r--src/html/TODO2
-rw-r--r--src/html/html_input_element.c14
-rw-r--r--test/testcases/tests/level2/html/HTMLInputElement13.xml (renamed from test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail)0
4 files changed, 16 insertions, 4 deletions
diff --git a/include/dom/html/html_input_element.h b/include/dom/html/html_input_element.h
index eb6aecd..086e1cb 100644
--- a/include/dom/html/html_input_element.h
+++ b/include/dom/html/html_input_element.h
@@ -85,10 +85,10 @@ dom_exception dom_html_input_element_set_read_only(
dom_html_input_element *input, bool read_only);
dom_exception dom_html_input_element_get_size(
- dom_html_input_element *input, dom_string **size);
+ dom_html_input_element *input, int32_t *size);
dom_exception dom_html_input_element_set_size(
- dom_html_input_element *input, dom_string *size);
+ dom_html_input_element *input, uint32_t size);
dom_exception dom_html_input_element_get_src(
dom_html_input_element *input, dom_string **src);
diff --git a/src/html/TODO b/src/html/TODO
index 6a3d190..e7d4853 100644
--- a/src/html/TODO
+++ b/src/html/TODO
@@ -15,7 +15,7 @@ HTMLFormElement html_form_element DONE
HTMLSelectElement html_select_element DONE
HTMLOptGroupElement html_optgroup_element DONE
HTMLOptionElement html_option_element DONE
-HTMLInputElement html_input_element MISSING
+HTMLInputElement html_input_element DONE
HTMLTextAreaElement html_textarea_element MISSING
HTMLButtonElement html_button_element MISSING
HTMLLabelElement html_label_element DONE
diff --git a/src/html/html_input_element.c b/src/html/html_input_element.c
index bab79f2..c4cfc05 100644
--- a/src/html/html_input_element.c
+++ b/src/html/html_input_element.c
@@ -349,12 +349,24 @@ SIMPLE_GET_SET(access_key);
SIMPLE_GET_SET(align);
SIMPLE_GET_SET(alt);
SIMPLE_GET_SET(name);
-SIMPLE_GET_SET(size);
SIMPLE_GET_SET(src);
SIMPLE_GET(type);
SIMPLE_GET_SET(use_map);
SIMPLE_GET_SET(value);
+dom_exception dom_html_input_element_get_size(
+ dom_html_input_element *input, int32_t *size)
+{
+ return dom_html_element_get_int32_t_property(&input->base, "size",
+ SLEN("size"), size);
+}
+
+dom_exception dom_html_input_element_set_size(
+ dom_html_input_element *input, uint32_t size)
+{
+ return dom_html_element_set_int32_t_property(&input->base, "size",
+ SLEN("size"), size);
+}
dom_exception dom_html_input_element_get_tab_index(
dom_html_input_element *input, int32_t *tab_index)
{
diff --git a/test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail b/test/testcases/tests/level2/html/HTMLInputElement13.xml
index e243035..e243035 100644
--- a/test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail
+++ b/test/testcases/tests/level2/html/HTMLInputElement13.xml