[Webkit-unassigned] [Bug 234069] New: A FormData constructed in the form's submit event listener shouldn't include the submitter
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 8 23:37:48 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=234069
Bug ID: 234069
Summary: A FormData constructed in the form's submit event
listener shouldn't include the submitter
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
Assignee: webkit-unassigned at lists.webkit.org
Reporter: andreu at andreubotella.com
CC: cdumez at apple.com, wenson_hsieh at apple.com
WPT test: https://wpt.fyi/results/html/semantics/forms/form-submission-0/constructing-form-data-set.html?label=experimental&label=master&aligned
In the spec, the "construct the entry list" algorithm is passed an optional "submitter" argument, which it uses to determine whether to include a button in the entry list. And the FormData constructor calls "construct the entry list" with no optional parameters. But in WebKit, a FormData object constructed in the form's submit event listener will contain the submitter in its entry list.
This happens because in WebKit, the submitter is tracked by setting an input's m_isActivatedSubmit state, and when submit buttons are activated, the state is set, the form is submitted, and the state is then unset (in HTMLButtonElement::defaultEventHandler, ImageInputType::handleDOMActivateEvent, SubmitInputType::handleDOMActivateEvent). So the submitter state stays on during the entire form submission algorithm, including when firing the submit event.
However, it seems like HTMLFormElement::submit also sets the submitter's m_isActivatedSubmit state, since otherwise no submitter would show up for implicit submission and form.requestSubmit() with no arguments. So it seems like setting the state in the activation handlers would be unnecessary.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211209/32711819/attachment-0001.htm>
More information about the webkit-unassigned
mailing list