Hi,

I'd like to remove legacy API to dispatch keyboard events.

One is nsIDOMWindowUtils.sendKeyEvent(), this has already replaced completely with nsITextInputProcessor [*1] since 2015 [*2]. It's really easy to rewrite legacy API users with new API because our EventUtils.js for mochitest has a good wrapper for using new API [*3].

The other is nsIFrameLoader.sendCrossProcessKeyEvent(). This was implemented for old Fennec [*4] and looks like that nobody uses this API now. This shares same implementation with nsIDOMWindowUtils.sendKeyEvent() but dispatches keyboard events only in the remote process associated with the frame loader. Unfortunately, we don't have alternative API for this. However, if the remote process has focus, keyboard events synthesized with nsITextInputProcessor are sent to the remote process. So, I guess that we don't need this API anymore.

I'm working on this at bug 1134542:
https://bugzilla.mozilla.org/show_bug.cgi?id=1134542

Thunderbird still uses nsIDOMWindowUtils.sendKeyEvent(). Therefore, I'll wait to land the removing patch until those bugs [*5][*6] are fixed. However, if they won't be fixed by the next weekend, I'll drop these legacy API soon anyway.

*1 https://searchfox.org/mozilla-central/source/dom/interfaces/base/nsITextInputProcessor.idl
*2 https://bugzilla.mozilla.org/show_bug.cgi?id=917322
*3 https://searchfox.org/mozilla-central/rev/97cb0aa64ae51adcabff76fb3b5eb18368f5f8ab/testing/mochitest/tests/SimpleTest/EventUtils.js#835-905
*4 https://bugzilla.mozilla.org/show_bug.cgi?id=553149
*5 https://bugzilla.mozilla.org/show_bug.cgi?id=1433648
*6 https://bugzilla.mozilla.org/show_bug.cgi?id=1434317

--
Masayuki Nakano <masay...@d-toybox.com>
Software Engineer, Mozilla
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to