From 9dc3f719e5369b2fb953b6e8687b5feedbab7f2f Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Mon, 28 Nov 2022 03:03:54 +0000 Subject: [PATCH] Bug 1800829 - part 4: Get rid of plugin handling documentaion due to removed in bug 1683226 r=m_kato DONTBUILD Depends on D162686 Differential Revision: https://phabricator.services.mozilla.com/D162687 --- editor/docs/IMEHandlingGuide.rst | 44 +++++++++++--------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/editor/docs/IMEHandlingGuide.rst b/editor/docs/IMEHandlingGuide.rst index 0f42787c8e63..3fd8c18db86b 100644 --- a/editor/docs/IMEHandlingGuide.rst +++ b/editor/docs/IMEHandlingGuide.rst @@ -305,28 +305,29 @@ nsTextFrame mozilla::IMEContentObserver --------------------------- -``IMEContentObserver`` observes various changes of a focused editor. When an -editor or a windowless plugin gets focus, an instance is created, starts to -observe and notifies widget of IME getting focus. When the editor or windowless -plugin loses focus, it notifies widget of IME losing focus, stops observing -everything and is released. +``IMEContentObserver`` observes various changes of a focused editor. When a +corresponding element of a ``TextEditor`` or ``HTMLEditor`` instance gets +focus, an instance is created by ``IMEStateManager``, then, starts to observe +and notifies ``widget`` of IME getting focus. When the editor loses focus, it +notifies ``widget`` of IME losing focus and stops observing everything. +Finally, it's destroyed by ``IMEStateManager``. This class observes selection changes (caret position changes), text changes of a focused editor and layout changes (by reflow or scroll) of everything in the document. It depends on the result of ``nsIWidget::GetIMEUpdatePreference()`` what is observed. -When this notifies something of widget and/or IME, it needs to be safe to run +When this notifies ``widget`` of something, it needs to be safe to run script because notifying something may cause dispatching one or more DOM events and/or new reflow. Therefore, ``IMEContentObserver`` only stores which -notification should be sent to widget and/or IME. Then, +notification should be sent to ``widget``. Then, ``mozilla::IMEContentObserver::IMENotificationSender`` tries to send the pending notifications when it might become safe to do that. Currently, it's tried: * after a native event is dispatched from ``PresShell::HandleEventInternal()`` -* at changing focus from a windowless plugin -* when new focused editor receives DOM "focus" event +* when new focused editor receives DOM ``focus`` event +* when next refresh driver tick .. note:: @@ -880,17 +881,6 @@ field has focus. This state is set only when ```` or ``