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

Issue 159743002: Select when disabled should not allow value change and popup is disabled (Closed)

Created:
6 years, 10 months ago by Habib Virji
Modified:
6 years, 10 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

Do not change the value of a disabled SELECT element. parseAttributes closes popup when the element becomes disabled. We need to add some isDisabledFormControl checks to menuListDefaultEventHandler because user events can be delivered to disabled elements. R=tkent BUG=241079 TEST=automated Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167563

Patch Set 1 #

Total comments: 1

Patch Set 2 : Popup menu is not shown when select is disabled #

Patch Set 3 : Popup menu is not shown when select is disabled #

Total comments: 4

Patch Set 4 : Select disable attribute handling in parseAttribute #

Total comments: 6

Patch Set 5 : Review comments update #

Patch Set 6 : Test updates for running on mac #

Patch Set 7 : Different expected file for mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -6 lines) Patch
M LayoutTests/fast/forms/select/select-disabled.html View 1 2 3 4 5 3 chunks +30 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/select/select-disabled-expected.txt View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
A + LayoutTests/platform/mac/fast/forms/select/select-disabled-expected.txt View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 2 3 4 5 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Habib Virji
Select when disabled should not allow value change A check if current element is select ...
6 years, 10 months ago (2014-02-11 14:05:04 UTC) #1
tkent
https://codereview.chromium.org/159743002/diff/1/Source/core/html/HTMLOptionElement.cpp File Source/core/html/HTMLOptionElement.cpp (right): https://codereview.chromium.org/159743002/diff/1/Source/core/html/HTMLOptionElement.cpp#newcode335 Source/core/html/HTMLOptionElement.cpp:335: status = ownerSelectElement()->isDisabledOrReadOnly(); We can't do this change. This ...
6 years, 10 months ago (2014-02-12 08:15:43 UTC) #2
tkent
> BUG=241079 The bug number is wrong.
6 years, 10 months ago (2014-02-12 08:17:49 UTC) #3
tkent
On 2014/02/12 08:17:49, tkent wrote: > > BUG=241079 > > The bug number is wrong. ...
6 years, 10 months ago (2014-02-12 08:18:28 UTC) #4
Habib Virji
Is then bug invalid?
6 years, 10 months ago (2014-02-12 19:31:34 UTC) #5
tkent
On 2014/02/12 19:31:34, Habib Virji wrote: > Is then bug invalid? The bug is valid. ...
6 years, 10 months ago (2014-02-14 00:06:44 UTC) #6
Habib Virji
On 2014/02/14 00:06:44, tkent wrote: > On 2014/02/12 19:31:34, Habib Virji wrote: > > Is ...
6 years, 10 months ago (2014-02-14 16:55:15 UTC) #7
tkent
https://codereview.chromium.org/159743002/diff/140001/LayoutTests/fast/forms/select/select-disabled.html File LayoutTests/fast/forms/select/select-disabled.html (right): https://codereview.chromium.org/159743002/diff/140001/LayoutTests/fast/forms/select/select-disabled.html#newcode59 LayoutTests/fast/forms/select/select-disabled.html:59: select3.blur(); blur() closes the popup. So this test makes ...
6 years, 10 months ago (2014-02-17 00:14:30 UTC) #8
Habib Virji
parseAttributes handles closing of popup if visible and setting validity flag for FormControl. isDisabledFormControl() is ...
6 years, 10 months ago (2014-02-18 10:23:21 UTC) #9
tkent
Correction: If isDisabledFormControl() returns true, only mouse events are not delivered to the element. It ...
6 years, 10 months ago (2014-02-19 04:17:51 UTC) #10
Habib Virji
Updated as per review comments. https://codereview.chromium.org/159743002/diff/240001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/159743002/diff/240001/Source/core/html/HTMLSelectElement.cpp#newcode306 Source/core/html/HTMLSelectElement.cpp:306: setNeedsWillValidateCheck(); On 2014/02/19 04:17:51, ...
6 years, 10 months ago (2014-02-19 08:26:43 UTC) #11
tkent
The test failed on Mac. https://storage.googleapis.com/chromium-layout-test-archives/mac_blink_rel/19142/layout-test-results/fast/forms/select/select-disabled-pretty-diff.html
6 years, 10 months ago (2014-02-19 14:05:03 UTC) #12
Habib Virji
On 2014/02/19 14:05:03, tkent wrote: > The test failed on Mac. > https://storage.googleapis.com/chromium-layout-test-archives/mac_blink_rel/19142/layout-test-results/fast/forms/select/select-disabled-pretty-diff.html I have ...
6 years, 10 months ago (2014-02-19 15:27:27 UTC) #13
tkent
lgtm. > Select disable attribute handling in parseAttribute We should summarize what this CL changes ...
6 years, 10 months ago (2014-02-21 00:56:16 UTC) #14
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 10 months ago (2014-02-21 01:01:01 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/159743002/440001
6 years, 10 months ago (2014-02-21 01:01:08 UTC) #16
commit-bot: I haz the power
Change committed as 167563
6 years, 10 months ago (2014-02-21 03:09:26 UTC) #17
Habib Virji
6 years, 10 months ago (2014-02-21 09:20:25 UTC) #18
Message was sent while issue was closed.
On 2014/02/21 00:56:16, tkent wrote:
> lgtm.
> 
> > Select disable attribute handling in parseAttribute
> 
> We should summarize what this CL changes in the first line of the CL
> description.  If the CL changes a behavior, the behavior change should be
> summarized.
> 
> I'd say "Do not change SELECT value if the SELECT element is disabled" or "Fix
a
> bug that users can update the value of a disabled SELECT."
> 
> I'll update the CL description, and send this to CQ.

Thank tkent, will keep in mind for other issues. 
"Select disable attribute handling in parseAttribute" was actually my commit
line.

Powered by Google App Engine
This is Rietveld 408576698