Fix HTMLDataListElement.options to include even options that are not suggestions
Created attachment 391481 [details] Patch
Committed r257194: <https://trac.webkit.org/changeset/257194>
<rdar://problem/59706968>
Comment on attachment 391481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391481&action=review > Source/WebCore/html/ColorInputType.cpp:291 > - suggestions.reserveInitialCapacity(length); > - for (unsigned i = 0; i != length; ++i) { > - auto value = downcast<HTMLOptionElement>(*options->item(i)).value(); > - if (isValidSimpleColor(value)) > - suggestions.uncheckedAppend(Color(value)); > + for (auto& option : dataList->suggestions()) { > + if (auto color = parseSimpleColorValue(option.value())) > + suggestions.uncheckedAppend(*color); Concerning that EWS didn't catch the loss of reserveInitialCapacity here
Comment on attachment 391481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391481&action=review >> Source/WebCore/html/ColorInputType.cpp:291 >> + suggestions.uncheckedAppend(*color); > > Concerning that EWS didn't catch the loss of reserveInitialCapacity here Oops. Obviously this needs to be plain old append, not uncheckedAppend! I can’t believe I missed that.
Comment on attachment 391481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391481&action=review >>> Source/WebCore/html/ColorInputType.cpp:291 >>> + suggestions.uncheckedAppend(*color); >> >> Concerning that EWS didn't catch the loss of reserveInitialCapacity here > > Oops. Obviously this needs to be plain old append, not uncheckedAppend! I can’t believe I missed that. Are you going to fix that, Tim, or would you like me to?
I think Megan is fixing it! (she found the problem, I just did the spelunking to find out how it got this way).