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

Issue 1013303004: Fix issue on <select> style change when popup is visible (Closed)

Created:
5 years, 9 months ago by keishi
Modified:
5 years, 8 months ago
Reviewers:
tkent, Xianzhu
CC:
blink-reviews, pdr+renderingwatchlist_chromium.org, zoltan1, blink-reviews-html_chromium.org, eae+blinkwatch, leviw+renderwatch, Dominik Röttsches, dglazkov+blink, blink-reviews-rendering, jchaffraix+rendering
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix issue on <select> style change when popup is visible When a user selects an item in a popup menu using the keyboard the selection is a provisional selection that isn't accepted until the popup is abandoned. The index is saved to m_acceptedIndexOnAbandon and the menulist button text is set. When LayoutMenuList::updateFromElement() is called we need to update the menulist button text and we need to respect this provisional selection or else it looks like the selection has suddenly changed to the user. To fix this LayoutMenuList needs to know about m_acceptedIndexOnAbandon. It turned out that the popup doesn't really care if the provisional selection or an accepted selection so I moved the provisional selection tracking to the PopupMenuClient. LayoutMenuList needs to accept the provisional selection only when the popup was closed without accepting a selection so we add PopupMenuClient::popupDidCancel(). BUG=466004 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193034

Patch Set 1 #

Total comments: 2

Patch Set 2 : added menulist-type-ahead-find.html change #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : Added check for m_popup because disconnectClient may already be called from a change event handler #

Patch Set 7 : Rebased #

Patch Set 8 : Fixed test expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -86 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A + LayoutTests/fast/forms/select/menulist-popup-type-ahead-style-change.html View 2 chunks +7 lines, -3 lines 0 comments Download
A + LayoutTests/fast/forms/select/menulist-popup-type-ahead-style-change-expected.txt View 1 2 5 6 1 chunk +2 lines, -3 lines 0 comments Download
M LayoutTests/fast/forms/select/menulist-type-ahead-find.html View 1 2 chunks +6 lines, -2 lines 0 comments Download
A LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html View 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/platform/mac/fast/forms/select/menulist-type-ahead-find-original-item-expected.txt View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/html/forms/PopupMenuClient.h View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/layout/LayoutMenuList.h View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/layout/LayoutMenuList.cpp View 1 2 3 4 5 6 7 4 chunks +15 lines, -3 lines 0 comments Download
M Source/web/ExternalPopupMenuTest.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M Source/web/PopupContainer.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M Source/web/PopupListBox.h View 1 2 3 4 5 3 chunks +6 lines, -16 lines 0 comments Download
M Source/web/PopupListBox.cpp View 1 2 3 4 5 6 10 chunks +10 lines, -36 lines 0 comments Download
M Source/web/PopupMenuImpl.h View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
M Source/web/PopupMenuImpl.cpp View 1 2 3 4 5 6 5 chunks +7 lines, -11 lines 0 comments Download
M Source/web/PopupMenuTest.cpp View 1 2 3 4 5 6 7 3 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
Xianzhu
I like this change. Could you also include this: https://codereview.chromium.org/1015863002/diff/60001/LayoutTests/fast/forms/select/menulist-type-ahead-find.html https://codereview.chromium.org/1013303004/diff/1/Source/web/PopupListBox.cpp File Source/web/PopupListBox.cpp (right): https://codereview.chromium.org/1013303004/diff/1/Source/web/PopupListBox.cpp#newcode256 ...
5 years, 9 months ago (2015-03-18 16:46:23 UTC) #2
Xianzhu
keishi@, would you like me to create a patch based on yours?
5 years, 9 months ago (2015-03-23 15:52:11 UTC) #3
keishi
No I'm on this. I found out this patch breaks some of the PopupListBox behavior ...
5 years, 9 months ago (2015-03-24 02:07:27 UTC) #4
keishi
+tkent I think this is working now. https://codereview.chromium.org/1013303004/diff/1/Source/web/PopupListBox.cpp File Source/web/PopupListBox.cpp (right): https://codereview.chromium.org/1013303004/diff/1/Source/web/PopupListBox.cpp#newcode256 Source/web/PopupListBox.cpp:256: setOriginalIndex(m_selectedIndex); On ...
5 years, 8 months ago (2015-03-30 22:20:52 UTC) #6
tkent
lgtm
5 years, 8 months ago (2015-03-30 23:45:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1013303004/80001
5 years, 8 months ago (2015-03-30 23:46:06 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/57105)
5 years, 8 months ago (2015-03-31 02:39:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1013303004/100001
5 years, 8 months ago (2015-03-31 02:59:03 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/57128)
5 years, 8 months ago (2015-03-31 05:13:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1013303004/120001
5 years, 8 months ago (2015-04-02 04:44:09 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/57596)
5 years, 8 months ago (2015-04-02 07:08:37 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1013303004/140001
5 years, 8 months ago (2015-04-02 11:55:52 UTC) #24
commit-bot: I haz the power
5 years, 8 months ago (2015-04-02 13:24:56 UTC) #25
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193034

Powered by Google App Engine
This is Rietveld 408576698