WebKit Bugzilla
Attachment 357632 Details for
Bug 192836
: [macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192836-20181218163422.patch (text/plain), 2.48 KB, created by
Wenson Hsieh
on 2018-12-18 16:34:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-12-18 16:34:22 PST
Size:
2.48 KB
patch
obsolete
>Subversion Revision: 239346 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index ecf910616f2057e33e90f9b5431af9ac332b49ac..2b9e7c7347c3bad780d87b2a59616d7d0eb3a5e0 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,24 @@ >+2018-12-18 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [macOS] fast/forms/datalist/datalist-textinput-suggestions-order.html sometimes crashes after r239337 >+ https://bugs.webkit.org/show_bug.cgi?id=192836 >+ <rdar://problem/45321184> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ r239337 exposed a subtle issue in the implementation of `-[WKDataListSuggestionsView updateWithInformation:]`, >+ wherein we might end up recomputing information for table view cells at rows that no longer exist. This currently >+ happens because we first set the datalist's `_suggestions`, then change the table view's frame, and then finally >+ reload the table view; however, in the case where the number of suggestions decreased and the frame changed >+ (which prompts AppKit to ask us again for table cell views), we'll attempt to access an out-of-bounds index in >+ the `_suggestions` vector. >+ >+ To address this, we change our suggestions and immediately reload the table view before updating `NSTableView`'s >+ frame, so that we only provide table view cells for rows that actually correspond to items in `_suggestions`. >+ >+ * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm: >+ (-[WKDataListSuggestionsView updateWithInformation:]): >+ > 2018-12-18 Wenson Hsieh <wenson_hsieh@apple.com> > > Unreviewed, fix the 32-bit watchOS build after r239314 >diff --git a/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm b/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm >index 20edfcf4c8ee2179cb6b356d7284c12225b2ea91..271769b2b10bea26c37782bfe701b24feee25424 100644 >--- a/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm >@@ -346,9 +346,10 @@ - (String)currentSelectedString > - (void)updateWithInformation:(WebCore::DataListSuggestionInformation&&)information > { > _suggestions = WTFMove(information.suggestions); >+ [_table reload]; >+ > [_enclosingWindow setFrame:[self dropdownRectForElementRect:information.elementRect] display:YES]; > [_table setVisibleRect:[_enclosingWindow frame]]; >- [_table reload]; > } > > - (void)moveSelectionByDirection:(const String&)direction
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192836
: 357632