mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
b9ef2f71b3
`mozAutoDocUpdate` does not make it in a document change when container node of `insertBefore` has already been removed from the tree. Therefore, once `IMEContentObserver::mRootElement` is removed from the DOM tree without a focus move, `IMEContentObserver` is notified mutations not in a document change. Similar situations are handled in `IMEStateManager::OnRemoveContent` with emulating a focus change and that will destroy the active `IMEContentObserver`. Therefore, if `IMEContentObserver::mRootElement` is removed, we should emulate a focus move when `IMEStateManager` does not have focused element but there is active `IMEContentObserver` (that means it is/was in the design mode). However, checking whether the removed node contains the observing node of the active `IMEContentObserver` may be expensive. So, doing expensive things in `IMEStateManager::OnRemoveContent` may make mutations slower. Therefore, this patch makes `IMEContentObserver` observe `ParentChainChanged` and it let `IMEStateManager` know that with calling its `OnParentChainChangedOfObservingElement`. Finally, it calls `IMEStateManager::OnRemoveContent` to emulate "blur" (and refocus if it's required). Differential Revision: https://phabricator.services.mozilla.com/D218696 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.sys.mjs | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |