mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:23:34 +00:00
ed2040ac16
This patch implements InputType.inputType which is declared by Input Events. The attribute has already been implemented by Chrome and Safari. Chrome implements Input Events Level 1, but Safari implements Input Events Level 2. Difference between them is only whether it supports "insertFromComposition", "deleteByComposition" and "deleteCompositionText". This patch makes the level switchable with pref and takes Level 1 by default because Level 2 is still unstable around event order with composition events. For reducing string copy cost at dispatching "input" event, this patch makes EditorInternalInputEvent store valid input-type as enum class, EditorInputType and resolves it to string value when dom::InputEvent::GetInputType() is called. Note that the reason why this patch names the enum class as EditorInputType is, there is InputType enum class already for avoiding conflict the name, this appends "Editor" prefix because "input" and "beforeinput" events are fired only when an editor has focus. Differential Revision: https://phabricator.services.mozilla.com/D14128 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
browser | ||
mochitest | ||
reftest | ||
unit | ||
moz.build |