Bug 183510 - [GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage::will-submit-form
Summary: [GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Reported: 2018-03-09 03:50 PST by Carlos Garcia Campos
Modified: 2018-03-09 06:41 PST (History)
5 users (show)

See Also:

Patch (7.44 KB, patch)
2018-03-09 03:53 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2018-03-09 03:50:11 PST
In 2.22 WebKitDOMHTMLFormElement will be deprecated in GTK+ port and won't still exist in WPE. The new JavaScript GLib API will be used to replace most of the DOM API, but a few classes will remain with a minimal API for things that can't be done with JavaScript. WebKitDOMElement will stay and will be added to WPE as well, so if we change the signal parameter to WebKitDOMElement we will be able to keep using WebKitWebPage::will-submit-form without any changes. WPE will gain this signal and the rest of the API that uses DOM. We need to do this before 2.20, since this is new API.
Comment 1 Carlos Garcia Campos 2018-03-09 03:53:16 PST
Created attachment 335416 [details]
Comment 2 EWS Watchlist 2018-03-09 03:55:39 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2018-03-09 06:35:41 PST
Comment on attachment 335416 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=335416&action=review

> Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:594
> +     * @form: the #WebKitDOMElement to be submitted

the #WebKitDOMElement to be submitted, which will always correspond to an HTMLFormElement

> Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:385
> +    GUniquePtr<char> formID(webkit_dom_element_get_id(formElement));

Oops. I wish it was not transfer full. :( But I guess the ID can change at any time.
Comment 4 Carlos Garcia Campos 2018-03-09 06:41:14 PST
Committed r229461: <https://trac.webkit.org/changeset/229461>