summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/html/html_button_element.c14
-rw-r--r--src/html/html_input_element.c14
-rw-r--r--src/html/html_text_area_element.c14
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;
}