Summary: | Color Picker crashes on touch | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Megan Gardner <megan_gardner> | ||||||||
Component: | New Bugs | Assignee: | Megan Gardner <megan_gardner> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Megan Gardner
2020-03-13 15:22:24 PDT
Created attachment 393662 [details]
Patch
Comment on attachment 393662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393662&action=review > LayoutTests/fast/forms/color/color-input-activate-crash.html:13 > + if (!testRunner.runUIScript) Nit - spaces instead of tabs. > LayoutTests/fast/forms/color/color-input-activate-crash.html:16 > + var input = document.getElementById('colorInput'); Nit - it looks like there are a mix of spaces and tabs here. > LayoutTests/fast/forms/color/color-input-activate-crash.html:19 > + await UIHelper.activateElementAndWaitForInputSession(input); > + document.getElementById('result').innerHTML = 'PASS: Test did not crash'; > + testRunner.notifyDone(); Ditto with these lines. > LayoutTests/fast/forms/color/color-input-activate-crash.html:22 > + window.addEventListener('load', runTest, false); Ditto. Created attachment 393664 [details]
Patch
Comment on attachment 393664 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393664&action=review > LayoutTests/fast/forms/color/color-input-activate-crash.html:17 > + wait UIHelper.activateElementAndWaitForInputSession(input); wait => await? Created attachment 393666 [details]
Patch
Comment on attachment 393666 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393666&action=review > Source/WebCore/ChangeLog:8 > + Vector sizing lost in refactor. Not perfomance sensitive code, so just expanding vector as needed. Thanks for fixing my mistake! There are really two questions about using append. One you have answered here. The other is whether the vector lives a long time -- if it did we would want to make sure it doesn’t use a lot of space. I think it does not live a long time. If the vector did live a long time, there are two ways we could deal with that: 1) Less effective: Add a call to suggestions.shrinkToFit() after the loop. 2) More effective: Leave this using uncheckedAppend and add this line of code before the loop: suggestions.reserveInitialCapacity(std::distance(dataList->suggestions().begin(), { })); I’m going to assume it does not live a long time. Comment on attachment 393666 [details] Patch Clearing flags on attachment: 393666 Committed r258516: <https://trac.webkit.org/changeset/258516> |