[[!meta title="Developer Weekend (May 2020)"]] [[!meta author="NetSurf Developers"]] [[!meta date="2020-05-22 09:00:00"]] [[!toc]] Attendees ========= * Michael Drake * Vincent Sanders * Daniel Silverstone Outstanding work (from Feb) =========================== * General * Implement any appropriate auto fill auth handlers **IGNORING** * Continue styling the generated query pages. (Michael) **DONE** * Review TODOs. **IGNORING** * Framebuffer * Listing of compiled-in surfaces (Daniel) **DONE** * Internationalisation * Framebuffer front end. * Translations of all messages for the SSL/privacy internal query page. * Translations of all messages for the authentication internal query page. * Short of finding a native speaker there's not a lot we can do. **Nothing** * Text layout - Continue implementing. (Michael) * Release 3.10 * Which means do the work first needed to complete it * And then do Debian package releases, including removing framebuffer from Debian. * Events * Michael to do more UI event support in NetSurf **SHITCANNED** Pathway to 3.10 =============== * Complete RISC OS frontend support for pageinfo core window (vince) **DONE** * Add url to about:query/ssl to launch cert viewer (the link needs _blank) (Daniel) **DONE** * excise sslcert_viewer entirely (Daniel) **DONE** * Monkey doesn't need it, excise from farmer and driver **DONE** * Remove cert_verify from the `gui_misc_table` **DONE** * Email to developer list to say this has been done and that frontends will need to add padlock and page_info support **DONE** * [[!bug 2752]] Building without openssl: acknowledged and assigned to Daniel. **DONE** * [[!bug 2754]] GTK history delete menu options: acknowledged and assigned to Daniel. **DONE** * [[!bug 2753]] RISC OS URL entry bug needs fixed. **DONE** Bug Triage ========== * [[!bug 2759]] To be closed when the web site doesn't mention MacOS any more. * [[!bug 2740]] Wikipedia has its scrollbar on BODY instead of HTML. * [[!bug 2755]] More Wikipedia scrollbars. * [[!bug 2752]] Building without openssl: acknowledged and assigned to Daniel. * [[!bug 2754]] GTK history delete menu options: acknowledged and assigned to Daniel. * [[!bug 2753]] RISC OS URL entry bug needs fixed. * [[!bug 2748]] Hubbub needs to know about these elements. * [[!bug 2742]] Closed; no change required. Topics ====== * HTML5 Canvas. * Text layout (maybe). * Selection cleanups. Write ups ========= Current Forms Handling ---------------------- ### DOM / Gadget synchronization 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 modify the representation in the DOM. Users can modify the representation in the form gadget. There is a `form_gadget_sync_with_dom()` in NetSurf's `form.c`. This synchronizes 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]**. ### NetSurf data structures The `box` structure has a "gadget" member, which is a `struct form_control` pointer. These gadget pointers are set to the corresponding form_control when the form_control is created during box construction. The `html` content contains a forms linked list. These are of type `struct form`. The linked list is created by `html_forms_get_forms()` in **[html/forms.c]**, called from `html_begin_conversion()` in **[html/html.c]**. Since box tree construction hasn't happened yet, this collects a list of forms which are empty, containing no form controls. The form controls are added to the form structures as the forms are created during box construction. Box construction happens later in the `dom_to_box` call in `html_finish_conversion`. The fact that the form controls are referenced in both the form structures and from the box gadget member, and the fact that they aren't ref-counted means that we often dare not free them. So they leak everywhere. It seems that the struct form is only created for the purposes of form submission; to collect all the gadgets associated with the form. Once more unto the breach dear friends… --------------------------------------- ### …or "how I learned to love HTML forms" The goal is to fully replace the current HTML form handling with proper DOM based forms. To do this we need to resolve a number of operations. 1. Every kind of input element and so on needs its DOM behaviour writing if it is missing, or checking if it is present already 2. The form element needs to gain requisite methods for resetting and submitting which perform the flow including firing events as needed (or reacting to them) 3. The main HTML content needs to stop having a form construct entirely, instead deferring to the DOM in all matters form-related 4. Gadgets should be owned by the boxes and should entirely operate by means of the DOM nodes associated with their boxes. 5. The DOM becomes the canonical source of data. If the DOM changes, then the gadgets react. If the gadgets wish to change the DOM then they push their changed data into the DOM and cope if the DOM doesn't do entirely as they expected. The final part is perhaps the hardest. It will require gadget implementations to register as event listeners on the dom nodes in question and cope with them changing. Done properly this will allow JS to change the options in a select gadget at runtime etc. An early part of dynamic content. The various elements' specifications are here: * [Categories of elements](https://www.w3.org/TR/2017/REC-html52-20171214/sec-forms.html#form-categories) such as form-associated, reassociatable, submittable, labelable, etc. * [`
`](https://www.w3.org/TR/2017/REC-html52-20171214/sec-forms.html#the-form-element) * [`