mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00

The editing session is temporarily disabled when opening a document. Then, when the document is closed, the editing session is restored with same `HTMLEditor` instance. Therefore, initializing editor may occur during an edit action is being handled. Probably, this must not be used in normal webapps since mutation events are used rarely. So, I think that for avoiding further complicated things, we should make editor won't accept new edit action handling after original editing session ended. This patch renames `AutoEditActionDataSetter::CanHandle()` to `IsDataAvailable()` since it just checks whether the important resource is available or not. And makes new `CanHandle()` return `false` for non-initializing edit actions if editing session has ended. Differential Revision: https://phabricator.services.mozilla.com/D111241