зеркало из https://github.com/mozilla/gecko-dev.git
1c1a60c08d
We'll start to dispatch keydown event and keyup event even during composition. So, for testing those events won't break our UI, we should make EventUtils.synhtesizeComposition() and EventUtils.synthesizeCompositionChange() dispatch keydown event and keyup event even if callers don't specify keyboard event explicitly. Typically, "keydown" event is marked as "processed by IME", i.e., keyCode value is set to DOM_VK_PROCESSKEY and key is set to "Process", with our widget which handles native IME and key input. On the other hand, "keyup" is NOT marked as so. Therefore, this patch makes TextInputProcessor emulates this behavior without any new special flags. And for making possible to emulate special cases, this patch adds two flags to nsITextInputProcessor. One is KEY_DONT_MARK_KEYDOWN_AS_PROCESSED. The other is KEY_MARK_KEYUP_AS_PROCESSED. Unfortunately, those flags have opposite meaning but this must be better than making necessary to one flag for emulating usual keydown/keyup events. Finally, this makes some tests specify better keyboard information to synthesizeComposition() and synthesizeCompositionChange() to emulate actual keyboard events during composition. MozReview-Commit-ID: ItYaXILkNQE --HG-- extra : rebase_source : e50cc77c1efbc12686d7ea334d41926c7392b30d |
||
---|---|---|
.. | ||
ImportTesting.jsm | ||
SpecialPowersLoadChromeScript.js | ||
empty.js | ||
file_SpecialPowersFrame1.html | ||
importtesting_chromescript.js | ||
mochitest.ini | ||
specialPowers_framescript.js | ||
test_SimpletestGetTestFileURL.html | ||
test_SpecialPowersExtension.html | ||
test_SpecialPowersExtension2.html | ||
test_SpecialPowersLoadChromeScript.html | ||
test_SpecialPowersLoadChromeScript_function.html | ||
test_SpecialPowersLoadPrivilegedScript.html | ||
test_SpecialPowersPushPermissions.html | ||
test_SpecialPowersPushPrefEnv.html | ||
test_TestsRunningAfterSimpleTestFinish.html | ||
test_add_task.html | ||
test_bug649012.html | ||
test_createFiles.html | ||
test_importInMainProcess.html | ||
test_sanity.html | ||
test_sanityEventUtils.html | ||
test_sanityException.html | ||
test_sanityException2.html | ||
test_sanityParams.html | ||
test_sanityRegisteredServiceWorker.html | ||
test_sanityRegisteredServiceWorker2.html | ||
test_sanitySimpletest.html | ||
test_sanityWindowSnapshot.html | ||
test_sanity_cleanup.html | ||
test_sanity_cleanup2.html | ||
test_sanity_manifest.html | ||
test_sanity_manifest_pf.html | ||
test_sanity_waitForCondition.html | ||
test_spawn_task.html |