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

Issue 255163002: Dispatch change event for input type=checkbox when checked but value is null (Closed)

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

Description

Dispatch change event for input type=checkbox when checked but value is null Checkbox dispatches change event when checked and dispatch event is not based on value being null or not. BUG=366989 R=tkent,keishi1 Test=If value attribute is null, when checkbox is checked a change event is triggered. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173530

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removed input type check and instead using virtual function to check if input type is checkbox #

Total comments: 2

Patch Set 3 : Created virtual function to dispatch change event from input type checkbox and for other input typ… #

Patch Set 4 : shouldDispatchFormControlChangeEvent changed to return bool and returns based on the input type #

Patch Set 5 : "Fix compilation error on Windows and MAC" #

Total comments: 6

Patch Set 6 : Updated shouldDispatchFormControlChangeEvent in radio input type. #

Patch Set 7 : Added tests for Radio to check onchange event trigger #

Total comments: 6

Patch Set 8 : Moved shouldDispatchFormControlChangeEvent as private/protected function and moved shouldDispatch t… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -4 lines) Patch
M LayoutTests/fast/forms/checkbox-onchange.html View 2 chunks +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/checkbox-onchange-expected.txt View 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/forms/radio/radio-onchange.html View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/radio/radio-onchange-expected.txt View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/html/HTMLInputElement.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTextFormControlElement.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTextFormControlElement.cpp View 1 2 3 4 5 1 chunk +8 lines, -2 lines 0 comments Download
M Source/core/html/forms/BaseCheckableInputType.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/BaseCheckableInputType.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/forms/InputType.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/forms/InputType.cpp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Habib Virji
6 years, 7 months ago (2014-04-29 12:54:58 UTC) #1
tkent
https://codereview.chromium.org/255163002/diff/1/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/1/Source/core/html/HTMLTextFormControlElement.cpp#newcode187 Source/core/html/HTMLTextFormControlElement.cpp:187: if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value()) || (type() == "checkbox" && m_textAsOfLastFormControlChangeEvent ...
6 years, 7 months ago (2014-04-29 23:43:40 UTC) #2
Habib Virji
On 2014/04/29 23:43:40, tkent wrote: > https://codereview.chromium.org/255163002/diff/1/Source/core/html/HTMLTextFormControlElement.cpp > File Source/core/html/HTMLTextFormControlElement.cpp (right): > > https://codereview.chromium.org/255163002/diff/1/Source/core/html/HTMLTextFormControlElement.cpp#newcode187 > ...
6 years, 7 months ago (2014-05-01 10:42:44 UTC) #3
keishi
https://codereview.chromium.org/255163002/diff/20001/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/20001/Source/core/html/HTMLTextFormControlElement.cpp#newcode192 Source/core/html/HTMLTextFormControlElement.cpp:192: if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value()) || (isCheckbox() && m_textAsOfLastFormControlChangeEvent != value())) ...
6 years, 7 months ago (2014-05-02 07:44:54 UTC) #4
Habib Virji
Thanks keishi. Done as suggested. https://codereview.chromium.org/255163002/diff/20001/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/20001/Source/core/html/HTMLTextFormControlElement.cpp#newcode192 Source/core/html/HTMLTextFormControlElement.cpp:192: if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, value()) || ...
6 years, 7 months ago (2014-05-02 15:07:39 UTC) #5
keishi
On 2014/05/02 15:07:39, Habib Virji wrote: > Thanks keishi. Done as suggested. > > https://codereview.chromium.org/255163002/diff/20001/Source/core/html/HTMLTextFormControlElement.cpp ...
6 years, 7 months ago (2014-05-02 15:58:33 UTC) #6
Habib Virji
On 2014/05/02 15:58:33, keishi1 wrote: > On 2014/05/02 15:07:39, Habib Virji wrote: > > Thanks ...
6 years, 7 months ago (2014-05-02 16:07:05 UTC) #7
Habib Virji
On 2014/05/02 15:58:33, keishi1 wrote: > On 2014/05/02 15:07:39, Habib Virji wrote: > > Thanks ...
6 years, 7 months ago (2014-05-02 16:34:38 UTC) #8
Habib Virji
@keishi: Are the updates okay?
6 years, 7 months ago (2014-05-06 11:09:41 UTC) #9
tkent
Do we have a similar bug for type=radio? If so, we should fix it too.
6 years, 7 months ago (2014-05-07 01:23:37 UTC) #10
tkent
https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp#newcode193 Source/core/html/HTMLTextFormControlElement.cpp:193: if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, newValue) The equalIgnoringNullity check should be in ...
6 years, 7 months ago (2014-05-07 01:24:56 UTC) #11
keishi
https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp#newcode193 Source/core/html/HTMLTextFormControlElement.cpp:193: if (!equalIgnoringNullity(m_textAsOfLastFormControlChangeEvent, newValue) I think equalIgnoringNullity is part of ...
6 years, 7 months ago (2014-05-07 01:26:11 UTC) #12
Habib Virji
On 2014/05/07 01:23:37, tkent wrote: > Do we have a similar bug for type=radio? If ...
6 years, 7 months ago (2014-05-07 10:05:31 UTC) #13
Habib Virji
Thanks Keishi and Tkent, code updated as suggested. https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp File Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/255163002/diff/80001/Source/core/html/HTMLTextFormControlElement.cpp#newcode193 Source/core/html/HTMLTextFormControlElement.cpp:193: if ...
6 years, 7 months ago (2014-05-07 10:06:39 UTC) #14
tkent
https://codereview.chromium.org/255163002/diff/120001/Source/core/html/HTMLInputElement.h File Source/core/html/HTMLInputElement.h (right): https://codereview.chromium.org/255163002/diff/120001/Source/core/html/HTMLInputElement.h#newcode282 Source/core/html/HTMLInputElement.h:282: virtual bool shouldDispatchFormControlChangeEvent(String&, String&) OVERRIDE; This should be private. ...
6 years, 7 months ago (2014-05-07 10:09:56 UTC) #15
Habib Virji
Done. Thanks. https://codereview.chromium.org/255163002/diff/120001/Source/core/html/HTMLInputElement.h File Source/core/html/HTMLInputElement.h (right): https://codereview.chromium.org/255163002/diff/120001/Source/core/html/HTMLInputElement.h#newcode282 Source/core/html/HTMLInputElement.h:282: virtual bool shouldDispatchFormControlChangeEvent(String&, String&) OVERRIDE; On 2014/05/07 ...
6 years, 7 months ago (2014-05-07 10:27:09 UTC) #16
tkent
lgtm
6 years, 7 months ago (2014-05-07 13:49:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/255163002/130001
6 years, 7 months ago (2014-05-07 13:50:24 UTC) #18
commit-bot: I haz the power
6 years, 7 months ago (2014-05-07 14:32:57 UTC) #19
Message was sent while issue was closed.
Change committed as 173530

Powered by Google App Engine
This is Rietveld 408576698