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

Issue 199633017: Blink doesnt respect the form.submit() when called on "focus" event for invalid form (Closed)

Created:
6 years, 9 months ago by harpreet.sk
Modified:
6 years, 8 months ago
Reviewers:
tkent, keishi
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Blink doesnt respect the form.submit() when called on "focus" event for invalid form Blink doent respect the form.submit() when called on focus event on invalid form. When an form submit button is clicked and if the form is invalid it will focus the field that shows error. If the user is calling the form.submit() on focus event on that field then it should submit the form. But currently the form does not get submitted. This patch removes this bug by completely removing the variable "m_isSubmittingOrPreparingForSubmission". Bug=357101 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170520

Patch Set 1 #

Patch Set 2 : Adding changes to rename variable #

Total comments: 3

Patch Set 3 : Removing variable "m_isSubmitting" completely and introducing new variable "m_invalidForm" #

Patch Set 4 : Removed the newly added variable "m_invalidForm" #

Patch Set 5 : Adding Layout Test #

Total comments: 2

Patch Set 6 : Removed unnecessary lines from Layout Test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -18 lines) Patch
A LayoutTests/fast/forms/submit-onFocus-invalidForm.html View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/submit-onFocus-invalidForm-expected.txt View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormElement.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 2 3 4 4 chunks +3 lines, -17 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
harpreet.sk
Please take a look.
6 years, 9 months ago (2014-03-24 11:27:09 UTC) #1
keishi
lgtm
6 years, 9 months ago (2014-03-25 01:28:49 UTC) #2
tkent
https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode293 Source/core/html/HTMLFormElement.cpp:293: if (!validateInteractively(event)) { Any JavaScript code can run in ...
6 years, 9 months ago (2014-03-25 01:56:42 UTC) #3
harpreet.sk
The coming patch will contain the changes mention in comment https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode293 ...
6 years, 9 months ago (2014-03-26 09:16:06 UTC) #4
tkent
https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode293 Source/core/html/HTMLFormElement.cpp:293: if (!validateInteractively(event)) { On 2014/03/26 09:16:07, harpreet.sk wrote: > ...
6 years, 9 months ago (2014-03-27 00:35:30 UTC) #5
harpreet.sk
On 2014/03/27 00:35:30, tkent wrote: > https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp > File Source/core/html/HTMLFormElement.cpp (right): > > https://codereview.chromium.org/199633017/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode293 > ...
6 years, 9 months ago (2014-03-27 07:27:59 UTC) #6
tkent
On 2014/03/27 07:27:59, harpreet.sk wrote: > Actually I was talking about the scenario as given ...
6 years, 9 months ago (2014-03-27 07:40:29 UTC) #7
harpreet.sk
On 2014/03/27 07:40:29, tkent wrote: > On 2014/03/27 07:27:59, harpreet.sk wrote: > > Actually I ...
6 years, 9 months ago (2014-03-27 08:11:52 UTC) #8
harpreet.sk
On 2014/03/27 08:11:52, harpreet.sk wrote: > On 2014/03/27 07:40:29, tkent wrote: > > On 2014/03/27 ...
6 years, 9 months ago (2014-03-27 10:11:21 UTC) #9
tkent
The code change looks good. We need a test.
6 years, 8 months ago (2014-03-31 07:18:05 UTC) #10
harpreet.sk
On 2014/03/31 07:18:05, tkent wrote: > The code change looks good. > We need a ...
6 years, 8 months ago (2014-03-31 12:46:08 UTC) #11
tkent
https://codereview.chromium.org/199633017/diff/90001/LayoutTests/fast/forms/submit-onFocus-invalidForm.html File LayoutTests/fast/forms/submit-onFocus-invalidForm.html (right): https://codereview.chromium.org/199633017/diff/90001/LayoutTests/fast/forms/submit-onFocus-invalidForm.html#newcode16 LayoutTests/fast/forms/submit-onFocus-invalidForm.html:16: function asyncTest(query) { This function and 'count' are unnecessary. ...
6 years, 8 months ago (2014-04-01 02:23:14 UTC) #12
harpreet.sk
Patch set 6 addresses the change asked in comment in patch set 5. Please take ...
6 years, 8 months ago (2014-04-01 05:46:07 UTC) #13
tkent
lgtm
6 years, 8 months ago (2014-04-01 05:50:34 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/199633017/100001
6 years, 8 months ago (2014-04-01 05:50:42 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 06:03:03 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-01 06:03:03 UTC) #17
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 8 months ago (2014-04-01 06:03:27 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/199633017/100001
6 years, 8 months ago (2014-04-01 06:03:32 UTC) #19
commit-bot: I haz the power
6 years, 8 months ago (2014-04-01 06:56:35 UTC) #20
Message was sent while issue was closed.
Change committed as 170520

Powered by Google App Engine
This is Rietveld 408576698