diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-22 19:45:47 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-07-22 19:45:47 +0100 |
commit | 542b8cb8feba8f15497eecf31cac53a7f4b17add (patch) | |
tree | 2b2150f5e8222a7decb6005c6421d8bf604011b3 /src | |
parent | eb303585cb38c7bbea7e7d7cafab4d0ea0884023 (diff) | |
download | libdom-542b8cb8feba8f15497eecf31cac53a7f4b17add.tar.gz libdom-542b8cb8feba8f15497eecf31cac53a7f4b17add.tar.bz2 |
HTML{TextArea,Input,Button}Element: Do not ref the form, refs are for outside libdom
Diffstat (limited to 'src')
-rw-r--r-- | src/html/html_button_element.c | 14 | ||||
-rw-r--r-- | src/html/html_input_element.c | 14 | ||||
-rw-r--r-- | src/html/html_text_area_element.c | 14 |
3 files changed, 0 insertions, 42 deletions
diff --git a/src/html/html_button_element.c b/src/html/html_button_element.c index 4a73fcf..68cb1a5 100644 --- a/src/html/html_button_element.c +++ b/src/html/html_button_element.c @@ -74,11 +74,6 @@ dom_exception _dom_html_button_element_initialise(struct dom_html_document *doc, */ void _dom_html_button_element_finalise(struct dom_html_button_element *ele) { - if (ele->form != NULL) { - dom_node_unref(ele->form); - ele->form = NULL; - } - _dom_html_element_finalise(&ele->base); } @@ -228,17 +223,8 @@ dom_exception dom_html_button_element_get_form( dom_exception _dom_html_button_element_set_form( dom_html_button_element *button, dom_html_form_element *form) { - if (button->form == form) - return DOM_NO_ERR; - - if (button->form != NULL) - dom_node_unref(button->form); - button->form = form; - if (button->form != NULL) - dom_node_ref(button->form); - return DOM_NO_ERR; } diff --git a/src/html/html_input_element.c b/src/html/html_input_element.c index ee75a64..aa3e05f 100644 --- a/src/html/html_input_element.c +++ b/src/html/html_input_element.c @@ -83,11 +83,6 @@ void _dom_html_input_element_finalise(struct dom_html_input_element *ele) ele->default_value = NULL; } - if (ele->form != NULL) { - dom_node_unref(ele->form); - ele->form = NULL; - } - _dom_html_element_finalise(&ele->base); } @@ -402,17 +397,8 @@ dom_exception dom_html_input_element_get_form( dom_exception _dom_html_input_element_set_form( dom_html_input_element *input, dom_html_form_element *form) { - if (input->form == form) - return DOM_NO_ERR; - - if (input->form != NULL) - dom_node_unref(input->form); - input->form = form; - if (input->form != NULL) - dom_node_ref(input->form); - return DOM_NO_ERR; } diff --git a/src/html/html_text_area_element.c b/src/html/html_text_area_element.c index 0234076..cb95920 100644 --- a/src/html/html_text_area_element.c +++ b/src/html/html_text_area_element.c @@ -90,11 +90,6 @@ void _dom_html_text_area_element_finalise(struct dom_html_text_area_element *ele ele->value_set = false; } - if (ele->form != NULL) { - dom_node_unref(ele->form); - ele->form = NULL; - } - _dom_html_element_finalise(&ele->base); } @@ -425,17 +420,8 @@ dom_exception dom_html_text_area_element_get_form( dom_exception _dom_html_text_area_element_set_form( dom_html_text_area_element *text_area, dom_html_form_element *form) { - if (text_area->form == form) - return DOM_NO_ERR; - - if (text_area->form != NULL) - dom_node_unref(text_area->form); - text_area->form = form; - if (text_area->form != NULL) - dom_node_ref(text_area->form); - return DOM_NO_ERR; } |