gecko-dev/editor
Masayuki Nakano b9ef2f71b3 Bug 1911010 - Make IMEContentObserver observe ParentChainChanged and let IMEStateManager know that r=smaug
`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
2024-08-27 00:39:49 +00:00
..
composer Bug 1864896: Autofix unused function arguments (editor). r=masayuki 2024-03-01 18:28:33 +00:00
docs Bug 1842986 - Remove dom.forms.inputmode pref r=emilio 2023-09-15 16:49:21 +00:00
libeditor Bug 1911010 - Make IMEContentObserver observe ParentChainChanged and let IMEStateManager know that r=smaug 2024-08-27 00:39:49 +00:00
reftests Bug 1879538 - cleanup unnecessary and redundant reftest conditions. r=aryx,jgilbert 2024-02-22 23:04:45 +00:00
spellchecker Bug 1864896: Autofix unused function arguments (editor). r=masayuki 2024-03-01 18:28:33 +00:00
txmgr Bug 1856795 - Remove redundant member init r=emilio 2023-10-15 15:29:02 +00:00
AsyncSpellCheckTestHelper.sys.mjs Bug 1864896: Autofix unused function arguments (editor). r=masayuki 2024-03-01 18:28:33 +00:00
moz.build Bug 1820593 - Convert AsyncSpellCheckTestHelper to an ES module. r=masayuki 2023-03-07 09:40:39 +00:00
nsIDocumentStateListener.idl
nsIEditActionListener.idl Bug 1859245 - part 3: Make JoinNodesTransaction and SplitNodeTransaction handle only the new direction mode r=m_kato 2023-10-27 01:57:29 +00:00
nsIEditor.idl Bug 1809713 - Use ClipboardType in editor. r=masayuki 2024-07-29 11:52:33 +00:00
nsIEditorMailSupport.idl Bug 1839814 - Move nsIEditor.wrapWidth to nsIEditorMailSupport r=m_kato 2023-06-27 05:47:55 +00:00
nsIEditorSpellCheck.idl Bug 1402822 - Support multiple dictionaries in EditorSpellCheck; r=smaug 2022-03-23 13:53:38 +00:00
nsIHTMLAbsPosEditor.idl
nsIHTMLEditor.idl Bug 1851951 - Make HTMLEditor refer computed display instead of the HTML default style at considering block or inline element r=m_kato 2023-09-27 03:01:26 +00:00
nsIHTMLInlineTableEditor.idl
nsIHTMLObjectResizer.idl Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich 2022-12-28 09:52:44 +00:00
nsITableEditor.idl