Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 2342153003: Merge "submit() in submit event handler should not contains a value of a submit button." to M54 bra… (Closed)

Created:
4 years, 3 months ago by tkent
Modified:
4 years, 3 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2840
Project:
chromium
Visibility:
Public.

Description

Merge "submit() in submit event handler should not contains a value of a submit button." to M54 branch The value of a submit button is appended to a FormData if its activatedSubmit flag is set. In a case of form.submit() is called in submit event handler, we did: 1. Set activatedSubmit flag of the submit button 2. Dispatch submit event 2.1. form.submit() builds FormData 3. Build FormData if the submit event was not prevented 4. Clear activatedSubmit flag of the submit button In step 2.1, we should not include the submit button. So, this CL changes the process as follows: 1. Dispatch submit event 1.1 form.submit() builds FormData 2. If the submit event was not prevented, 2.1. Set activatedSubmit flag of the submit button 2.2. Build FormData 2.3. Clear activatedSubmit flag of the submit button Implementation: We called setActivatedSubmit() before/after prepareForSubmission(). Instead, we pass a submit button element to prepareForSubmission(), and call setActivatedSubmit() just before/after building FormData. BUG=646790 Review-Url: https://codereview.chromium.org/2340213002 Cr-Commit-Position: refs/heads/master@{#419073} (cherry picked from commit 864df709bb6b675152537a276723c2d0a8757e48) Committed: https://chromium.googlesource.com/chromium/src/+/f8be4fbd37d679e362c0eac49098fa913dc51ef3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -60 lines) Patch
A third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html View 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLButtonElement.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormElement.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormElement.cpp View 8 chunks +20 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/ImageInputType.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/SubmitInputType.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FormSubmission.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FormSubmission.cpp View 3 chunks +5 lines, -11 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
tkent
4 years, 3 months ago (2016-09-16 11:56:54 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
f8be4fbd37d679e362c0eac49098fa913dc51ef3.

Powered by Google App Engine
This is Rietveld 408576698