From 1cca41793dd6acc052bae2f1464eedd094c84f58 Mon Sep 17 00:00:00 2001 From: rsk1994 Date: Tue, 3 Jun 2014 10:53:17 +0530 Subject: changing size attribute of Input Element to be of type int --- include/dom/html/html_input_element.h | 4 +- src/html/TODO | 2 +- src/html/html_input_element.c | 14 ++++++- .../tests/level2/html/HTMLInputElement13.xml | 43 ++++++++++++++++++++++ .../tests/level2/html/HTMLInputElement13.xml.kfail | 43 ---------------------- 5 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 test/testcases/tests/level2/html/HTMLInputElement13.xml delete mode 100644 test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail 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 b/test/testcases/tests/level2/html/HTMLInputElement13.xml new file mode 100644 index 0000000..e243035 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLInputElement13.xml @@ -0,0 +1,43 @@ + + + + + + +HTMLInputElement13 +NIST + + The size attribute contains the size information. Its precise meaning + is specific to each type of field. + + Retrieve the size attribute of the 1st INPUT element and examine + its value. + +Mary Brady +2001-12-26 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail b/test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail deleted file mode 100644 index e243035..0000000 --- a/test/testcases/tests/level2/html/HTMLInputElement13.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - -HTMLInputElement13 -NIST - - The size attribute contains the size information. Its precise meaning - is specific to each type of field. - - Retrieve the size attribute of the 1st INPUT element and examine - its value. - -Mary Brady -2001-12-26 - - - - - - - - - - - - - -- cgit v1.2.3