|
|
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
Total comments: 2
|
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
|
Total messages: 25 (12 generated)
|