| Summary: | Support inserting text or dictation alternative by simulating keyboard input | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||||||
| Component: | WebKit Misc. | Assignee: | Daniel Bates <dbates> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | darin, webkit-bug-importer | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Local Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=214434 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Daniel Bates
2020-03-21 16:54:00 PDT
Created attachment 394184 [details]
Patch
Created attachment 394185 [details]
Patch
Comment on attachment 394185 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394185&action=review > Tools/TestWebKitAPI/cocoa/TestCocoa.h:45 > +// This is a template instead of a macro to support passing arguments written in Objective-C Yikes, this will not preserve original expressions....doesn't look like there is an exposed way to retrieve stringified values of the passed args in C++. So, going to go back to using a macro for this and just surround the array literals with parens Created attachment 394195 [details]
Patch and unit tests
Now EXPECT_NS_EQUAL is a macro, again
Created attachment 394196 [details]
Patch and unit tests
Comment on attachment 394196 [details] Patch and unit tests View in context: https://bugs.webkit.org/attachment.cgi?id=394196&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4716 > + [self _shouldSimulateKeyboardInputOnTextInsertionInternal]; r-, this is wrong. Created attachment 394197 [details]
Patch and unit tests
Comment on attachment 394197 [details] Patch and unit tests View in context: https://bugs.webkit.org/attachment.cgi?id=394197&action=review > Source/WebKit/Shared/Cocoa/InsertTextOptions.h:37 > + bool simulateKeyboardInput { false }; As you know, Cocoa programming style suggests naming boolean properties in a way that disambiguates from a function that would take action. So shouldSimulateKeyboardInput because simulateKeyboardInput reads like a command that would do something immediately rather than a setting for what should be done. We should consider that style for the booleans in this structure. Created attachment 394300 [details]
To Land
Comment on attachment 394197 [details] Patch and unit tests View in context: https://bugs.webkit.org/attachment.cgi?id=394197&action=review Thanks for the review. >> Source/WebKit/Shared/Cocoa/InsertTextOptions.h:37 >> + bool simulateKeyboardInput { false }; > > As you know, Cocoa programming style suggests naming boolean properties in a way that disambiguates from a function that would take action. So shouldSimulateKeyboardInput because simulateKeyboardInput reads like a command that would do something immediately rather than a setting for what should be done. > > We should consider that style for the booleans in this structure. Renamed. Comment on attachment 394300 [details] To Land Clearing flags on attachment: 394300 Committed r258873: <https://trac.webkit.org/changeset/258873> All reviewed patches have been landed. Closing bug. |