This bug is to record for posterity an idiosyncratic behavior in RWHVMac. It not necessarily an actual bug.
Keyboard events target
- RWHVMac::host(), if it has no delegate, otherwise
- RWHVMac::host()->delegate()->GetFocusedRenderWidgetHost(RWHVMac::host())
Ime events target
- RWHVMac::text_input_manager_->GetActiveWidget()
Issue 1: It's not clear if these should be separate, or if they should be the same.
Issue 2 : During handling of a key-down event, we historically cached the widget for the keyboard event, and used that widget for all events and for all Ime commands, until the key-down event's handling finished running.
This behavior is being preserved (in https://chromium-review.googlesource.com/c/chromium/src/+/1005789/), but it may be that there is a simpler scheme to accomplish this.