This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
[Qt][Wk2] Assertion failure when selecting an option in select list w…
…ith size attribute greater than one https://bugs.webkit.org/show_bug.cgi?id=86974 Patch by Dinu Jacob <email@example.com> on 2012-05-23 Reviewed by Simon Hausmann. Select list with size attribute greater than one will not initially have any item in selected state (if no option has 'selected' tag), resulting in m_selectedModelIndex in WebPopupMenuProxyQt to be invalid. Hence, need to check whether the old index is invalid before accessing the item at that index. * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Added new test that tests selection in a select list with size attribute value of 2. * UIProcess/API/qt/tests/qmltests/common/selectwithsize.html: Added. * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::PopupMenuItemModel::select): Check whether old index is valid before accessing the item at that index. Canonical link: https://commits.webkit.org/105025@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 4 changed files with 51 additions and 3 deletions.