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

Issue 189543012: Update <select> when any of its <option> children has "display: none" (Closed)

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

Description

Update <select> when any of its <option>/<optgroup> children have "display: none" The <select> element does not ignore the <option>/<optgroup> children that have "display:none". Conseqently, these children are displayed on the list. Code has been added to detect the change in display property and also to drop <option>/<optgroup> children whenever required. BUG=81415 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171457

Patch Set 1 : WIP #

Patch Set 2 : WIP 2 #

Patch Set 3 : Rebase + Layout Testcase #

Total comments: 12

Patch Set 4 : Patch without setTimeout #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : Addtional layout test included. #

Total comments: 8

Patch Set 7 : #

Total comments: 9

Patch Set 8 : #

Patch Set 9 : Fixed Mac build errors #

Patch Set 10 : Update Test Expectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+381 lines, -38 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/select/listbox-with-display-none-option.html View 1 2 3 4 5 6 7 1 chunk +89 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/select/listbox-with-display-none-option-expected.png View 1 2 3 4 5 6 7 8 9 Binary file 0 comments Download
A LayoutTests/fast/forms/select/listbox-with-display-none-option-expected.txt View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/select/select-with-display-none-options.html View 1 2 3 4 5 6 7 1 chunk +90 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/select/select-with-display-none-options-expected.txt View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/html/HTMLOptGroupElement.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLOptGroupElement.cpp View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M Source/core/html/HTMLOptionElement.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLOptionElement.cpp View 1 2 3 4 5 6 7 2 chunks +17 lines, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -6 lines 0 comments Download
M Source/core/rendering/RenderListBox.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderListBox.cpp View 1 2 3 4 5 6 7 19 chunks +98 lines, -29 lines 0 comments Download

Messages

