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

Issue 2900943002: Clicking a button on disconnected form should not fire submit event. (Closed)

Created:
3 years, 7 months ago by Shanmuga Pandi
Modified:
3 years, 7 months ago
Reviewers:
tkent, fs
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clicking a button on disconnected form should not fire submit event. Add a isConnected() check in HTMLFormElement::PrepareForSubmission to avoid firing the submit events. BUG=723004 Review-Url: https://codereview.chromium.org/2900943002 Cr-Commit-Position: refs/heads/master@{#474476} Committed: https://chromium.googlesource.com/chromium/src/+/cad664141c2aed77dd0049928c1c9d004cce72a0

Patch Set 1 #

Total comments: 2

Patch Set 2 : Align with review comments #

Total comments: 2

Patch Set 3 : added console message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -12 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-dispatch-click-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-button-element/button-click-submits-expected.txt View 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormElement.cpp View 1 2 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
Shanmuga Pandi
PTAL!! Thanks
3 years, 7 months ago (2017-05-23 06:41:34 UTC) #2
tkent
https://codereview.chromium.org/2900943002/diff/1/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp File third_party/WebKit/Source/core/html/HTMLButtonElement.cpp (right): https://codereview.chromium.org/2900943002/diff/1/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp#newcode108 third_party/WebKit/Source/core/html/HTMLButtonElement.cpp:108: if (!isConnected()) Here is not a right place to ...
3 years, 7 months ago (2017-05-23 06:55:26 UTC) #3
Shanmuga Pandi
https://codereview.chromium.org/2900943002/diff/1/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp File third_party/WebKit/Source/core/html/HTMLButtonElement.cpp (right): https://codereview.chromium.org/2900943002/diff/1/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp#newcode108 third_party/WebKit/Source/core/html/HTMLButtonElement.cpp:108: if (!isConnected()) On 2017/05/23 06:55:26, tkent wrote: > Here ...
3 years, 7 months ago (2017-05-23 10:34:05 UTC) #5
tkent
https://codereview.chromium.org/2900943002/diff/20001/third_party/WebKit/Source/core/html/HTMLFormElement.cpp File third_party/WebKit/Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/2900943002/diff/20001/third_party/WebKit/Source/core/html/HTMLFormElement.cpp#newcode287 third_party/WebKit/Source/core/html/HTMLFormElement.cpp:287: (submit_button && !submit_button->isConnected())) You don't need to check isConnected() ...
3 years, 7 months ago (2017-05-23 23:32:52 UTC) #6
Shanmuga Pandi
https://codereview.chromium.org/2900943002/diff/20001/third_party/WebKit/Source/core/html/HTMLFormElement.cpp File third_party/WebKit/Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/2900943002/diff/20001/third_party/WebKit/Source/core/html/HTMLFormElement.cpp#newcode287 third_party/WebKit/Source/core/html/HTMLFormElement.cpp:287: (submit_button && !submit_button->isConnected())) On 2017/05/23 23:32:52, tkent wrote: > ...
3 years, 7 months ago (2017-05-24 07:09:54 UTC) #7
foolip
I'll be OOO for a while, leaving this to the other reviewers.
3 years, 7 months ago (2017-05-24 11:58:29 UTC) #13
tkent
lgtm
3 years, 7 months ago (2017-05-24 22:35:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2900943002/40001
3 years, 7 months ago (2017-05-24 22:35:53 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 23:40:51 UTC) #19
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/cad664141c2aed77dd0049928c1c...

Powered by Google App Engine
This is Rietveld 408576698