[Webkit-unassigned] [Bug 174394] Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 25 14:13:34 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=174394
--- Comment #63 from Wenson Hsieh <wenson_hsieh at apple.com> ---
(In reply to Ryosuke Niwa from comment #62)
> Comment on attachment 321709 [details]
> Patch for landing
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321709&action=review
>
> > Source/WebKitLegacy/mac/DOM/DOMHTMLInputElement.mm:704
> > + std::optional<WebCore::AutofillElements> autofillElements = WebCore::AutofillElements::computeAutofillElements(*IMPL);
> > + autofillElements->autofill(credentialsSuggestion.username, credentialsSuggestion.password);
>
> use auto here as in auto autofillElements.
> You should check for nullopt. Otherwise, the program will crash.
A clean way to write this would be:
if (auto elements = WebCore::AutofillElements::computeAutofillElements(*IMPL))
elements->autofill(credentialsSuggestion.username, credentialsSuggestion.password);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170925/f4985d48/attachment-0001.html>
More information about the webkit-unassigned
mailing list