mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 895274 part.191 Rename NS_COMPOSITION_END to eCompositionEnd r=smaug
This commit is contained in:
parent
0f2bfad9b1
commit
ebdc7bd69b
@ -684,7 +684,7 @@ NON_IDL_EVENT(compositionupdate,
|
||||
EventNameType_XUL,
|
||||
eCompositionEventClass)
|
||||
NON_IDL_EVENT(compositionend,
|
||||
NS_COMPOSITION_END,
|
||||
eCompositionEnd,
|
||||
EventNameType_XUL,
|
||||
eCompositionEventClass)
|
||||
NON_IDL_EVENT(command,
|
||||
|
@ -139,8 +139,8 @@ GetEventMessageName(EventMessage aMessage)
|
||||
switch (aMessage) {
|
||||
case eCompositionStart:
|
||||
return "eCompositionStart";
|
||||
case NS_COMPOSITION_END:
|
||||
return "NS_COMPOSITION_END";
|
||||
case eCompositionEnd:
|
||||
return "eCompositionEnd";
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
return "NS_COMPOSITION_UPDATE";
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
|
@ -284,7 +284,7 @@ TextComposition::DispatchCompositionEvent(
|
||||
if (!aIsSynthesized && (mIsRequestingCommit || mIsRequestingCancel)) {
|
||||
nsString* committingData = nullptr;
|
||||
switch (aCompositionEvent->mMessage) {
|
||||
case NS_COMPOSITION_END:
|
||||
case eCompositionEnd:
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
case eCompositionCommitAsIs:
|
||||
case NS_COMPOSITION_COMMIT:
|
||||
@ -366,8 +366,8 @@ TextComposition::DispatchCompositionEvent(
|
||||
|
||||
if (aCompositionEvent->CausesDOMCompositionEndEvent()) {
|
||||
// Dispatch a compositionend event if it's necessary.
|
||||
if (aCompositionEvent->mMessage != NS_COMPOSITION_END) {
|
||||
CloneAndDispatchAs(aCompositionEvent, NS_COMPOSITION_END);
|
||||
if (aCompositionEvent->mMessage != eCompositionEnd) {
|
||||
CloneAndDispatchAs(aCompositionEvent, eCompositionEnd);
|
||||
}
|
||||
MOZ_ASSERT(!mIsComposing, "Why is the editor still composing?");
|
||||
MOZ_ASSERT(!HasEditor(), "Why does the editor still keep to hold this?");
|
||||
|
@ -5160,7 +5160,7 @@ nsEditor::IsAcceptableInputEvent(nsIDOMEvent* aEvent)
|
||||
// are initialized with eUnidentifiedEvent. Let's ignore such event.
|
||||
return false;
|
||||
case eCompositionStart:
|
||||
case NS_COMPOSITION_END:
|
||||
case eCompositionEnd:
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
case eCompositionCommitAsIs:
|
||||
|
@ -466,7 +466,7 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
case eCompositionStart:
|
||||
return HandleStartComposition(aEvent);
|
||||
// compositionend
|
||||
case NS_COMPOSITION_END:
|
||||
case eCompositionEnd:
|
||||
HandleEndComposition(aEvent);
|
||||
return NS_OK;
|
||||
default:
|
||||
|
@ -29,8 +29,8 @@ GetEventMessageName(EventMessage aMessage)
|
||||
switch (aMessage) {
|
||||
case eCompositionStart:
|
||||
return "eCompositionStart";
|
||||
case NS_COMPOSITION_END:
|
||||
return "NS_COMPOSITION_END";
|
||||
case eCompositionEnd:
|
||||
return "eCompositionEnd";
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
return "NS_COMPOSITION_UPDATE";
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
|
@ -147,10 +147,10 @@ NS_EVENT_MESSAGE(eUnidentifiedEvent, 2000)
|
||||
// composition events
|
||||
NS_EVENT_MESSAGE(eCompositionEventFirst, 2200)
|
||||
NS_EVENT_MESSAGE(eCompositionStart, eCompositionEventFirst)
|
||||
// NS_COMPOSITION_END is the message for DOM compositionend event.
|
||||
// eCompositionEnd is the message for DOM compositionend event.
|
||||
// This event should NOT be dispatched from widget if NS_COMPOSITION_COMMIT
|
||||
// is available.
|
||||
NS_EVENT_MESSAGE(NS_COMPOSITION_END, eCompositionEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(eCompositionEnd, eCompositionEventFirst + 1)
|
||||
// NS_COMPOSITION_UPDATE is the message for DOM compositionupdate event.
|
||||
// This event should NOT be dispatched from widget since it will be dispatched
|
||||
// by mozilla::TextComposition automatically if NS_COMPOSITION_CHANGE event
|
||||
@ -165,13 +165,13 @@ NS_EVENT_MESSAGE(NS_COMPOSITION_CHANGE, eCompositionEventFirst + 3)
|
||||
// composition string. TextComposition will commit composition with the
|
||||
// last data. TextComposition will dispatch this event to the DOM tree as
|
||||
// NS_COMPOSITION_CHANGE without clause information. After that,
|
||||
// NS_COMPOSITION_END will be dispatched automatically.
|
||||
// eCompositionEnd will be dispatched automatically.
|
||||
// Its mData and mRanges should be empty and nullptr.
|
||||
NS_EVENT_MESSAGE(eCompositionCommitAsIs, eCompositionEventFirst + 4)
|
||||
// NS_COMPOSITION_COMMIT is the message for representing a commit of
|
||||
// composition string with its mData value. TextComposition will dispatch this
|
||||
// event to the DOM tree as NS_COMPOSITION_CHANGE without clause information.
|
||||
// After that, NS_COMPOSITION_END will be dispatched automatically.
|
||||
// After that, eCompositionEnd will be dispatched automatically.
|
||||
// Its mRanges should be nullptr.
|
||||
NS_EVENT_MESSAGE(NS_COMPOSITION_COMMIT, eCompositionEventFirst + 5)
|
||||
|
||||
|
@ -441,7 +441,7 @@ public:
|
||||
|
||||
bool CausesDOMCompositionEndEvent() const
|
||||
{
|
||||
return mMessage == NS_COMPOSITION_END ||
|
||||
return mMessage == eCompositionEnd ||
|
||||
mMessage == NS_COMPOSITION_COMMIT ||
|
||||
mMessage == eCompositionCommitAsIs;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ WidgetEvent::HasIMEEventMessage() const
|
||||
{
|
||||
switch (mMessage) {
|
||||
case eCompositionStart:
|
||||
case NS_COMPOSITION_END:
|
||||
case eCompositionEnd:
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
case eCompositionCommitAsIs:
|
||||
|
Loading…
Reference in New Issue
Block a user