Total messages: 54 (0 generated)
spartha
Proposed Patch PTAL....
6 years, 9 months ago (2014-03-13 13:55:52 UTC) #1
tkent
What will the following code show with this patch? <select> <option>Option 0</option> <option style="display:none;">Option 1</option> ...
6 years, 9 months ago (2014-03-13 23:39:05 UTC) #2
spartha
With the patch the alert prints "Option 2". The behavior is different with FireFox and ...
6 years, 9 months ago (2014-03-14 05:11:03 UTC) #3
tkent
On 2014/03/14 05:11:03, spartha wrote: > With the patch the alert prints "Option 2". The ...
6 years, 9 months ago (2014-03-14 05:19:12 UTC) #4
spartha
On 2014/03/14 05:11:03, spartha wrote: > With the patch the alert prints "Option 2". The ...
6 years, 9 months ago (2014-03-14 05:28:38 UTC) #5
spartha
Uploaded 2nd WIP Patch...PTAL
6 years, 9 months ago (2014-03-18 19:11:58 UTC) #6
tkent
-eseidel, +keishi - Please add tests - What about menulist SELECT?
6 years, 9 months ago (2014-03-20 02:29:50 UTC) #7
spartha
On 2014/03/20 02:29:50, tkent wrote: > -eseidel, +keishi > > - Please add tests Sure ...
6 years, 9 months ago (2014-03-20 04:58:19 UTC) #8
spartha
Updated the patch, PTAL, Thanks!
6 years, 9 months ago (2014-03-20 10:00:07 UTC) #9
esprehn
I'm not sure this complexity is worth it. We intentionally don't support display: none on ...
6 years, 9 months ago (2014-03-20 17:09:25 UTC) #10
spartha
Thanks for the review! I see that the select that uses the menulist, handles the ...
6 years, 9 months ago (2014-03-21 05:13:25 UTC) #11
esprehn
https://codereview.chromium.org/189543012/diff/140001/Source/core/html/HTMLOptionElement.cpp File Source/core/html/HTMLOptionElement.cpp (right): https://codereview.chromium.org/189543012/diff/140001/Source/core/html/HTMLOptionElement.cpp#newcode308 Source/core/html/HTMLOptionElement.cpp:308: if ((m_style->display() == NONE || (!oldStyle || oldStyle->display() == ...
6 years, 9 months ago (2014-03-21 20:43:38 UTC) #12
spartha
https://codereview.chromium.org/189543012/diff/140001/Source/core/html/HTMLOptionElement.cpp File Source/core/html/HTMLOptionElement.cpp (right): https://codereview.chromium.org/189543012/diff/140001/Source/core/html/HTMLOptionElement.cpp#newcode308 Source/core/html/HTMLOptionElement.cpp:308: if ((m_style->display() == NONE || (!oldStyle || oldStyle->display() == ...
6 years, 9 months ago (2014-03-21 21:29:02 UTC) #13
spartha
https://codereview.chromium.org/189543012/diff/100001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/189543012/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode1634 Source/core/html/HTMLSelectElement.cpp:1634: m_optionChildChangedTimer.startOneShot(0, FROM_HERE); On 2014/03/20 17:09:25, esprehn wrote: > This ...
6 years, 9 months ago (2014-03-21 21:37:36 UTC) #14
esprehn
On 2014/03/21 at 21:37:36, sudarshan.p wrote: > https://codereview.chromium.org/189543012/diff/100001/Source/core/html/HTMLSelectElement.cpp > File Source/core/html/HTMLSelectElement.cpp (right): > > https://codereview.chromium.org/189543012/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode1634 ...
6 years, 9 months ago (2014-03-24 09:16:34 UTC) #15
tkent
I remember Keishi's on-going patch <https://codereview.chromium.org/14096013/>, and think Keishi's will resolve crbug.com/81415 too. Keishi, what ...
6 years, 9 months ago (2014-03-24 09:19:42 UTC) #16
spartha
On 2014/03/24 09:19:42, tkent wrote: > I remember Keishi's on-going patch <https://codereview.chromium.org/14096013/>, > and think ...
6 years, 8 months ago (2014-03-31 15:33:04 UTC) #17
keishi
Sorry for being late. Hopefully we can move <select> to shadow dom soon, but I ...
6 years, 8 months ago (2014-04-11 06:40:10 UTC) #18
spartha
Thanks for the review! Have updated the patch as per the review comments. PTAL https://codereview.chromium.org/189543012/diff/180001/Source/core/html/HTMLSelectElement.cpp ...
6 years, 8 months ago (2014-04-11 11:19:44 UTC) #19
keishi
https://codereview.chromium.org/189543012/diff/200001/LayoutTests/fast/forms/select/listbox-with-display-none-option.html File LayoutTests/fast/forms/select/listbox-with-display-none-option.html (right): https://codereview.chromium.org/189543012/diff/200001/LayoutTests/fast/forms/select/listbox-with-display-none-option.html#newcode1 LayoutTests/fast/forms/select/listbox-with-display-none-option.html:1: <!doctype html> We should add tests for - changing ...
6 years, 8 months ago (2014-04-11 15:07:09 UTC) #20
spartha
Done. PTAL https://codereview.chromium.org/189543012/diff/200001/LayoutTests/fast/forms/select/listbox-with-display-none-option.html File LayoutTests/fast/forms/select/listbox-with-display-none-option.html (right): https://codereview.chromium.org/189543012/diff/200001/LayoutTests/fast/forms/select/listbox-with-display-none-option.html#newcode1 LayoutTests/fast/forms/select/listbox-with-display-none-option.html:1: <!doctype html> On 2014/04/11 15:07:09, keishi1 wrote: ...
6 years, 8 months ago (2014-04-12 18:53:22 UTC) #21
keishi
LGTM. Please add something about optgroup to the change description.
6 years, 8 months ago (2014-04-13 03:31:20 UTC) #22
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 05:40:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/220001
6 years, 8 months ago (2014-04-14 05:40:38 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 06:10:06 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 8 months ago (2014-04-14 06:10:06 UTC) #26
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 08:53:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/230001
6 years, 8 months ago (2014-04-14 08:53:15 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 09:22:10 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-14 09:22:11 UTC) #30
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 09:45:55 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/250001
6 years, 8 months ago (2014-04-14 09:46:08 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 10:19:33 UTC) #33
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-14 10:19:34 UTC) #34
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 10:30:38 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/270001
6 years, 8 months ago (2014-04-14 10:30:48 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 10:30:56 UTC) #37
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-14 10:30:56 UTC) #38
spartha
The CQ bit was unchecked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 10:31:31 UTC) #39
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 10:33:53 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/290001
6 years, 8 months ago (2014-04-14 10:34:06 UTC) #41
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 10:34:15 UTC) #42
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-14 10:34:16 UTC) #43
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 10:35:08 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/290001
6 years, 8 months ago (2014-04-14 10:35:15 UTC) #45
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 10:35:22 UTC) #46
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-14 10:35:23 UTC) #47
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 10:42:05 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/310001
6 years, 8 months ago (2014-04-14 10:42:14 UTC) #49
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 11:13:54 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-14 11:13:55 UTC) #51
spartha
The CQ bit was checked by sudarshan.p@samsung.com
6 years, 8 months ago (2014-04-14 11:39:26 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/189543012/330001
6 years, 8 months ago (2014-04-14 11:39:31 UTC) #53
commit-bot: I haz the power
6 years, 8 months ago (2014-04-14 12:45:08 UTC) #54
Message was sent while issue was closed.
Change committed as 171457

Powered by Google App Engine
This is Rietveld 408576698