mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00

Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()` is deleted. So, for keeping same behavior, the post processing after calling `TextEditor` methods should be done before editor dispatches "input" event. Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to do that. Therefore, this patch makes it notify `TextControlState` and `AutoTextControlHandlingState`. Note that ideally, each method of `TextEditor` should return `NS_ERROR_OUT_OF_MEMORY` coming from `AutoTextControlHandlingState::OnEditActionHandled()`. However, it requires a lot of changes in editor classes, and the case is really rare since editor does not use fallible allocation. Therefore, it must be okay to crash in editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`. Depends on D51395 Differential Revision: https://phabricator.services.mozilla.com/D51396 --HG-- extra : moz-landing-system : lando