REGRESSION (r280492): Clicking backspace on sign in fields results in deleting two characters instead of one
Created attachment 434942 [details] Patch
Comment on attachment 434942 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434942&action=review > Source/WebCore/ChangeLog:8 > + No tests yet. The fact that this didn't break any tests is astounding; you should see if Wenson has any good ideas about how to test the software keyboard codepath (we may not have a good way, and no need for making one to block the regression fix).
(In reply to Tim Horton from comment #2) > Comment on attachment 434942 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=434942&action=review > > > Source/WebCore/ChangeLog:8 > > + No tests yet. > > The fact that this didn't break any tests is astounding; you should see if > Wenson has any good ideas about how to test the software keyboard codepath > (we may not have a good way, and no need for making one to block the > regression fix). The last time I looked into adding support for this, I did not find any straightforward way to achieve this (using API, SPI, or even IPI). That said, it has been several years since this investigation, so we should take another look at this! (In the shorter term, perhaps it's also possible to write an API test that swizzles/mocks/calls directly into `WKContentView` to simulate pressing the delete key on the software keyboard on iOS).
(In reply to Wenson Hsieh from comment #3) > (In reply to Tim Horton from comment #2) > > Comment on attachment 434942 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=434942&action=review > > > > > Source/WebCore/ChangeLog:8 > > > + No tests yet. > > > > The fact that this didn't break any tests is astounding; you should see if > > Wenson has any good ideas about how to test the software keyboard codepath > > (we may not have a good way, and no need for making one to block the > > regression fix). > > The last time I looked into adding support for this, I did not find any > straightforward way to achieve this (using API, SPI, or even IPI). That > said, it has been several years since this investigation, so we should take > another look at this! > > (In the shorter term, perhaps it's also possible to write an API test that > swizzles/mocks/calls directly into `WKContentView` to simulate pressing the > delete key on the software keyboard on iOS). From a quick debugging session on my iPhone, it looks like we might be able to grab the TIKeyboardLayout from the active UIKeyboardImpl, look up the frame (CGRect) of the corresponding key string, map that from input view coordinates into screen coordinates, and then synthesize HID events to tap the center of that rect. I suppose any test that uses this mechanism would need to listen for DOM events (keyup) to know that the key press is finished.
Created attachment 434949 [details] Patch
rdar://81496530
Committed r280671 (240276@main): <https://commits.webkit.org/240276@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434949 [details].
Reopening to attach new patch.
Created attachment 434958 [details] For EWS
Comment on attachment 434958 [details] For EWS Oops, sorry, I didn't mean to reopen.