LICENSE
author Masayuki Nakano <masayuki@d-toybox.com>
Wed, 03 Oct 2018 09:21:47 +0000
changeset 497850 fea8e039767a88ebfb73b1f0d43d1f87ee7394e1
parent 40458 1584ba8c1b86f9c4de5ccda5241cef36e80f042c
permissions -rw-r--r--
Bug 1343955 - part 2: Implement _guessCodeFromKeyName() in EventUtils.js with C++ and make it accessible with nsITextInputProcessor for EventUtils.js r=smaug We need to port synthesizeKey() of EventUtils.js to FuzzingFunctions. So, its helper function, _guessCodeFromKeyName() in EventUtils.js needs to be accessible from FuzzingFunctions. Therefore, we need to reimplement it with C++ and make it accessible via nsITextInputProcessor for EventUtils.js for making easier to maintain. This patch moves _guessCodeFromKeyName() into TextInputProcessor and WidgetKeyboardEvent. Non-printable key part of _guessCodeFromKeyName() is moved to WidgetKeyboardEvent::ComputeCodeNameIndexFromKeyNameIndex() because of not depending on active keyboard layout. On the other hand, printable key part needs to assume that active keyboard layout is en-US keyboard layout. Therefore, it's moved to TextInputProcessor::GuessCodeValueOfPrintableKeyInUSEnglishKeyboardLayout() because any Core code shouldn't refer it as utility method for keeping that we're i18n-aware. Differential Revision: https://phabricator.services.mozilla.com/D5514

Please see the file toolkit/content/license.html for the copyright licensing
conditions attached to this codebase, including copies of the licenses
concerned.

You are not granted rights or licenses to the trademarks of the
Mozilla Foundation or any party, including without limitation the
Firefox name or logo.

For more information, see: http://www.mozilla.org/foundation/licensing.html