Bug 276590

Summary: Make`form` (HTMLFormElement) nullable across HTML Interfaces consistently
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: annevk, rniwa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Ahmad Saleem
Reported 2024-07-14 07:19:09 PDT
Hi Team, While looking into `form` in IDL files used, it is not nullable across all. > (HTMLTextAreaElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLTextAreaElement.idl#29 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmltextareaelement > (HTMLOptionElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLOptionElement.idl#28 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmloptionelement > (HTMLObjectElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLObjectElement.idl#25 Spec - https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmlobjectelement > (HTMLLegendElement) [HTMLLegendElement.idl](https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLLegendElement.idl#24) Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmllegendelement > (HTMLLabelElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLLabelElement.idl#24 Spec - https://html.spec.whatwg.org/multipage/forms.html#htmllabelelement > (HTMLInputElement) - https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLInputElement.idl#34 Spec - https://html.spec.whatwg.org/multipage/input.html#htmlinputelement > (HTMLFieldsetElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLFieldSetElement.idl#24 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmlfieldsetelement > (HTMLButtonElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLInputElement.idl#34 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmlbuttonelement ___ Just wanted to raise so we can track and fix it. Thanks!
Attachments
Anne van Kesteren
Comment 1 2024-07-15 09:38:16 PDT
So > document.createElement("textarea").form == null is true, so this already works well. I suppose an ideal fix would be to fix the binding layer to not allow for returning nullptr when IDL does not allow for that. I.e., make the following in combination with HTMLTextAreaElement's current IDL not compile: > HTMLFormElement* form() const { return m_form.get(); }
Radar WebKit Bug Importer
Comment 2 2024-07-21 07:20:15 PDT
Note You need to log in before you can comment on or make changes to this bug.