Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 50e8add8f41ac813e0d4c20666232f324651667f
https://github.com/WebKit/WebKit/commit/50e8add8f41ac813e0d4c20666232f324651667f
Author: Arno Renevier <[email protected]>
Date: 2025-07-22 (Tue, 22 Jul 2025)
Changed paths:
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm
Log Message:
-----------
Use JS API setUserInfo to attach metadata to an element during form submission
rdar://155269655
https://bugs.webkit.org/show_bug.cgi?id=296279
Reviewed by Alex Christensen.
When calling _WKInputDelegate.willSubmitFormValues
FormClient.willSubmitForm (and related), the only way to set the
userObject currently, is to use injected bundle.
Instead, we attach the userInfo object. This will allow scripts in
worlds with with the allowElementUserInfo to attach metadata to the
form.
Also, we expose setAllowElementUserInfo configuration to injected bundle
world, to allow applications still using injected bundle to switch to
this new API.
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldSetAllowElementUserInfo):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchWillSubmitForm):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(-[InputDelegateForFormSubmission
_webView:willSubmitFormValues:userObject:submissionHandler:]):
(TEST(WKUserContentController, FormSubmissionWithUserInfo)):
Canonical link: https://commits.webkit.org/297743@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes