Some web sites, like facebook.com or reddit.com, implement their own text editing system, which listens for DOM keyboard events or the DOM change event. When text corrections or dictation alternatives are inserted the behavior of the editor does not match what it would have done if a user manually typed the correction or alternative. For example, facebook.com listens for a DOM keyup event to hide the placeholder text shown in their fields. Towards having a good user experience, expose an insertion option that when enabled dispatches dummy keyboard and change events when performing a text insertion.
<rdar://problem/59445102>
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.