[webkit-changes] [WebKit/WebKit] 15238f: [iOS] Crash when selecting <datalist> menu item
Aditya Keerthi
noreply at github.com
Tue Jun 25 11:14:55 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 15238f5b3939caeecf4f8107c21e40ed7881b70f
https://github.com/WebKit/WebKit/commit/15238f5b3939caeecf4f8107c21e40ed7881b70f
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-06-25 (Tue, 25 Jun 2024)
Changed paths:
M Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm
Log Message:
-----------
[iOS] Crash when selecting <datalist> menu item
https://bugs.webkit.org/show_bug.cgi?id=275826
rdar://130285494
Reviewed by Richard Robinson and Tim Horton.
Crash data shows occassional crashes when tapping on a menu item that is part
of a <datalist> menu. The crash is a RELEASE_ASSERT due to attempted out of
bounds access into the suggestions array.
In general, the displayed menu is meant to mirror the suggestions array. The
crash implies that the suggestions array has been updated independently of the
menu.
>From auditing the code there is currently one known area where the menu update
is may be elided when suggestions are updated.
Suggestion updates happen via `-[WKDataListSuggestionsDropdown updateWithInformation:]`.
That method calls `-[WKDataListSuggestionsDropdown _displayWithActivationType:]`.
When using a software keyboard, and the update is due to tapping on the input
or changing the text, menu presentation is elided. This logic exists so that
interacting with an <input> that has a <datalist> does not dismiss the keyboard
and present the menu. When using a software keyboard, the menu should only be
presented when tapping on the indicator.
However, as a speculative fix for the crash, if the menu is already presented,
simply update it.
* Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
(-[WKDataListSuggestionsDropdown _displayWithActivationType:]):
Canonical link: https://commits.webkit.org/280340@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list