[Webkit-unassigned] [Bug 77520] New: [WK2] Modify parameters of willSubmitForm callback
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 1 01:09:22 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=77520
Summary: [WK2] Modify parameters of willSubmitForm callback
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Enhancement
Priority: P2
Component: WebKit2
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: g.czajkowski at samsung.com
There is useful callback WKPageWillSubmitFormCallback to notify an application when submit button was clicked.
This callback provides through its parameters values of input fields by WKDictionaryRef type where key is a name of input field and value is a typed text to input field.
I see three disadvantages of it:
1. Input fields information is keep in hashmap, so they are not keep in order as they occur on page. Application can’t determine order of input fields based on passed hashmap.
2. Type of input fields are not passed (like password, text), we have only its name.
3. HashMap for given key returns typed text to an input field not a default one. Input field's value attribute is reserved for default value of it. It may confuse a developer.
I wouldn't limit input fields information to theirs names and typed text only.
What do you think about passing WKArrayRef<WKDictionary> instead of WKDictionaryRef where each item of array will contain all attributes of input fields as key-value?
Additionally we can add form attributes as WKDictionary to the callback to identify form from submit button was clicked.
I am aware that this patch changes API of WK2 but anyway I'd be glad to hear your opinion about it.
If anyone still wants to use previous values of input fields there is possibility to receive them from injectedBundleFormClient.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list