mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895274 part.190 Rename NS_COMPOSITION_START to eCompositionStart r=smaug
This commit is contained in:
parent
a6e65a26e0
commit
67d08ce0c8
@ -676,7 +676,7 @@ NON_IDL_EVENT(text,
|
||||
EventNameType_XUL,
|
||||
eCompositionEventClass)
|
||||
NON_IDL_EVENT(compositionstart,
|
||||
NS_COMPOSITION_START,
|
||||
eCompositionStart,
|
||||
EventNameType_XUL,
|
||||
eCompositionEventClass)
|
||||
NON_IDL_EVENT(compositionupdate,
|
||||
|
@ -759,7 +759,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
case eContentCommandScroll:
|
||||
DoContentCommandScrollEvent(aEvent->AsContentCommandEvent());
|
||||
break;
|
||||
case NS_COMPOSITION_START:
|
||||
case eCompositionStart:
|
||||
if (aEvent->mFlags.mIsTrusted) {
|
||||
// If the event is trusted event, set the selected text to data of
|
||||
// composition event.
|
||||
|
@ -137,8 +137,8 @@ static const char*
|
||||
GetEventMessageName(EventMessage aMessage)
|
||||
{
|
||||
switch (aMessage) {
|
||||
case NS_COMPOSITION_START:
|
||||
return "NS_COMPOSITION_START";
|
||||
case eCompositionStart:
|
||||
return "eCompositionStart";
|
||||
case NS_COMPOSITION_END:
|
||||
return "NS_COMPOSITION_END";
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
@ -1163,7 +1163,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
("ISM: IMEStateManager::DispatchCompositionEvent(), "
|
||||
"adding new TextComposition to the array"));
|
||||
MOZ_ASSERT(aCompositionEvent->mMessage == NS_COMPOSITION_START);
|
||||
MOZ_ASSERT(aCompositionEvent->mMessage == eCompositionStart);
|
||||
composition =
|
||||
new TextComposition(aPresContext, aEventTargetNode, tabParent,
|
||||
aCompositionEvent);
|
||||
@ -1171,7 +1171,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else {
|
||||
MOZ_ASSERT(aCompositionEvent->mMessage != NS_COMPOSITION_START);
|
||||
MOZ_ASSERT(aCompositionEvent->mMessage != eCompositionStart);
|
||||
}
|
||||
#endif // #ifdef DEBUG
|
||||
|
||||
@ -1277,7 +1277,7 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
|
||||
// Ignore compositionstart for now because sTextCompositions may not have
|
||||
// been created yet.
|
||||
if (aCompositionEvent->mMessage == NS_COMPOSITION_START) {
|
||||
if (aCompositionEvent->mMessage == eCompositionStart) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ TextComposition::NotityUpdateComposition(
|
||||
// When compositon start, notify the rect of first offset character.
|
||||
// When not compositon start, notify the rect of selected composition
|
||||
// string if compositionchange event.
|
||||
if (aCompositionEvent->mMessage == NS_COMPOSITION_START) {
|
||||
if (aCompositionEvent->mMessage == eCompositionStart) {
|
||||
nsCOMPtr<nsIWidget> widget = mPresContext->GetRootWidget();
|
||||
// Update composition start offset
|
||||
WidgetQueryContentEvent selectedTextEvent(true, eQuerySelectedText, widget);
|
||||
@ -611,8 +611,8 @@ TextComposition::CompositionEventDispatcher::Run()
|
||||
nsRefPtr<nsPresContext> presContext = mTextComposition->mPresContext;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
switch (mEventMessage) {
|
||||
case NS_COMPOSITION_START: {
|
||||
WidgetCompositionEvent compStart(true, NS_COMPOSITION_START, widget);
|
||||
case eCompositionStart: {
|
||||
WidgetCompositionEvent compStart(true, eCompositionStart, widget);
|
||||
WidgetQueryContentEvent selectedText(true, eQuerySelectedText, widget);
|
||||
ContentEventHandler handler(presContext);
|
||||
handler.OnQuerySelectedText(&selectedText);
|
||||
|
@ -5159,7 +5159,7 @@ nsEditor::IsAcceptableInputEvent(nsIDOMEvent* aEvent)
|
||||
// If events are not created with proper event interface, their message
|
||||
// are initialized with eUnidentifiedEvent. Let's ignore such event.
|
||||
return false;
|
||||
case NS_COMPOSITION_START:
|
||||
case eCompositionStart:
|
||||
case NS_COMPOSITION_END:
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
|
@ -463,7 +463,7 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
return HandleText(aEvent);
|
||||
// compositionstart
|
||||
case NS_COMPOSITION_START:
|
||||
case eCompositionStart:
|
||||
return HandleStartComposition(aEvent);
|
||||
// compositionend
|
||||
case NS_COMPOSITION_END:
|
||||
|
@ -27,8 +27,8 @@ static const char*
|
||||
GetEventMessageName(EventMessage aMessage)
|
||||
{
|
||||
switch (aMessage) {
|
||||
case NS_COMPOSITION_START:
|
||||
return "NS_COMPOSITION_START";
|
||||
case eCompositionStart:
|
||||
return "eCompositionStart";
|
||||
case NS_COMPOSITION_END:
|
||||
return "NS_COMPOSITION_END";
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
@ -858,7 +858,7 @@ ContentCacheInParent::OnCompositionEvent(const WidgetCompositionEvent& aEvent)
|
||||
GetBoolName(mRequestedToCommitOrCancelComposition)));
|
||||
|
||||
if (!aEvent.CausesDOMTextEvent()) {
|
||||
MOZ_ASSERT(aEvent.mMessage == NS_COMPOSITION_START);
|
||||
MOZ_ASSERT(aEvent.mMessage == eCompositionStart);
|
||||
mIsComposing = !aEvent.CausesDOMCompositionEndEvent();
|
||||
mCompositionStart = mSelection.StartOffset();
|
||||
// XXX What's this case??
|
||||
|
@ -146,7 +146,7 @@ NS_EVENT_MESSAGE(eUnidentifiedEvent, 2000)
|
||||
|
||||
// composition events
|
||||
NS_EVENT_MESSAGE(eCompositionEventFirst, 2200)
|
||||
NS_EVENT_MESSAGE(NS_COMPOSITION_START, eCompositionEventFirst)
|
||||
NS_EVENT_MESSAGE(eCompositionStart, eCompositionEventFirst)
|
||||
// NS_COMPOSITION_END is the message for DOM compositionend event.
|
||||
// This event should NOT be dispatched from widget if NS_COMPOSITION_COMMIT
|
||||
// is available.
|
||||
|
@ -191,7 +191,7 @@ TextEventDispatcher::StartComposition(nsEventStatus& aStatus)
|
||||
}
|
||||
|
||||
mIsComposing = true;
|
||||
WidgetCompositionEvent compositionStartEvent(true, NS_COMPOSITION_START,
|
||||
WidgetCompositionEvent compositionStartEvent(true, eCompositionStart,
|
||||
mWidget);
|
||||
InitEvent(compositionStartEvent);
|
||||
rv = DispatchEvent(mWidget, compositionStartEvent, aStatus);
|
||||
|
@ -136,7 +136,7 @@ bool
|
||||
WidgetEvent::HasIMEEventMessage() const
|
||||
{
|
||||
switch (mMessage) {
|
||||
case NS_COMPOSITION_START:
|
||||
case eCompositionStart:
|
||||
case NS_COMPOSITION_END:
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_CHANGE:
|
||||
|
@ -1827,8 +1827,7 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
|
||||
}
|
||||
|
||||
{
|
||||
WidgetCompositionEvent event(
|
||||
true, NS_COMPOSITION_START, this);
|
||||
WidgetCompositionEvent event(true, eCompositionStart, this);
|
||||
InitEvent(event, nullptr);
|
||||
DispatchEvent(&event);
|
||||
}
|
||||
@ -1983,8 +1982,7 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
|
||||
}
|
||||
|
||||
{
|
||||
WidgetCompositionEvent event(
|
||||
true, NS_COMPOSITION_START, this);
|
||||
WidgetCompositionEvent event(true, eCompositionStart, this);
|
||||
InitEvent(event, nullptr);
|
||||
DispatchEvent(&event);
|
||||
}
|
||||
|
@ -2813,7 +2813,7 @@ IMEInputHandler::InsertTextAsCommittingComposition(
|
||||
|
||||
// XXXmnakano Probably, we shouldn't emulate composition in this case.
|
||||
// I think that we should just fire DOM3 textInput event if we implement it.
|
||||
WidgetCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
|
||||
WidgetCompositionEvent compStart(true, eCompositionStart, mWidget);
|
||||
InitCompositionEvent(compStart);
|
||||
|
||||
DispatchEvent(compStart);
|
||||
@ -2903,7 +2903,7 @@ IMEInputHandler::SetMarkedText(NSAttributedString* aAttrString,
|
||||
|
||||
mMarkedRange.location = SelectedRange().location;
|
||||
|
||||
WidgetCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
|
||||
WidgetCompositionEvent compStart(true, eCompositionStart, mWidget);
|
||||
InitCompositionEvent(compStart);
|
||||
|
||||
DispatchEvent(compStart);
|
||||
|
@ -915,7 +915,7 @@ IMContextWrapper::OnSelectionChange(nsWindow* aCaller,
|
||||
|
||||
// The focused editor might have placeholder text with normal text node.
|
||||
// In such case, the text node must be removed from a compositionstart
|
||||
// event handler. So, we're dispatching NS_COMPOSITION_START,
|
||||
// event handler. So, we're dispatching eCompositionStart,
|
||||
// we should ignore selection change notification.
|
||||
if (mCompositionState == eCompositionState_CompositionStartDispatched) {
|
||||
if (NS_WARN_IF(!mSelection.IsValid())) {
|
||||
@ -1303,7 +1303,7 @@ IMContextWrapper::DispatchCompositionStart(GtkIMContext* aContext)
|
||||
("GTKIM: %p DispatchCompositionStart(), FAILED, mCompositionStart=%u",
|
||||
this, mCompositionStart));
|
||||
mCompositionState = eCompositionState_CompositionStartDispatched;
|
||||
WidgetCompositionEvent compEvent(true, NS_COMPOSITION_START,
|
||||
WidgetCompositionEvent compEvent(true, eCompositionStart,
|
||||
mLastFocusedWindow);
|
||||
InitEvent(compEvent);
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip = mLastFocusedWindow;
|
||||
|
@ -1250,7 +1250,7 @@ IMMHandler::HandleStartComposition(nsWindow* aWindow,
|
||||
mCompositionStart = selection.mOffset;
|
||||
mCursorPosition = NO_IME_CARET;
|
||||
|
||||
WidgetCompositionEvent event(true, NS_COMPOSITION_START, aWindow);
|
||||
WidgetCompositionEvent event(true, eCompositionStart, aWindow);
|
||||
nsIntPoint point(0, 0);
|
||||
aWindow->InitEvent(event, &point);
|
||||
aWindow->DispatchWindowEvent(&event);
|
||||
|
@ -1705,10 +1705,10 @@ TSFTextStore::FlushPendingActions()
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
|
||||
("TSF: 0x%p TSFTextStore::FlushPendingActions() "
|
||||
"dispatching compositionstart event...", this));
|
||||
WidgetCompositionEvent compositionStart(true, NS_COMPOSITION_START,
|
||||
WidgetCompositionEvent compositionStart(true, eCompositionStart,
|
||||
mWidget);
|
||||
mWidget->InitEvent(compositionStart);
|
||||
// NS_COMPOSITION_START always causes NOTIFY_IME_OF_COMPOSITION_UPDATE.
|
||||
// eCompositionStart always causes NOTIFY_IME_OF_COMPOSITION_UPDATE.
|
||||
// Therefore, we should wait to clear the locked content until it's
|
||||
// notified.
|
||||
mDeferClearingLockedContent = true;
|
||||
|
Loading…
Reference in New Issue
Block a user