diff options
Diffstat (limited to 'developer-weekend/may-2020.mdwn')
-rw-r--r-- | developer-weekend/may-2020.mdwn | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/developer-weekend/may-2020.mdwn b/developer-weekend/may-2020.mdwn index f8e7333..85113d0 100644 --- a/developer-weekend/may-2020.mdwn +++ b/developer-weekend/may-2020.mdwn @@ -68,6 +68,39 @@ Topics * Text layout (maybe). * Selection cleanups. +Write ups +========= + +Current Forms Handling +---------------------- + +### DOM / Gadget syncronisation + +Currently both the DOM and the NetSurf gadget for form input elements +store a representation of the current state of the form element. +JavaScript can modifiy the representation in the DOM. Users can +modifiy the repreentation in the form gadget. + +There is a `form_gadget_sync_with_dom()` in NetSurf's `form.c`. +This syncronises the data both ways. If the DOM has changed, then +the gadget representation is updated, and if the gadget has changed +then the DOM is updated. If both have changed, the gadget version +wins. + +The `form_gadget_sync_with_dom()` is called from: + +* **[html/dom_event.c]** The DOMSubtreeModified callback. +* **[html/form.c]** The `form_gadget_update_value()` function, which is called + from: + * **[html/box_textarea.c]** The desktop/textarea widget callback for + TEXTAREA_MSG_TEXT_MODIFIED. + * **[html/html.c] The file upload handling in + `html_set_file_gadget_filename()`. +* **[html/forms.c]** The `parse_input_element` function, which ends up getting + called during box tree construction of the special box elements in + **[html/box_special.c]**. + + Tasks ===== |