Changeset 239363 in webkit
- Timestamp:
- Dec 18, 2018 6:11:58 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r239362 r239363 1 2018-12-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337 4 https://bugs.webkit.org/show_bug.cgi?id=192836 5 <rdar://problem/45321184> 6 7 Reviewed by Tim Horton. 8 9 r239337 exposed a subtle issue in the implementation of `-[WKDataListSuggestionsView updateWithInformation:]`, 10 wherein we might end up recomputing information for table view cells at rows that no longer exist. This currently 11 happens because we first set the datalist's `_suggestions`, then change the table view's frame, and then finally 12 reload the table view; however, in the case where the number of suggestions decreased and the frame changed 13 (which prompts AppKit to ask us again for table cell views), we'll attempt to access an out-of-bounds index in 14 the `_suggestions` vector. 15 16 To address this, we change our suggestions and immediately reload the table view before updating `NSTableView`'s 17 frame, so that we only provide table view cells for rows that actually correspond to items in `_suggestions`. 18 19 * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm: 20 (-[WKDataListSuggestionsView updateWithInformation:]): 21 1 22 2018-12-18 Jiewen Tan <jiewen_tan@apple.com> 2 23 -
trunk/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm
r238166 r239363 347 347 { 348 348 _suggestions = WTFMove(information.suggestions); 349 [_table reload]; 350 349 351 [_enclosingWindow setFrame:[self dropdownRectForElementRect:information.elementRect] display:YES]; 350 352 [_table setVisibleRect:[_enclosingWindow frame]]; 351 [_table reload];352 353 } 353 354
Note: See TracChangeset
for help on using the changeset viewer.