summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-02-05 16:50:26 (GMT)
committer Michael Drake <michael.drake@codethink.co.uk>2016-02-05 16:50:26 (GMT)
commitec5f036967d22c88c51606e091102afc9c6a1b44 (patch)
tree883509399f2bc0d372d2e9bdab9174b8fb515fe1
parent9f795a621007766624885e52fc914e1b1d0af2dc (diff)
downloadlibdom-ec5f036967d22c88c51606e091102afc9c6a1b44.tar.gz
libdom-ec5f036967d22c88c51606e091102afc9c6a1b44.tar.bz2
Fix: HTMLInputElement's copy constructor copies its specialised members.
-rw-r--r--src/html/html_input_element.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/html/html_input_element.c b/src/html/html_input_element.c
index dac2473..079b55e 100644
--- a/src/html/html_input_element.c
+++ b/src/html/html_input_element.c
@@ -335,6 +335,18 @@ dom_exception _dom_html_input_element_copy_internal(
return err;
}
+ /* TODO: We don't seem to keep a ref to form element, so just
+ * copy the pointer for now. */
+ new->form = old->form;
+
+ new->default_checked = old->default_checked;
+ new->default_checked_set = old->default_checked_set;
+ new->default_value = old->default_value == NULL ?
+ NULL : dom_string_ref(old->default_value);
+ new->default_value_set = old->default_value_set;
+ new->checked = old->checked;
+ new->checked_set = old->checked_set;
+
return DOM_NO_ERR;
}