2015-05-03 12:32:37 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-03-07 17:20:07 -08:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_IMEContentObserver_h_
|
|
|
|
#define mozilla_IMEContentObserver_h_
|
|
|
|
|
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2014-04-23 17:36:14 -07:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2014-03-07 17:20:07 -08:00
|
|
|
#include "nsIDocShell.h" // XXX Why does only this need to be included here?
|
2014-07-30 21:37:59 -07:00
|
|
|
#include "nsIEditor.h"
|
|
|
|
#include "nsIEditorObserver.h"
|
2014-03-07 17:20:07 -08:00
|
|
|
#include "nsIReflowObserver.h"
|
|
|
|
#include "nsISelectionListener.h"
|
|
|
|
#include "nsIScrollObserver.h"
|
|
|
|
#include "nsIWidget.h" // for nsIMEUpdatePreference
|
|
|
|
#include "nsStubMutationObserver.h"
|
2015-06-16 18:03:57 -07:00
|
|
|
#include "nsThreadUtils.h"
|
2014-03-07 17:20:07 -08:00
|
|
|
#include "nsWeakReference.h"
|
|
|
|
|
|
|
|
class nsIContent;
|
|
|
|
class nsINode;
|
|
|
|
class nsISelection;
|
|
|
|
class nsPresContext;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2014-04-23 17:36:15 -07:00
|
|
|
class EventStateManager;
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
// IMEContentObserver notifies widget of any text and selection changes
|
|
|
|
// in the currently focused editor
|
2015-03-21 09:28:04 -07:00
|
|
|
class IMEContentObserver final : public nsISelectionListener
|
2015-03-27 11:52:19 -07:00
|
|
|
, public nsStubMutationObserver
|
|
|
|
, public nsIReflowObserver
|
|
|
|
, public nsIScrollObserver
|
|
|
|
, public nsSupportsWeakReference
|
|
|
|
, public nsIEditorObserver
|
2014-03-07 17:20:07 -08:00
|
|
|
{
|
|
|
|
public:
|
2015-08-21 09:43:41 -07:00
|
|
|
typedef widget::IMENotification::SelectionChangeData SelectionChangeData;
|
2015-07-10 18:53:56 -07:00
|
|
|
typedef widget::IMENotification::TextChangeData TextChangeData;
|
|
|
|
typedef widget::IMENotification::TextChangeDataBase TextChangeDataBase;
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
IMEContentObserver();
|
|
|
|
|
2014-04-23 17:36:14 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(IMEContentObserver,
|
|
|
|
nsISelectionListener)
|
2014-07-30 21:37:59 -07:00
|
|
|
NS_DECL_NSIEDITOROBSERVER
|
2014-03-07 17:20:07 -08:00
|
|
|
NS_DECL_NSISELECTIONLISTENER
|
2014-07-30 21:38:01 -07:00
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATAWILLCHANGE
|
2014-03-07 17:20:07 -08:00
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
|
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
|
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
|
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
|
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTEWILLCHANGE
|
|
|
|
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
|
|
|
|
NS_DECL_NSIREFLOWOBSERVER
|
|
|
|
|
|
|
|
// nsIScrollObserver
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual void ScrollPositionChanged() override;
|
2014-03-07 17:20:07 -08:00
|
|
|
|
2014-08-29 03:08:43 -07:00
|
|
|
bool OnMouseButtonEvent(nsPresContext* aPresContext,
|
|
|
|
WidgetMouseEvent* aMouseEvent);
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
void Init(nsIWidget* aWidget, nsPresContext* aPresContext,
|
2014-11-05 05:12:44 -08:00
|
|
|
nsIContent* aContent, nsIEditor* aEditor);
|
2014-03-07 17:20:07 -08:00
|
|
|
void Destroy();
|
2014-04-23 17:36:15 -07:00
|
|
|
/**
|
|
|
|
* IMEContentObserver is stored by EventStateManager during observing.
|
|
|
|
* DisconnectFromEventStateManager() is called when EventStateManager stops
|
|
|
|
* storing the instance.
|
|
|
|
*/
|
|
|
|
void DisconnectFromEventStateManager();
|
2015-05-26 00:45:26 -07:00
|
|
|
/**
|
|
|
|
* MaybeReinitialize() tries to restart to observe the editor's root node.
|
|
|
|
* This is useful when the editor is reframed and all children are replaced
|
|
|
|
* with new node instances.
|
|
|
|
* @return Returns true if the instance is managing the content.
|
|
|
|
* Otherwise, false.
|
|
|
|
*/
|
|
|
|
bool MaybeReinitialize(nsIWidget* aWidget,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIEditor* aEditor);
|
2014-03-07 17:20:07 -08:00
|
|
|
bool IsManaging(nsPresContext* aPresContext, nsIContent* aContent);
|
|
|
|
bool IsEditorHandlingEventForComposition() const;
|
|
|
|
bool KeepAliveDuringDeactive() const
|
2014-03-07 17:20:07 -08:00
|
|
|
{
|
|
|
|
return mUpdatePreference.WantDuringDeactive();
|
|
|
|
}
|
2014-03-07 17:20:07 -08:00
|
|
|
nsIWidget* GetWidget() const { return mWidget; }
|
2015-06-04 10:06:10 -07:00
|
|
|
nsIEditor* GetEditor() const { return mEditor; }
|
|
|
|
void SuppressNotifyingIME() { mSuppressNotifications++; }
|
|
|
|
void UnsuppressNotifyingIME()
|
|
|
|
{
|
|
|
|
if (!mSuppressNotifications || --mSuppressNotifications) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FlushMergeableNotifications();
|
|
|
|
}
|
2015-05-14 18:18:08 -07:00
|
|
|
nsPresContext* GetPresContext() const;
|
2014-03-07 17:20:07 -08:00
|
|
|
nsresult GetSelectionAndRoot(nsISelection** aSelection,
|
|
|
|
nsIContent** aRoot) const;
|
2014-03-07 17:20:07 -08:00
|
|
|
|
|
|
|
private:
|
2014-06-23 12:56:07 -07:00
|
|
|
~IMEContentObserver() {}
|
|
|
|
|
2015-05-26 00:45:26 -07:00
|
|
|
enum State {
|
|
|
|
eState_NotObserving,
|
2015-05-26 00:45:26 -07:00
|
|
|
eState_Initializing,
|
2015-05-26 00:45:26 -07:00
|
|
|
eState_StoppedObserving,
|
|
|
|
eState_Observing
|
|
|
|
};
|
|
|
|
State GetState() const;
|
|
|
|
bool IsObservingContent(nsPresContext* aPresContext,
|
|
|
|
nsIContent* aContent) const;
|
2015-06-16 18:03:57 -07:00
|
|
|
bool IsReflowLocked() const;
|
|
|
|
bool IsSafeToNotifyIME() const;
|
|
|
|
|
|
|
|
void PostFocusSetNotification();
|
|
|
|
void MaybeNotifyIMEOfFocusSet()
|
|
|
|
{
|
|
|
|
PostFocusSetNotification();
|
|
|
|
FlushMergeableNotifications();
|
|
|
|
}
|
2015-07-10 18:53:56 -07:00
|
|
|
void PostTextChangeNotification(const TextChangeDataBase& aTextChangeData);
|
|
|
|
void MaybeNotifyIMEOfTextChange(const TextChangeDataBase& aTextChangeData)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
PostTextChangeNotification(aTextChangeData);
|
|
|
|
FlushMergeableNotifications();
|
|
|
|
}
|
2015-07-16 19:25:00 -07:00
|
|
|
void PostSelectionChangeNotification(bool aCausedByComposition,
|
|
|
|
bool aCausedBySelectionEvent);
|
|
|
|
void MaybeNotifyIMEOfSelectionChange(bool aCausedByComposition,
|
|
|
|
bool aCausedBySelectionEvent)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
2015-07-16 19:25:00 -07:00
|
|
|
PostSelectionChangeNotification(aCausedByComposition,
|
|
|
|
aCausedBySelectionEvent);
|
2015-06-16 18:03:57 -07:00
|
|
|
FlushMergeableNotifications();
|
|
|
|
}
|
|
|
|
void PostPositionChangeNotification();
|
|
|
|
void MaybeNotifyIMEOfPositionChange()
|
|
|
|
{
|
|
|
|
PostPositionChangeNotification();
|
|
|
|
FlushMergeableNotifications();
|
|
|
|
}
|
2014-07-30 21:38:00 -07:00
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
void NotifyContentAdded(nsINode* aContainer, int32_t aStart, int32_t aEnd);
|
|
|
|
void ObserveEditableNode();
|
2014-07-30 21:37:59 -07:00
|
|
|
/**
|
2015-05-26 00:45:26 -07:00
|
|
|
* NotifyIMEOfBlur() notifies IME of blur.
|
2015-05-23 18:11:37 -07:00
|
|
|
*/
|
2015-05-26 00:45:26 -07:00
|
|
|
void NotifyIMEOfBlur();
|
2015-05-26 00:45:26 -07:00
|
|
|
/**
|
|
|
|
* UnregisterObservers() unregisters all listeners and observers.
|
|
|
|
*/
|
|
|
|
void UnregisterObservers();
|
2014-07-30 21:37:59 -07:00
|
|
|
void FlushMergeableNotifications();
|
2015-06-16 18:03:57 -07:00
|
|
|
void ClearPendingNotifications()
|
|
|
|
{
|
|
|
|
mIsFocusEventPending = false;
|
|
|
|
mIsSelectionChangeEventPending = false;
|
|
|
|
mIsPositionChangeEventPending = false;
|
2015-07-10 18:53:56 -07:00
|
|
|
mTextChangeData.Clear();
|
2015-06-16 18:03:57 -07:00
|
|
|
}
|
2014-07-30 21:37:59 -07:00
|
|
|
|
2015-08-21 09:43:41 -07:00
|
|
|
/**
|
|
|
|
* UpdateSelectionCache() updates mSelectionData with the latest selection.
|
|
|
|
* This should be called only when IsSafeToNotifyIME() returns true.
|
|
|
|
*
|
|
|
|
* Note that this does nothing if mUpdatePreference.WantSelectionChange()
|
|
|
|
* returns false.
|
|
|
|
*/
|
|
|
|
bool UpdateSelectionCache();
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
nsCOMPtr<nsIWidget> mWidget;
|
|
|
|
nsCOMPtr<nsISelection> mSelection;
|
|
|
|
nsCOMPtr<nsIContent> mRootContent;
|
|
|
|
nsCOMPtr<nsINode> mEditableNode;
|
|
|
|
nsCOMPtr<nsIDocShell> mDocShell;
|
2014-07-30 21:37:59 -07:00
|
|
|
nsCOMPtr<nsIEditor> mEditor;
|
2014-04-23 17:36:15 -07:00
|
|
|
|
2014-07-30 21:38:00 -07:00
|
|
|
/**
|
|
|
|
* FlatTextCache stores flat text length from start of the content to
|
|
|
|
* mNodeOffset of mContainerNode.
|
|
|
|
*/
|
|
|
|
struct FlatTextCache
|
|
|
|
{
|
|
|
|
// mContainerNode and mNodeOffset represent a point in DOM tree. E.g.,
|
|
|
|
// if mContainerNode is a div element, mNodeOffset is index of its child.
|
|
|
|
nsCOMPtr<nsINode> mContainerNode;
|
|
|
|
int32_t mNodeOffset;
|
|
|
|
// Length of flat text generated from contents between the start of content
|
|
|
|
// and a child node whose index is mNodeOffset of mContainerNode.
|
|
|
|
uint32_t mFlatTextLength;
|
|
|
|
|
|
|
|
FlatTextCache()
|
|
|
|
: mNodeOffset(0)
|
|
|
|
, mFlatTextLength(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Clear()
|
|
|
|
{
|
|
|
|
mContainerNode = nullptr;
|
|
|
|
mNodeOffset = 0;
|
|
|
|
mFlatTextLength = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Cache(nsINode* aContainer, int32_t aNodeOffset,
|
|
|
|
uint32_t aFlatTextLength)
|
|
|
|
{
|
|
|
|
MOZ_ASSERT(aContainer, "aContainer must not be null");
|
|
|
|
MOZ_ASSERT(
|
|
|
|
aNodeOffset <= static_cast<int32_t>(aContainer->GetChildCount()),
|
|
|
|
"aNodeOffset must be same as or less than the count of children");
|
|
|
|
mContainerNode = aContainer;
|
|
|
|
mNodeOffset = aNodeOffset;
|
|
|
|
mFlatTextLength = aFlatTextLength;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Match(nsINode* aContainer, int32_t aNodeOffset) const
|
|
|
|
{
|
|
|
|
return aContainer == mContainerNode && aNodeOffset == mNodeOffset;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
// mEndOfAddedTextCache caches text length from the start of content to
|
|
|
|
// the end of the last added content only while an edit action is being
|
|
|
|
// handled by the editor and no other mutation (e.g., removing node)
|
|
|
|
// occur.
|
|
|
|
FlatTextCache mEndOfAddedTextCache;
|
2014-07-30 21:38:00 -07:00
|
|
|
// mStartOfRemovingTextRangeCache caches text length from the start of content
|
|
|
|
// to the start of the last removed content only while an edit action is being
|
|
|
|
// handled by the editor and no other mutation (e.g., adding node) occur.
|
|
|
|
FlatTextCache mStartOfRemovingTextRangeCache;
|
2014-07-30 21:38:00 -07:00
|
|
|
|
2014-07-30 21:37:59 -07:00
|
|
|
TextChangeData mTextChangeData;
|
|
|
|
|
2015-08-21 09:43:41 -07:00
|
|
|
// mSelectionData is the last selection data which was notified. This is
|
|
|
|
// modified by UpdateSelectionCache(). Note that mCausedBy* are always
|
|
|
|
// false. Do NOT refer them.
|
|
|
|
SelectionChangeData mSelectionData;
|
|
|
|
|
2014-04-23 17:36:15 -07:00
|
|
|
EventStateManager* mESM;
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
nsIMEUpdatePreference mUpdatePreference;
|
|
|
|
uint32_t mPreAttrChangeLength;
|
2015-06-04 10:06:10 -07:00
|
|
|
uint32_t mSuppressNotifications;
|
2014-07-30 21:38:01 -07:00
|
|
|
int64_t mPreCharacterDataChangeLength;
|
2014-07-30 21:37:59 -07:00
|
|
|
|
2015-05-26 00:45:26 -07:00
|
|
|
bool mIsObserving;
|
2015-06-16 18:03:57 -07:00
|
|
|
bool mIMEHasFocus;
|
|
|
|
bool mIsFocusEventPending;
|
2014-07-30 21:38:00 -07:00
|
|
|
bool mIsSelectionChangeEventPending;
|
|
|
|
bool mSelectionChangeCausedOnlyByComposition;
|
2015-07-16 19:25:00 -07:00
|
|
|
bool mSelectionChangeCausedOnlyBySelectionEvent;
|
2014-07-30 21:38:00 -07:00
|
|
|
bool mIsPositionChangeEventPending;
|
2014-08-13 04:25:14 -07:00
|
|
|
bool mIsFlushingPendingNotifications;
|
2015-06-16 18:03:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper classes to notify IME.
|
|
|
|
*/
|
|
|
|
|
2015-06-16 18:03:57 -07:00
|
|
|
class AChangeEvent: public nsRunnable
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
2015-06-16 18:03:57 -07:00
|
|
|
protected:
|
|
|
|
enum ChangeEventType
|
|
|
|
{
|
|
|
|
eChangeEventType_Focus,
|
|
|
|
eChangeEventType_Selection,
|
|
|
|
eChangeEventType_Text,
|
|
|
|
eChangeEventType_Position,
|
|
|
|
eChangeEventType_FlushPendingEvents
|
|
|
|
};
|
|
|
|
|
|
|
|
AChangeEvent(ChangeEventType aChangeEventType,
|
|
|
|
IMEContentObserver* aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
: mIMEContentObserver(aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
, mChangeEventType(aChangeEventType)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
MOZ_ASSERT(mIMEContentObserver);
|
|
|
|
}
|
|
|
|
|
|
|
|
nsRefPtr<IMEContentObserver> mIMEContentObserver;
|
2015-06-16 18:03:57 -07:00
|
|
|
ChangeEventType mChangeEventType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* CanNotifyIME() checks if mIMEContentObserver can and should notify IME.
|
|
|
|
*/
|
|
|
|
bool CanNotifyIME() const;
|
2015-06-16 18:03:57 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* IsSafeToNotifyIME() checks if it's safe to noitify IME.
|
|
|
|
*/
|
|
|
|
bool IsSafeToNotifyIME() const;
|
2015-06-16 18:03:57 -07:00
|
|
|
};
|
|
|
|
|
2015-06-16 18:03:57 -07:00
|
|
|
class FocusSetEvent: public AChangeEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit FocusSetEvent(IMEContentObserver* aIMEContentObserver)
|
|
|
|
: AChangeEvent(eChangeEventType_Focus, aIMEContentObserver)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
NS_IMETHOD Run() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SelectionChangeEvent : public AChangeEvent
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SelectionChangeEvent(IMEContentObserver* aIMEContentObserver,
|
2015-07-16 19:25:00 -07:00
|
|
|
bool aCausedByComposition,
|
|
|
|
bool aCausedBySelectionEvent)
|
2015-06-16 18:03:57 -07:00
|
|
|
: AChangeEvent(eChangeEventType_Selection, aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
, mCausedByComposition(aCausedByComposition)
|
2015-07-16 19:25:00 -07:00
|
|
|
, mCausedBySelectionEvent(aCausedBySelectionEvent)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
2015-07-16 19:25:00 -07:00
|
|
|
aIMEContentObserver->mSelectionChangeCausedOnlyByComposition = false;
|
|
|
|
aIMEContentObserver->mSelectionChangeCausedOnlyBySelectionEvent = false;
|
2015-06-16 18:03:57 -07:00
|
|
|
}
|
|
|
|
NS_IMETHOD Run() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool mCausedByComposition;
|
2015-07-16 19:25:00 -07:00
|
|
|
bool mCausedBySelectionEvent;
|
2015-06-16 18:03:57 -07:00
|
|
|
};
|
|
|
|
|
2015-06-16 18:03:57 -07:00
|
|
|
class TextChangeEvent : public AChangeEvent
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TextChangeEvent(IMEContentObserver* aIMEContentObserver,
|
2015-07-10 18:53:56 -07:00
|
|
|
TextChangeDataBase& aTextChangeData)
|
2015-06-16 18:03:57 -07:00
|
|
|
: AChangeEvent(eChangeEventType_Text, aIMEContentObserver)
|
2015-07-10 18:53:56 -07:00
|
|
|
, mTextChangeData(aTextChangeData)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
2015-07-10 18:53:56 -07:00
|
|
|
MOZ_ASSERT(mTextChangeData.IsValid());
|
|
|
|
// Reset aTextChangeData because this now consumes the data.
|
|
|
|
aTextChangeData.Clear();
|
2015-06-16 18:03:57 -07:00
|
|
|
}
|
|
|
|
NS_IMETHOD Run() override;
|
|
|
|
|
|
|
|
private:
|
2015-07-10 18:53:56 -07:00
|
|
|
TextChangeDataBase mTextChangeData;
|
2015-06-16 18:03:57 -07:00
|
|
|
};
|
|
|
|
|
2015-06-16 18:03:57 -07:00
|
|
|
class PositionChangeEvent final : public AChangeEvent
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit PositionChangeEvent(IMEContentObserver* aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
: AChangeEvent(eChangeEventType_Position, aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
NS_IMETHOD Run() override;
|
|
|
|
};
|
|
|
|
|
2015-06-16 18:03:57 -07:00
|
|
|
class AsyncMergeableNotificationsFlusher : public AChangeEvent
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit AsyncMergeableNotificationsFlusher(
|
|
|
|
IMEContentObserver* aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
: AChangeEvent(eChangeEventType_FlushPendingEvents, aIMEContentObserver)
|
2015-06-16 18:03:57 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
NS_IMETHOD Run() override;
|
|
|
|
};
|
2014-03-07 17:20:07 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-03-07 17:20:07 -08:00
|
|
|
#endif // mozilla_IMEContentObserver_h_
|