Bug 220556

Summary: REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit2Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Wenson Hsieh 2021-01-12 12:13:55 PST
<rdar://problem/71602937>
Comment 1 Wenson Hsieh 2021-01-12 12:25:35 PST
Created attachment 417478 [details]
Patch
Comment 2 Darin Adler 2021-01-12 13:34:04 PST
Comment on attachment 417478 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417478&action=review

> Source/WebKit/ChangeLog:11
> +        Restores the implementation of `WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled`, which was removed in
> +        r265044, with the reasoning that the code was unused. However, Safari still uses this SPI on macOS to prevent
> +        automatic spelling correction from triggering when editing form fields that are AutoFillable.

Wow, how did I miss that?

Was that the only mistake of the 12 functions that I claimed were unused?
Comment 3 Wenson Hsieh 2021-01-12 13:49:48 PST
Thanks for the review!

Yes, this seems to be the only one that is unused. While there are several SPI functions that have call sites in Safari code (more specifically, their C++ wrapper objects), the methods on those wrappers are unused in Safari code as well.

(In reply to Darin Adler from comment #2)
> Comment on attachment 417478 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417478&action=review
> 
> > Source/WebKit/ChangeLog:11
> > +        Restores the implementation of `WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled`, which was removed in
> > +        r265044, with the reasoning that the code was unused. However, Safari still uses this SPI on macOS to prevent
> > +        automatic spelling correction from triggering when editing form fields that are AutoFillable.
> 
> Wow, how did I miss that?
> 
> Was that the only mistake of the 12 functions that I claimed were unused?
Comment 4 Wenson Hsieh 2021-01-12 13:50:34 PST
> Yes, this seems to be the only one that is unused.

(I meant to write "only one that is _not_ unused")
Comment 5 EWS 2021-01-12 13:59:47 PST
Committed r271414: <https://trac.webkit.org/changeset/271414>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417478 [details].